Sonar Fix:MusicServiceException,ReturnType 46/72546/1
authorArundathi Patil <arundpil@in.ibm.com>
Tue, 13 Nov 2018 14:17:19 +0000 (19:47 +0530)
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>
Tue, 13 Nov 2018 14:17:37 +0000 (19:47 +0530)
Fixed sonar isues/code-smells across this file

Issue-ID: MUSIC-180
Change-Id: I2ef2f6902b9d783a498c1fc69e383bc94f61fbc6
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
src/main/java/org/onap/music/exceptions/MusicServiceException.java
src/main/java/org/onap/music/main/ReturnType.java

index a3b1fc5..1f0264b 100644 (file)
@@ -32,26 +32,6 @@ public class MusicServiceException extends Exception {
     private int errorCode;
     private String errorMessage;
 
-    public int getErrorCode() {
-        return errorCode;
-    }
-
-
-    public void setErrorCode(int errorCode) {
-        this.errorCode = errorCode;
-    }
-
-
-    public String getErrorMessage() {
-        return errorMessage;
-    }
-
-
-    public void setErrorMessage(String errorMessage) {
-        this.errorMessage = errorMessage;
-    }
-
-
     public MusicServiceException() {
         super();
     }
@@ -76,9 +56,28 @@ public class MusicServiceException extends Exception {
 
 
     public MusicServiceException(String message, Throwable cause, boolean enableSuppression,
-                    boolean writableStackTrace) {
+                                 boolean writableStackTrace) {
         super(message, cause, enableSuppression, writableStackTrace);
 
     }
 
+    public int getErrorCode() {
+        return errorCode;
+    }
+
+
+    public void setErrorCode(int errorCode) {
+        this.errorCode = errorCode;
+    }
+
+
+    public String getErrorMessage() {
+        return errorMessage;
+    }
+
+
+    public void setErrorMessage(String errorMessage) {
+        this.errorMessage = errorMessage;
+    }
+
 }
index 1453a1b..33f68d7 100644 (file)
@@ -28,6 +28,8 @@ public class ReturnType {
     private ResultType result;
     private String message;
 
+    private String timingInfo;
+
     public ReturnType(ResultType result, String message) {
         super();
         this.result = result;
@@ -42,8 +44,6 @@ public class ReturnType {
         this.timingInfo = timingInfo;
     }
 
-    private String timingInfo;
-
     public ResultType getResult() {
         return result;
     }