directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-commander git commit: add try/catch around body
Date Sun, 17 Sep 2017 14:09:46 GMT
Repository: directory-fortress-commander
Updated Branches:
  refs/heads/master 5ae3804b0 -> 55c5df90f


add try/catch around body


Project: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/commit/55c5df90
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/tree/55c5df90
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/diff/55c5df90

Branch: refs/heads/master
Commit: 55c5df90f0e54bc1da64e7447d0c2ba70d04be77
Parents: 5ae3804
Author: Shawn McKinney <smckinney@apache.org>
Authored: Fri Sep 15 08:02:19 2017 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Fri Sep 15 08:02:19 2017 -0500

----------------------------------------------------------------------
 .../directory/fortress/web/control/SecUtils.java      | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/55c5df90/src/main/java/org/apache/directory/fortress/web/control/SecUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/control/SecUtils.java b/src/main/java/org/apache/directory/fortress/web/control/SecUtils.java
index 08d94f5..746c19e 100644
--- a/src/main/java/org/apache/directory/fortress/web/control/SecUtils.java
+++ b/src/main/java/org/apache/directory/fortress/web/control/SecUtils.java
@@ -125,7 +125,19 @@ public class SecUtils
      */
     public static List<Permission> getPermissions(Component component)
     {
-        return ( ( WicketSession ) component.getSession() ).getPermissions();
+        List<Permission> perms;
+        try
+        {
+            WicketSession wSess = ( WicketSession )component.getSession();
+            perms = wSess.getPermissions();
+        }
+        catch(Exception e)
+        {
+            String error = "getPermissions caught Exception=" + e;
+            LOG.error( error );
+            throw new RuntimeException( error );
+        }
+        return perms;
     }
 
     /**


Mime
View raw message