Sonar Fix (#2239)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -9,8 +9,6 @@
|
||||
*/
|
||||
package org.eclipse.hawkbit.repository.builder;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
@@ -62,8 +60,8 @@ public interface SoftwareModuleCreate {
|
||||
* @param type for {@link SoftwareModule#getType()}
|
||||
* @return updated builder instance
|
||||
*/
|
||||
default SoftwareModuleCreate type(final SoftwareModuleType type) {
|
||||
return type(Optional.ofNullable(type).map(SoftwareModuleType::getKey).orElse(null));
|
||||
default SoftwareModuleCreate type(@NotNull final SoftwareModuleType type) {
|
||||
return type(type.getKey());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,7 +12,6 @@ package org.eclipse.hawkbit.repository.event.remote;
|
||||
import java.io.Serial;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
@@ -47,8 +46,7 @@ public class TargetAssignDistributionSetEvent extends AbstractAssignmentEvent {
|
||||
public TargetAssignDistributionSetEvent(final String tenant, final long distributionSetId, final List<Action> a,
|
||||
final String applicationId, final boolean maintenanceWindowAvailable) {
|
||||
super(distributionSetId, tenant,
|
||||
a.stream().filter(action -> action.getDistributionSet().getId().longValue() == distributionSetId)
|
||||
.collect(Collectors.toList()),
|
||||
a.stream().filter(action -> action.getDistributionSet().getId().longValue() == distributionSetId).toList(),
|
||||
applicationId);
|
||||
this.distributionSetId = distributionSetId;
|
||||
this.maintenanceWindowAvailable = maintenanceWindowAvailable;
|
||||
|
||||
@@ -11,12 +11,14 @@ package org.eclipse.hawkbit.repository.exception;
|
||||
|
||||
import static org.eclipse.hawkbit.repository.SizeConversionHelper.byteValueToReadableString;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.eclipse.hawkbit.exception.AbstractServerRtException;
|
||||
import org.eclipse.hawkbit.exception.SpServerError;
|
||||
|
||||
/**
|
||||
* Thrown if storage quota is exceeded
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class StorageQuotaExceededException extends AbstractServerRtException {
|
||||
|
||||
private static final String MAX_ARTIFACT_SIZE_TOTAL_EXCEEDED = "Storage quota exceeded, %s left.";
|
||||
|
||||
@@ -13,9 +13,12 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* Bean for holding the system usage stats including tenant specific data.
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SystemUsageReportWithTenants extends SystemUsageReport {
|
||||
|
||||
private final List<TenantUsage> tenants = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user