aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-09-03 13:09:07 +0530
committerIBM602-PC0F1E3C\Arundathi <arundpil@in.ibm.com>2018-09-03 13:09:22 +0530
commit8cc6c6c866bd3c7f73399da341587ed35320f6c3 (patch)
treeb0c3c0d5a50d0f1430244b3e449318dd62c6e2bc
parent8b80c9a3005862032908478570f9c500bf0d9fb5 (diff)
AaflurAndFish.java - fixed sonar issue
Fixed sonar code-smells/issues across this file Issue-ID: DMAAP-702 Change-Id: Ie8b33704f8abab5bedb381fd7a544b3b204ba1eb Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
-rw-r--r--src/main/java/org/onap/dmaap/dbcapi/authentication/AafLurAndFish.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/org/onap/dmaap/dbcapi/authentication/AafLurAndFish.java b/src/main/java/org/onap/dmaap/dbcapi/authentication/AafLurAndFish.java
index b699a29..2366452 100644
--- a/src/main/java/org/onap/dmaap/dbcapi/authentication/AafLurAndFish.java
+++ b/src/main/java/org/onap/dmaap/dbcapi/authentication/AafLurAndFish.java
@@ -31,8 +31,6 @@ import org.onap.aaf.cadi.PropAccess;
import org.onap.aaf.misc.env.APIException;
import org.onap.dmaap.dbcapi.aaf.AafLurService;
import org.onap.dmaap.dbcapi.aaf.DmaapPerm;
-import org.onap.dmaap.dbcapi.logging.BaseLoggingClass;
-import org.onap.dmaap.dbcapi.server.Main;
import org.onap.dmaap.dbcapi.util.DmaapConfig;
@@ -45,7 +43,6 @@ public class AafLurAndFish implements ApiAuthorizationCheckInterface {
AafLurAndFish() throws AuthenticationErrorException {
- String[] args = new String[1];
DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
api_namespace = p.getProperty( "ApiNamespace", "org.onap.dmaap-bc.api");
@@ -61,13 +58,15 @@ public class AafLurAndFish implements ApiAuthorizationCheckInterface {
}
} catch ( IOException e ) {
logger.error( "Unable to load " + cadiprop );
+ logger.error("Error", e);
throw new AuthenticationErrorException( );
}
try {
PropAccess myAccess = new PropAccess( props );
svc = AafLurService.getInstance(myAccess);
- } catch (APIException | CadiException | LocatorException e ) {
+ } catch (APIException | CadiException | LocatorException e ) {
+ logger.error("Error", e);
logger.error( e.toString() );
throw new AuthenticationErrorException();
}
@@ -78,10 +77,12 @@ public class AafLurAndFish implements ApiAuthorizationCheckInterface {
try {
boolean resp = svc.checkPerm( api_namespace, mechid, pwd, p );
- if ( resp == false ) {
+ boolean flag = false;
+ if ( resp == flag ) {
throw new AuthenticationErrorException();
}
} catch ( IOException | CadiException e ) {
+ logger.error("Error", e);
logger.error( e.toString() );
throw new AuthenticationErrorException();
}