Fix sonar issues

Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
SirWayne
2016-08-05 08:56:38 +02:00
parent a1e939e233
commit 54ce3ad8e0
68 changed files with 341 additions and 290 deletions

View File

@@ -24,6 +24,7 @@ import org.eclipse.hawkbit.repository.exception.RSQLParameterUnsupportedFieldExc
import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.DistributionSetFilter;
import org.eclipse.hawkbit.repository.model.DistributionSetFilter.DistributionSetFilterBuilder;
import org.eclipse.hawkbit.repository.model.DistributionSetMetadata;
import org.eclipse.hawkbit.repository.model.DistributionSetTag;
import org.eclipse.hawkbit.repository.model.DistributionSetTagAssignmentResult;
@@ -32,7 +33,6 @@ import org.eclipse.hawkbit.repository.model.SoftwareModule;
import org.eclipse.hawkbit.repository.model.SoftwareModuleType;
import org.eclipse.hawkbit.repository.model.Tag;
import org.eclipse.hawkbit.repository.model.Target;
import org.eclipse.hawkbit.repository.model.DistributionSetFilter.DistributionSetFilterBuilder;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
@@ -44,9 +44,6 @@ import org.springframework.security.access.prepost.PreAuthorize;
*/
public interface DistributionSetManagement {
// TODO rename/document the whole with details thing (document what the
// details are and maybe find a better name, e.g. with dependencies?)
/**
* Assigns {@link SoftwareModule} to existing {@link DistributionSet}.
*
@@ -320,7 +317,6 @@ public interface DistributionSetManagement {
@PreAuthorize(SpringEvalExpressions.HAS_AUTH_READ_REPOSITORY)
List<DistributionSet> findDistributionSetsAll(Collection<Long> dist);
// TODO discuss: use enum instead of the true,false,null switch ?
/**
* finds all {@link DistributionSet}s.
*

View File

@@ -8,7 +8,7 @@
*/
package org.eclipse.hawkbit.repository.eventbus.event;
import org.eclipse.hawkbit.eventbus.event.AbstractEvent;
import org.eclipse.hawkbit.eventbus.event.DefaultEvent;
/**
* Event declaration for the UI to notify the UI that a rollout has been
@@ -17,7 +17,7 @@ import org.eclipse.hawkbit.eventbus.event.AbstractEvent;
* @author Michael Hirsch
*
*/
public class RolloutChangeEvent extends AbstractEvent {
public class RolloutChangeEvent extends DefaultEvent {
private final Long rolloutId;

View File

@@ -8,7 +8,7 @@
*/
package org.eclipse.hawkbit.repository.eventbus.event;
import org.eclipse.hawkbit.eventbus.event.AbstractEvent;
import org.eclipse.hawkbit.eventbus.event.DefaultEvent;
/**
* Event declaration for the UI to notify the UI that a rollout has been
@@ -17,7 +17,7 @@ import org.eclipse.hawkbit.eventbus.event.AbstractEvent;
* @author Michael Hirsch
*
*/
public class RolloutGroupChangeEvent extends AbstractEvent {
public class RolloutGroupChangeEvent extends DefaultEvent {
private final Long rolloutId;
private final Long rolloutGroupId;

View File

@@ -11,14 +11,14 @@ package org.eclipse.hawkbit.repository.eventbus.event;
import java.net.URI;
import java.util.Collection;
import org.eclipse.hawkbit.eventbus.event.AbstractEvent;
import org.eclipse.hawkbit.eventbus.event.DefaultEvent;
import org.eclipse.hawkbit.repository.model.SoftwareModule;
/**
* Event that gets sent when a distribution set gets assigned to a target.
*
*/
public class TargetAssignDistributionSetEvent extends AbstractEvent {
public class TargetAssignDistributionSetEvent extends DefaultEvent {
private final Collection<SoftwareModule> softwareModules;
private final String controllerId;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if artifact deletion failed.
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public final class ArtifactDeleteFailedException extends SpServerRtException {
public final class ArtifactDeleteFailedException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,14 +9,14 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
*
*
*
*/
public final class ArtifactUploadFailedException extends SpServerRtException {
public final class ArtifactUploadFailedException extends AbstractServerRtException {
/**
*

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if cancelation of actions is performened where the action is not
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public final class CancelActionNotAllowedException extends SpServerRtException {
public final class CancelActionNotAllowedException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* {@link ConcurrentModificationException} is thrown when a given entity in's
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class ConcurrentModificationException extends SpServerRtException {
public class ConcurrentModificationException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;
private static final SpServerError THIS_ERROR = SpServerError.SP_REPO_CONCURRENT_MODIFICATION;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if DS creation failed.
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public final class DistributionSetCreationFailedMissingMandatoryModuleException extends SpServerRtException {
public final class DistributionSetCreationFailedMissingMandatoryModuleException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.DistributionSetType;
@@ -21,7 +21,7 @@ import org.eclipse.hawkbit.repository.model.DistributionSetType;
*
*
*/
public class DistributionSetTypeUndefinedException extends SpServerRtException {
public class DistributionSetTypeUndefinedException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* the {@link EntityAlreadyExistsException} is thrown when a entity is tried to
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class EntityAlreadyExistsException extends SpServerRtException {
public class EntityAlreadyExistsException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;
private static final SpServerError THIS_ERROR = SpServerError.SP_REPO_ENTITY_ALRREADY_EXISTS;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* The {@link EntityLockedException} is thrown when an entity has been locked by
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class EntityLockedException extends SpServerRtException {
public class EntityLockedException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;
private static final SpServerError THIS_ERROR = SpServerError.SP_ENTITY_LOCKED;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* the {@link EntityNotFoundException} is thrown when a entity is tried find but
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class EntityNotFoundException extends SpServerRtException {
public class EntityNotFoundException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;
private static final SpServerError THIS_ERROR = SpServerError.SP_REPO_ENTITY_NOT_EXISTS;

View File

@@ -9,13 +9,13 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* the {@link EntityReadOnlyException} is thrown when a entity is in read only
* mode and a user tries to change it.
*/
public class EntityReadOnlyException extends SpServerRtException {
public class EntityReadOnlyException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;
private static final SpServerError THIS_ERROR = SpServerError.SP_REPO_ENTITY_READ_ONLY;

View File

@@ -9,14 +9,14 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown when force quitting an actions is not allowed. e.g. the action is not
* active or it is not canceled before.
*
*/
public final class ForceQuitActionNotAllowedException extends SpServerRtException {
public final class ForceQuitActionNotAllowedException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,14 +9,14 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
*
*
*
*/
public final class GridFSDBFileNotFoundException extends SpServerRtException {
public final class GridFSDBFileNotFoundException extends AbstractServerRtException {
/**
*

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if a distribution set is assigned to a a target that is incomplete
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public final class IncompleteDistributionSetException extends SpServerRtException {
public final class IncompleteDistributionSetException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Exception which is thrown in case the current security context object does
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class InsufficientPermissionException extends SpServerRtException {
public class InsufficientPermissionException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if MD5 checksum check fails.
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class InvalidMD5HashException extends SpServerRtException {
public class InvalidMD5HashException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if SHA1 checksum check fails.
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class InvalidSHA1HashException extends SpServerRtException {
public class InvalidSHA1HashException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,12 +9,12 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Exception which is thrown when trying to set an invalid target address.
*/
public class InvalidTargetAddressException extends SpServerRtException {
public class InvalidTargetAddressException extends AbstractServerRtException {
/**
*

View File

@@ -9,13 +9,13 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if a multi part exception occurred.
*
*/
public final class MultiPartFileUploadException extends SpServerRtException {
public final class MultiPartFileUploadException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Exception used by the REST API in case of RSQL search filter query.
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class RSQLParameterSyntaxException extends SpServerRtException {
public class RSQLParameterSyntaxException extends AbstractServerRtException {
/**
*

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Exception used by the REST API in case of invalid field name in the rsql
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class RSQLParameterUnsupportedFieldException extends SpServerRtException {
public class RSQLParameterUnsupportedFieldException extends AbstractServerRtException {
/**
*

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* the {@link RolloutIllegalStateException} is thrown when a rollout is changing
@@ -17,7 +17,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
* rollout, or trying to resume a already finished rollout.
*
*/
public class RolloutIllegalStateException extends SpServerRtException {
public class RolloutIllegalStateException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;
private static final SpServerError THIS_ERROR = SpServerError.SP_ROLLOUT_ILLEGAL_STATE;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* the {@link TenantNotExistException} is thrown when e.g. a controller tries to
@@ -20,7 +20,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class TenantNotExistException extends SpServerRtException {
public class TenantNotExistException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;
private static final SpServerError THIS_ERROR = SpServerError.SP_REPO_TENANT_NOT_EXISTS;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if too many status entries have been inserted.
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public final class ToManyAttributeEntriesException extends SpServerRtException {
public final class ToManyAttributeEntriesException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if too many status entries have been inserted.
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public final class ToManyStatusEntriesException extends SpServerRtException {
public final class ToManyStatusEntriesException extends AbstractServerRtException {
/**
*
*/

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.repository.exception;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.DistributionSetType;
import org.eclipse.hawkbit.repository.model.SoftwareModule;
@@ -23,7 +23,7 @@ import org.eclipse.hawkbit.repository.model.SoftwareModule;
*
*
*/
public class UnsupportedSoftwareModuleForThisDistributionSetException extends SpServerRtException {
public class UnsupportedSoftwareModuleForThisDistributionSetException extends AbstractServerRtException {
/**
*
*/