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: FC-105 - redundant null check
Date Sun, 24 May 2015 13:36:53 GMT
Repository: directory-fortress-commander
Updated Branches:
  refs/heads/master 79e328cda -> cb22ae575


FC-105 - redundant null check


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/cb22ae57
Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/tree/cb22ae57
Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/diff/cb22ae57

Branch: refs/heads/master
Commit: cb22ae57515ce975275445933f4dfdb89d457b9b
Parents: 79e328c
Author: Shawn McKinney <smckinney@apache.org>
Authored: Sun May 24 08:36:40 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Sun May 24 08:36:40 2015 -0500

----------------------------------------------------------------------
 .../directory/fortress/web/FortressWebBasePage.java    | 13 +++----------
 .../apache/directory/fortress/web/ObjectListModel.java |  2 +-
 .../directory/fortress/web/panel/UserListPanel.java    |  2 +-
 3 files changed, 5 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/cb22ae57/src/main/java/org/apache/directory/fortress/web/FortressWebBasePage.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/FortressWebBasePage.java b/src/main/java/org/apache/directory/fortress/web/FortressWebBasePage.java
index 46593fc..0d76db1 100644
--- a/src/main/java/org/apache/directory/fortress/web/FortressWebBasePage.java
+++ b/src/main/java/org/apache/directory/fortress/web/FortressWebBasePage.java
@@ -167,18 +167,11 @@ public abstract class FortressWebBasePage extends WebPage
             {
                 session = SecUtils.createSession( accessMgr, principal.getName() );
             }
+
             // Now load the fortress session into the Wicket session and let wicket hold
onto that for us.  Also retreive the arbac perms from server and cache those too.
-            if ( session != null )
-            {
-                synchronized ( ( WicketSession ) WicketSession.get() )
-                {
-                    SecUtils.loadPermissionsIntoSession( delAccessMgr, session );
-                }
-            }
-            // give up
-            else
+            synchronized ( ( WicketSession ) WicketSession.get() )
             {
-                throw new RuntimeException( "cannot create RBAC session for user: " + principal.getName()
);
+                SecUtils.loadPermissionsIntoSession( delAccessMgr, session );
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/cb22ae57/src/main/java/org/apache/directory/fortress/web/ObjectListModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/ObjectListModel.java b/src/main/java/org/apache/directory/fortress/web/ObjectListModel.java
index 045cbbc..c97b2f8 100644
--- a/src/main/java/org/apache/directory/fortress/web/ObjectListModel.java
+++ b/src/main/java/org/apache/directory/fortress/web/ObjectListModel.java
@@ -99,7 +99,7 @@ public class ObjectListModel extends Model<SerializableList<PermObj>>
         }
         else
         {
-            LOG.debug(".getObject userId: " + permObj != null ? permObj.getObjName() : "null");
+            LOG.debug(".getObject userId: " + permObj.getObjName());
             permObjs = new SerializableList<>( getList(permObj) );
         }
         

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/cb22ae57/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java
index 3001511..5f3f4e0 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/UserListPanel.java
@@ -522,7 +522,7 @@ public class UserListPanel extends FormComponentPanel
                 target.prependJavaScript( GlobalIds.WICKET_WINDOW_UNLOAD_CONFIRMATION_FALSE
);
                 ousModalWindow.show( target );
             }
-            
+
             @Override
             protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
             {


Mime
View raw message