aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorRam Koya <rk541m@att.com>2018-09-04 13:11:57 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-04 13:11:57 +0000
commitb809e5df951fa8d1de40aebbce862da6436fc2fe (patch)
tree3927247d5b21b08d33ff288a748e94ed2f55148a /src/main/java
parentfbcfeaab1d5ef0cecb0c4212b8ec9088d2408e38 (diff)
parent8cc6c6c866bd3c7f73399da341587ed35320f6c3 (diff)
Merge "AaflurAndFish.java - fixed sonar issue"
Diffstat (limited to 'src/main/java')
-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();
}