diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/api/ProtocolProperties.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/api/ProtocolProperties.java
deleted file mode 100644
index 1119e11b7..000000000
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/api/ProtocolProperties.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * Copyright (c) 2015 Bosch Software Innovations GmbH and others
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.eclipse.hawkbit.api;
-
-/**
- * Interface for declaring common properties through all supported protocols
- * pattern.
- */
-public interface ProtocolProperties {
-
- /**
- * @return the hostname value to resolve in the pattern.
- */
- String getHostname();
-
- /**
- * @return the IP address value to resolve in the pattern.
- */
- String getIp();
-
- /**
- * @return the port value to resolve in the pattern.
- */
- String getPort();
-
- /**
- * @return the pattern to build the URL.
- */
- String getPattern();
-
- /**
- * @return true if the {@link ProtocolProperties} is enabled.
- */
- boolean isEnabled();
-}
\ No newline at end of file
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/AbstractServerRtException.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/AbstractServerRtException.java
index 9506bc50e..bc3137c19 100644
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/AbstractServerRtException.java
+++ b/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/AbstractServerRtException.java
@@ -93,17 +93,9 @@ public abstract class AbstractServerRtException extends RuntimeException {
* @param error detail
* @param cause of the exception
*/
- protected AbstractServerRtException(final String message, final SpServerError error, final Throwable cause,
- final Map info) {
+ protected AbstractServerRtException(final String message, final SpServerError error, final Throwable cause, final Map info) {
super(message, cause);
this.error = error;
this.info = info;
}
-
- /**
- * @return the SpServerError which is wrapped by this exception
- */
- public SpServerError getError() {
- return error;
- }
-}
+}
\ No newline at end of file
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/GenericSpServerException.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/GenericSpServerException.java
index a5d5f3b9d..a137ff6a3 100644
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/GenericSpServerException.java
+++ b/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/GenericSpServerException.java
@@ -9,6 +9,8 @@
*/
package org.eclipse.hawkbit.exception;
+import java.io.Serial;
+
/**
* {@link GenericSpServerException} is thrown when a given entity in's actual
* and cannot be stored within the current session. Reason could be that it has
@@ -16,42 +18,12 @@ package org.eclipse.hawkbit.exception;
*/
public class GenericSpServerException extends AbstractServerRtException {
+ @Serial
private static final long serialVersionUID = 1L;
+
private static final SpServerError THIS_ERROR = SpServerError.SP_REPO_GENERIC_ERROR;
- /**
- * Constructor.
- */
- public GenericSpServerException() {
- super(THIS_ERROR);
- }
-
- /**
- * Parameterized constructor.
- *
- * @param cause of the exception
- */
public GenericSpServerException(final Throwable cause) {
super(THIS_ERROR, cause);
}
-
- /**
- * Parameterized constructor.
- *
- * @param message custom error message
- * @param cause of the exception
- */
- public GenericSpServerException(final String message, final Throwable cause) {
- super(message, THIS_ERROR, cause);
- }
-
- /**
- * Parameterized constructor.
- *
- * @param message custom error message
- */
- public GenericSpServerException(final String message) {
- super(message, THIS_ERROR);
- }
-
-}
+}
\ No newline at end of file
diff --git a/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/SpServerError.java b/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/SpServerError.java
index 83cbd7273..05873fd5b 100644
--- a/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/SpServerError.java
+++ b/hawkbit-core/src/main/java/org/eclipse/hawkbit/exception/SpServerError.java
@@ -9,10 +9,13 @@
*/
package org.eclipse.hawkbit.exception;
+import lombok.Data;
+import lombok.Getter;
+
/**
* Define the Error code for Error handling
*/
-
+@Getter
public enum SpServerError {
SP_REPO_GENERIC_ERROR("hawkbit.server.error.repo.genericError", "unknown error occurred"),
@@ -147,30 +150,11 @@ public enum SpServerError {
private final String key;
private final String message;
- /*
+ /**
* Repository side Error codes
*/
- SpServerError(final String errorKey, final String message) {
- key = errorKey;
+ SpServerError(final String key, final String message) {
+ this.key = key;
this.message = message;
}
-
- /**
- * Gets the key of the error
- *
- * @return the key of the error
- */
- public String getKey() {
- return key;
- }
-
- /**
- * Gets the message of the error
- *
- * @return message of the error
- */
- public String getMessage() {
- return message;
- }
-
-}
+}
\ No newline at end of file