Sonar Fixes (6) (#2214)

Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
Avgustin Marinov
2025-01-21 16:13:43 +02:00
committed by GitHub
parent e8406afeba
commit bbb5f40207
23 changed files with 95 additions and 109 deletions

View File

@@ -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 file size quota is exceeded
*/
@EqualsAndHashCode(callSuper = true)
public class FileSizeQuotaExceededException extends AbstractServerRtException {
private static final String MAX_ARTIFACT_SIZE_EXCEEDED = "Maximum artifact size (%s) exceeded.";

View File

@@ -13,6 +13,7 @@ import java.io.Serial;
import java.util.Collection;
import java.util.Collections;
import lombok.EqualsAndHashCode;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.repository.model.DistributionSet;
@@ -20,9 +21,9 @@ import org.eclipse.hawkbit.repository.model.Target;
import org.eclipse.hawkbit.repository.model.TargetType;
/**
* Thrown if user tries to assign a {@link DistributionSet} to a {@link Target}
* that has an incompatible {@link TargetType}
* Thrown if user tries to assign a {@link DistributionSet} to a {@link Target} that has an incompatible {@link TargetType}
*/
@EqualsAndHashCode(callSuper = true)
public class IncompatibleTargetTypeException extends AbstractServerRtException {
@Serial

View File

@@ -11,14 +11,15 @@ package org.eclipse.hawkbit.repository.exception;
import java.io.Serial;
import lombok.EqualsAndHashCode;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
import org.eclipse.hawkbit.exception.SpServerError;
/**
* This exception is indicating that the confirmation feedback cannot be
* processed for a specific actions for different reasons which are listed as
* enum {@link Reason}.
* This exception is indicating that the confirmation feedback cannot be processed for a specific actions for different reasons which are
* listed as enum {@link Reason}.
*/
@EqualsAndHashCode(callSuper = true)
public class InvalidConfirmationFeedbackException extends AbstractServerRtException {
@Serial

View File

@@ -11,15 +11,16 @@ package org.eclipse.hawkbit.repository.exception;
import java.io.Serial;
import lombok.EqualsAndHashCode;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
import org.eclipse.hawkbit.exception.SpServerError;
/**
* This exception is thrown if trying to set a maintenance schedule that is
* invalid. A maintenance schedule is considered to be valid only if schedule,
* duration and timezone are all null, or are all valid; in which case there
* should be at least one valid window after the current time.
* This exception is thrown if trying to set a maintenance schedule that is invalid. A maintenance schedule is considered to be valid only if
* schedule, duration and timezone are all null, or are all valid; in which case there should be at least one valid window after the current
* time.
*/
@EqualsAndHashCode(callSuper = true)
public class InvalidMaintenanceScheduleException extends AbstractServerRtException {
@Serial