Merge branch 'master' into feature_boot_13_sec_41

Conflicts:
	hawkbit-artifact-repository-mongo/src/test/java/org/eclipse/hawkbit/artifact/FreePortFileWriter.java
	hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/FreePortFileWriter.java


Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-08-19 08:35:58 +02:00
211 changed files with 3171 additions and 2044 deletions

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.rest.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 an request body is not well formaned and
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class MessageNotReadableException extends SpServerRtException {
public class MessageNotReadableException extends AbstractServerRtException {
/**
*

View File

@@ -16,7 +16,7 @@ import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.exception.ExceptionUtils;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
import org.eclipse.hawkbit.repository.exception.MultiPartFileUploadException;
import org.eclipse.hawkbit.rest.json.model.ExceptionInfo;
import org.slf4j.Logger;
@@ -75,7 +75,7 @@ public class ResponseExceptionHandler {
}
/**
* method for handling exception of type SpServerRtException. Called by the
* method for handling exception of type AbstractServerRtException. Called by the
* Spring-Framework for exception handling.
*
* @param request
@@ -86,14 +86,14 @@ public class ResponseExceptionHandler {
* @return the entity to be responded containing the exception information
* as entity.
*/
@ExceptionHandler(SpServerRtException.class)
@ExceptionHandler(AbstractServerRtException.class)
public ResponseEntity<ExceptionInfo> handleSpServerRtExceptions(final HttpServletRequest request,
final Exception ex) {
logRequest(request, ex);
final ExceptionInfo response = createExceptionInfo(ex);
final HttpStatus responseStatus;
if (ex instanceof SpServerRtException) {
responseStatus = getStatusOrDefault(((SpServerRtException) ex).getError());
if (ex instanceof AbstractServerRtException) {
responseStatus = getStatusOrDefault(((AbstractServerRtException) ex).getError());
} else {
responseStatus = DEFAULT_RESPONSE_STATUS;
}
@@ -152,8 +152,8 @@ public class ResponseExceptionHandler {
final ExceptionInfo response = new ExceptionInfo();
response.setMessage(ex.getMessage());
response.setExceptionClass(ex.getClass().getName());
if (ex instanceof SpServerRtException) {
response.setErrorCode(((SpServerRtException) ex).getError().getKey());
if (ex instanceof AbstractServerRtException) {
response.setErrorCode(((AbstractServerRtException) ex).getError().getKey());
}
return response;

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.rest.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 sort parameter syntax.
@@ -18,7 +18,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class SortParameterSyntaxErrorException extends SpServerRtException {
public class SortParameterSyntaxErrorException extends AbstractServerRtException {
/**
*

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.rest.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 sort parameter direction
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class SortParameterUnsupportedDirectionException extends SpServerRtException {
public class SortParameterUnsupportedDirectionException extends AbstractServerRtException {
/**
*

View File

@@ -9,7 +9,7 @@
package org.eclipse.hawkbit.rest.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 sort
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.exception.SpServerRtException;
*
*
*/
public class SortParameterUnsupportedFieldException extends SpServerRtException {
public class SortParameterUnsupportedFieldException extends AbstractServerRtException {
/**
*

View File

@@ -69,13 +69,10 @@ public class ByteRange {
return total;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() { // NOSONAR - as this is generated
// NOSONAR - as this is generated
@SuppressWarnings("squid:S864")
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (int) (end ^ end >>> 32);
@@ -85,11 +82,6 @@ public class ByteRange {
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(final Object obj) { // NOSONAR - as this is generated
if (this == obj) {

View File

@@ -9,12 +9,12 @@
package org.eclipse.hawkbit.rest.util;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.exception.SpServerRtException;
import org.eclipse.hawkbit.exception.AbstractServerRtException;
/**
* Thrown if artifact content streaming to client failed.
*/
public final class FileSteamingFailedException extends SpServerRtException {
public final class FileSteamingFailedException extends AbstractServerRtException {
private static final long serialVersionUID = 1L;