From: Bharath Balasubramanian Date: Thu, 20 Dec 2018 06:38:36 +0000 (+0000) Subject: Merge "Fixed Sonar issues in JsonUpdate" X-Git-Tag: 2.5.8~74 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=96ef5c6619f7fa4d0c3506c1a646335776bbe96e;hp=a953042bfebbfea013a0725b19f33da2aef9a6d6;p=music.git Merge "Fixed Sonar issues in JsonUpdate" --- diff --git a/src/main/java/org/onap/music/exceptions/MusicServiceException.java b/src/main/java/org/onap/music/exceptions/MusicServiceException.java index 1f0264b3..76e1f948 100644 --- a/src/main/java/org/onap/music/exceptions/MusicServiceException.java +++ b/src/main/java/org/onap/music/exceptions/MusicServiceException.java @@ -4,6 +4,8 @@ * =================================================================== * Copyright (c) 2017 AT&T Intellectual Property * =================================================================== + * Modifications Copyright (C) 2018 IBM. + * =================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -41,8 +43,18 @@ public class MusicServiceException extends Exception { super(message); } - - + + public MusicServiceException(String message, int errorCode) { + super(message); + this.errorCode=errorCode; + } + + public MusicServiceException(String message, int errorCode, String errorMessage) { + super(message); + this.errorCode=errorCode; + this.errorMessage=errorMessage; + } + public MusicServiceException(Throwable cause) { super(cause); @@ -60,24 +72,17 @@ public class MusicServiceException extends Exception { super(message, cause, enableSuppression, writableStackTrace); } + public void setErrorCode(int errorCode) { + this.errorCode=errorCode; + } public int getErrorCode() { return errorCode; } - - - public void setErrorCode(int errorCode) { - this.errorCode = errorCode; + public void setErrorMessage(String errorMessage) { + this.errorMessage=errorMessage; } - - public String getErrorMessage() { return errorMessage; } - - - public void setErrorMessage(String errorMessage) { - this.errorMessage = errorMessage; - } - }