From 38feed8fdb2d20a6e2c54fe5e43e36b56e358814 Mon Sep 17 00:00:00 2001 From: "manuele.simi" Date: Fri, 29 Dec 2017 03:25:00 +0000 Subject: [PATCH] Remove fields in the CodeException. The code and associated message are held in the response embedded in the superclass. git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/resource-management/resource-manager@161925 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../manager/io/exceptions/CodeException.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeException.java b/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeException.java index 989f543..b9fd580 100644 --- a/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeException.java +++ b/io/src/main/java/org/gcube/resourcemanagement/manager/io/exceptions/CodeException.java @@ -13,29 +13,13 @@ public class CodeException extends WebApplicationException { private static final long serialVersionUID = 333945715086602250L; - private final int errorCode; - private final String errorMsg; - public CodeException(Response.Status status, ErrorCode code) { super(Response.status(status).entity(new CodeEntity(new SerializableErrorCode(code.getId(), code.getMessage()))) .build()); - this.errorMsg = code.getMessage(); - this.errorCode = code.getId(); } public CodeException(ErrorCode code) { super(Response.status(Response.Status.NOT_ACCEPTABLE) .entity(new CodeEntity(new SerializableErrorCode(code.getId(), code.getMessage()))).build()); - this.errorMsg = code.getMessage(); - this.errorCode = code.getId(); } - - public int getErrorCode() { - return errorCode; - } - - public String getErrorMsg() { - return errorMsg; - } - }