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 variables
Date Fri, 29 May 2015 01:39:21 GMT
Repository: directory-fortress-commander
Updated Branches:
  refs/heads/master fa8e0470f -> 61dd77b00


FC-105 - redundant variables


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

Branch: refs/heads/master
Commit: 61dd77b00a3f1827d24a94e8c546b68a5438c686
Parents: fa8e047
Author: Shawn McKinney <smckinney@apache.org>
Authored: Thu May 28 20:39:15 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Thu May 28 20:39:15 2015 -0500

----------------------------------------------------------------------
 .../fortress/web/panel/ObjectListPanel.java       |  1 -
 .../web/panel/ObjectSearchModalPanel.java         |  3 +--
 .../directory/fortress/web/panel/RequestMod.java  |  6 +-----
 .../fortress/web/panel/RoleSearchModalPanel.java  |  6 ++----
 .../fortress/web/panel/UserListPanel.java         | 18 +++++++++---------
 .../fortress/web/panel/UserSearchModalPanel.java  |  6 ++----
 6 files changed, 15 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/61dd77b0/src/main/java/org/apache/directory/fortress/web/panel/ObjectListPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/ObjectListPanel.java b/src/main/java/org/apache/directory/fortress/web/panel/ObjectListPanel.java
index 38dddd4..3876a76 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/ObjectListPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/ObjectListPanel.java
@@ -85,7 +85,6 @@ public class ObjectListPanel extends FormComponentPanel
     public ObjectListPanel( String id, final boolean isAdmin )
     {
         super( id );
-        boolean isAdmin1 = isAdmin;
         ObjectListModel objectListModel = new ObjectListModel( new PermObj( "" ), isAdmin,
             SecUtils.getSession( this ) );
         setDefaultModel( objectListModel );

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/61dd77b0/src/main/java/org/apache/directory/fortress/web/panel/ObjectSearchModalPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/ObjectSearchModalPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/ObjectSearchModalPanel.java
index da93d10..0492327 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/ObjectSearchModalPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/ObjectSearchModalPanel.java
@@ -117,7 +117,7 @@ public class ObjectSearchModalPanel extends Panel
 
     private LoadableDetachableModel getListViewModel()
     {
-        final LoadableDetachableModel ret = new LoadableDetachableModel()
+        return new LoadableDetachableModel()
         {
             /** Default serialVersionUID */
             private static final long serialVersionUID = 1L;
@@ -158,7 +158,6 @@ public class ObjectSearchModalPanel extends Panel
                 return objects;
             }
         };
-        return ret;
     }
 
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/61dd77b0/src/main/java/org/apache/directory/fortress/web/panel/RequestMod.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/RequestMod.java b/src/main/java/org/apache/directory/fortress/web/panel/RequestMod.java
index d434d32..c39eb56 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/RequestMod.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/RequestMod.java
@@ -125,12 +125,8 @@ class RequestMod implements Serializable
 
         RequestMod that = ( RequestMod ) o;
 
-        if ( !name.equals( that.name ) )
-        {
-            return false;
-        }
+        return name.equals( that.name );
 
-        return true;
     }
 
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/61dd77b0/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
index 6447713..2daae8d 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/RoleSearchModalPanel.java
@@ -95,7 +95,7 @@ public class RoleSearchModalPanel extends Panel
 
     private PageableListView createListView( final LoadableDetachableModel requests )
     {
-        final PageableListView listView = new PageableListView( "dataview", requests, 16
)
+        return new PageableListView( "dataview", requests, 16 )
         {
             /** Default serialVersionUID */
             private static final long serialVersionUID = 1L;
@@ -128,13 +128,12 @@ public class RoleSearchModalPanel extends Panel
                 item.add( new Label( "dayMask", new PropertyModel( item.getModel(), "dayMask"
) ) );
             }
         };
-        return listView;
     }
 
 
     private LoadableDetachableModel getListViewModel()
     {
-        final LoadableDetachableModel ret = new LoadableDetachableModel()
+        return new LoadableDetachableModel()
         {
             /** Default serialVersionUID */
             private static final long serialVersionUID = 1L;
@@ -193,7 +192,6 @@ public class RoleSearchModalPanel extends Panel
                 return roles;
             }
         };
-        return ret;
     }
 
     public UserRole getRoleSelection()

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/61dd77b0/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 4c0e3ff..8546282 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
@@ -97,20 +97,11 @@ public class UserListPanel extends FormComponentPanel
     private static final String PERMS = "P";
     private Permission permission;
     private SearchFields searchData = new SearchFields();
-    private static String PERM_OBJ_LABEL = "Object Name";
-    private static String PERM_OP_LABEL = "Operation Name";
     private static String USER_LABEL = "User ID";
-    private static String ROLE_LABEL = "Role Name";
-    private static String ADMIN_LABEL = "Admin Role Name";
-    private static String OU_LABEL = "Organization";
     private String field1Label = USER_LABEL;
     private String field2Label;
     private String searchFieldsLabel = USER_SEARCH_LABEL;
     private static String USER_SEARCH_LABEL = "Search By User";
-    private static String ROLE_SEARCH_LABEL = "Search By Role";
-    private static String ADMIN_SEARCH_LABEL = "Search By Admininstrative Role";
-    private static String OU_SEARCH_LABEL = "Search By User Organization";
-    private static String PERM_SEARCH_LABEL = "Search By Permission";
 
 
     public UserListPanel( String id )
@@ -794,7 +785,9 @@ public class UserListPanel extends FormComponentPanel
     {
         f2Fld.setVisible( false );
         f2Lbl.setVisible( false );
+        String OU_LABEL = "Organization";
         field1Label = OU_LABEL;
+        String OU_SEARCH_LABEL = "Search By User Organization";
         searchFieldsLabel = OU_SEARCH_LABEL;
     }
 
@@ -803,7 +796,9 @@ public class UserListPanel extends FormComponentPanel
     {
         f2Fld.setVisible( false );
         f2Lbl.setVisible( false );
+        String ADMIN_LABEL = "Admin Role Name";
         field1Label = ADMIN_LABEL;
+        String ADMIN_SEARCH_LABEL = "Search By Admininstrative Role";
         searchFieldsLabel = ADMIN_SEARCH_LABEL;
     }
 
@@ -812,7 +807,9 @@ public class UserListPanel extends FormComponentPanel
     {
         f2Fld.setVisible( false );
         f2Lbl.setVisible( false );
+        String ROLE_LABEL = "Role Name";
         field1Label = ROLE_LABEL;
+        String ROLE_SEARCH_LABEL = "Search By Role";
         searchFieldsLabel = ROLE_SEARCH_LABEL;
     }
 
@@ -830,8 +827,11 @@ public class UserListPanel extends FormComponentPanel
     {
         f2Fld.setVisible( true );
         f2Lbl.setVisible( true );
+        String PERM_OBJ_LABEL = "Object Name";
         field1Label = PERM_OBJ_LABEL;
+        String PERM_OP_LABEL = "Operation Name";
         field2Label = PERM_OP_LABEL;
+        String PERM_SEARCH_LABEL = "Search By Permission";
         searchFieldsLabel = PERM_SEARCH_LABEL;
     }
 

http://git-wip-us.apache.org/repos/asf/directory-fortress-commander/blob/61dd77b0/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
b/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
index 179b717..eefc900 100644
--- a/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
+++ b/src/main/java/org/apache/directory/fortress/web/panel/UserSearchModalPanel.java
@@ -85,7 +85,7 @@ public class UserSearchModalPanel extends Panel
 
     private PageableListView createListView( final LoadableDetachableModel requests )
     {
-        final PageableListView listView = new PageableListView( "userdataview", requests,
10 )
+        return new PageableListView( "userdataview", requests, 10 )
         {
             /** Default serialVersionUID */
             private static final long serialVersionUID = 1L;
@@ -128,13 +128,12 @@ public class UserSearchModalPanel extends Panel
                 } );
             }
         };
-        return listView;
     }
 
 
     private LoadableDetachableModel getListViewModel()
     {
-        final LoadableDetachableModel ret = new LoadableDetachableModel()
+        return new LoadableDetachableModel()
         {
             /** Default serialVersionUID */
             private static final long serialVersionUID = 1L;
@@ -172,7 +171,6 @@ public class UserSearchModalPanel extends Panel
                 return users;
             }
         };
-        return ret;
     }
 
 


Mime
View raw message