diff options
author | Jonathan Gathman <jonathan.gathman@att.com> | 2018-07-20 21:57:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-07-20 21:57:39 +0000 |
commit | 3aca33c5bb9af1ba4df574ceb90435f54d14ccf5 (patch) | |
tree | f82fc2f991104e0c144a1d29c8741564c88f19c0 /auth | |
parent | 5a081a25fd94da790a59a68195a19bc0ef7aa20c (diff) | |
parent | c91b63bb275b8d541309d7e1e8faa4f0bc752630 (diff) |
Merge "Sonar fixes related to exceptions"
Diffstat (limited to 'auth')
-rw-r--r-- | auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java | 9 | ||||
-rw-r--r-- | auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java index 0c28c7ca..bb6f1986 100644 --- a/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java +++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/server/AbsService.java @@ -136,16 +136,13 @@ public abstract class AbsService<ENV extends BasicEnv, TRANS extends Trans> exte * @return * @throws LocatorException */ - protected synchronized AAFConHttp _newAAFConHttp() throws CadiException, LocatorException { - try { + protected synchronized AAFConHttp _newAAFConHttp() throws CadiException, LocatorException { if(aafCon==null) { aafCon = new AAFConHttp(access); - } + } return aafCon; - } catch (APIException e) { - throw new CadiException(e); + } - } // This is a method, so we can overload for AAFAPI public String aaf_url() { diff --git a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java index 8371ff14..9f25eab7 100644 --- a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java +++ b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/AAF_Locate.java @@ -191,10 +191,9 @@ public class AAF_Locate extends AbsService<AuthzEnv, AuthzTrans> { } // utilize pre-constructed DirectAAFLocator return new AAFConHttp(env.access(),dal); - } catch (APIException | LocatorException e) { + } catch (LocatorException e) { throw new CadiException(e); } - } public Locator<URI> getGUILocator() throws LocatorException { |