Fixed sonar code-smells/issues across this file
Issue-ID: DMAAP-702
Change-Id: Ie8b33704f8abab5bedb381fd7a544b3b204ba1eb
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
import org.onap.aaf.misc.env.APIException;
import org.onap.dmaap.dbcapi.aaf.AafLurService;
import org.onap.dmaap.dbcapi.aaf.DmaapPerm;
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;
import org.onap.dmaap.dbcapi.util.DmaapConfig;
AafLurAndFish() throws AuthenticationErrorException {
AafLurAndFish() throws AuthenticationErrorException {
- String[] args = new String[1];
DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
api_namespace = p.getProperty( "ApiNamespace", "org.onap.dmaap-bc.api");
DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
api_namespace = p.getProperty( "ApiNamespace", "org.onap.dmaap-bc.api");
}
} catch ( IOException e ) {
logger.error( "Unable to load " + cadiprop );
}
} 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);
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();
}
logger.error( e.toString() );
throw new AuthenticationErrorException();
}
try {
boolean resp = svc.checkPerm( api_namespace, mechid, pwd, p );
try {
boolean resp = svc.checkPerm( api_namespace, mechid, pwd, p );
+ boolean flag = false;
+ if ( resp == flag ) {
throw new AuthenticationErrorException();
}
} catch ( IOException | CadiException e ) {
throw new AuthenticationErrorException();
}
} catch ( IOException | CadiException e ) {
+ logger.error("Error", e);
logger.error( e.toString() );
throw new AuthenticationErrorException();
}
logger.error( e.toString() );
throw new AuthenticationErrorException();
}