summaryrefslogtreecommitdiffstats
path: root/shiro
diff options
context:
space:
mode:
authorMaciej Wejs <maciej.wejs@nokia.com>2018-07-16 16:42:23 +0200
committerMaciej Wejs <maciej.wejs@nokia.com>2018-08-08 13:08:45 +0200
commitf726b3efa60206109bb41c1a97697212d8f732af (patch)
tree9cfc99ffc7ff61ad2496295f6f06e92f15838375 /shiro
parenta7f4def785c9e169ebcb4785d7561505e47f3fc0 (diff)
Sonar fixes related to exceptions
Fixes in aaf-cadi-aaf module This one is related to ticket in main repo Change-Id: I1eeaba545d9cc3b3c07ba53ec12500cdb5567742 Issue-ID: AAF-396 Signed-off-by: Maciej Wejs <maciej.wejs@nokia.com>
Diffstat (limited to 'shiro')
-rw-r--r--shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFRealm.java4
-rw-r--r--shiro/src/test/java/org/onap/aaf/cadi/shiro/test/JU_AAFRealm.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFRealm.java b/shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFRealm.java
index 006547a..ccdaf73 100644
--- a/shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFRealm.java
+++ b/shiro/src/main/java/org/onap/aaf/cadi/shiro/AAFRealm.java
@@ -89,7 +89,7 @@ public class AAFRealm extends AuthorizingRealm {
String err;
try {
err = authn.validate(upt.getUsername(),password);
- } catch (IOException|CadiException e) {
+ } catch (IOException e) {
err = "Credential cannot be validated";
access.log(e, err);
}
@@ -122,7 +122,7 @@ public class AAFRealm extends AuthorizingRealm {
protected AAFAuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
access.log(Level.DEBUG, "AAFRealm.doGetAuthenthorizationInfo");
Principal bait = (Principal)principals.getPrimaryPrincipal();
- List<Permission> pond = new ArrayList<Permission>();
+ List<Permission> pond = new ArrayList<>();
authz.fishAll(bait,pond);
return new AAFAuthorizationInfo(access,bait,pond);
diff --git a/shiro/src/test/java/org/onap/aaf/cadi/shiro/test/JU_AAFRealm.java b/shiro/src/test/java/org/onap/aaf/cadi/shiro/test/JU_AAFRealm.java
index add449c..591a56c 100644
--- a/shiro/src/test/java/org/onap/aaf/cadi/shiro/test/JU_AAFRealm.java
+++ b/shiro/src/test/java/org/onap/aaf/cadi/shiro/test/JU_AAFRealm.java
@@ -59,9 +59,9 @@ public class JU_AAFRealm {
// }
// }
- private void testAPerm(boolean expect,AuthorizationInfo azi, String type, String instance, String action) {
+ private void testAPerm(boolean expect, AuthorizationInfo azi, String name, String type, String instance, String action) {
- AAFShiroPermission testPerm = new AAFShiroPermission(new AAFPermission(type,instance,action,new ArrayList<String>()));
+ AAFShiroPermission testPerm = new AAFShiroPermission(new AAFPermission(type,name,instance,action,new ArrayList<String>()));
boolean any = false;
for(Permission p : azi.getObjectPermissions()) {