directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject [2/2] directory-fortress-realm git commit: FC-109: use apache commons utils instead
Date Tue, 09 Jun 2015 03:19:20 GMT
FC-109: use apache commons utils instead


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

Branch: refs/heads/master
Commit: a34d3cdd0ba7051f17ab65218c7ed6895744d2fd
Parents: fb2c1dc
Author: Shawn McKinney <smckinney@apache.org>
Authored: Mon Jun 8 22:18:24 2015 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Mon Jun 8 22:18:24 2015 -0500

----------------------------------------------------------------------
 .../org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java   | 4 ++--
 .../apache/directory/fortress/realm/tomcat/TcAccessMgrImpl.java  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/blob/a34d3cdd/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
----------------------------------------------------------------------
diff --git a/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
b/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
index 8fc5127..7407639 100644
--- a/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
+++ b/impl/src/main/java/org/apache/directory/fortress/realm/J2eePolicyMgrImpl.java
@@ -30,6 +30,7 @@ import java.util.List;
 import java.security.Principal;
 import java.util.Set;
 
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.directory.fortress.core.GlobalIds;
 import org.apache.directory.fortress.core.ReviewMgr;
 import org.apache.directory.fortress.core.ReviewMgrFactory;
@@ -40,7 +41,6 @@ import org.apache.directory.fortress.core.GlobalErrIds;
 import org.apache.directory.fortress.core.model.User;
 import org.apache.directory.fortress.core.model.Role;
 import org.apache.directory.fortress.core.model.Session;
-import org.apache.directory.fortress.core.util.ObjUtil;
 import org.apache.directory.fortress.core.util.VUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -244,7 +244,7 @@ public class J2eePolicyMgrImpl implements J2eePolicyMgr
         User user = new User( userId, password );
         
         // Load the passed in role list into list of User requested roles:
-        if ( ObjUtil.isNotNullOrEmpty( roles ) )
+        if ( CollectionUtils.isNotEmpty( roles ) )
         {
             for(String role : roles)
             {

http://git-wip-us.apache.org/repos/asf/directory-fortress-realm/blob/a34d3cdd/impl/src/main/java/org/apache/directory/fortress/realm/tomcat/TcAccessMgrImpl.java
----------------------------------------------------------------------
diff --git a/impl/src/main/java/org/apache/directory/fortress/realm/tomcat/TcAccessMgrImpl.java
b/impl/src/main/java/org/apache/directory/fortress/realm/tomcat/TcAccessMgrImpl.java
index 5b23a09..1fab25c 100644
--- a/impl/src/main/java/org/apache/directory/fortress/realm/tomcat/TcAccessMgrImpl.java
+++ b/impl/src/main/java/org/apache/directory/fortress/realm/tomcat/TcAccessMgrImpl.java
@@ -19,9 +19,9 @@
  */
 package org.apache.directory.fortress.realm.tomcat;
 
+import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.directory.fortress.core.SecurityException;
-import org.apache.directory.fortress.core.util.ObjUtil;
 import org.apache.directory.fortress.realm.J2eePolicyMgr;
 import org.apache.directory.fortress.realm.J2eePolicyMgrFactory;
 import org.apache.directory.fortress.realm.TcPrincipal;
@@ -87,7 +87,7 @@ public class TcAccessMgrImpl implements TcAccessMgr
         try
         {
             // If a 'default.roles' property set in config, user them
-            if ( ObjUtil.isNotNullOrEmpty( defaultRoles ) )
+            if ( CollectionUtils.isNotEmpty( defaultRoles ) )
             {
                 principal = j2eeMgr.createSession( userId, password, defaultRoles );
                 LOG.debug( "{}.authenticate userId [{}], with default roles[{}], successful",
CLS_NM, userId, defaultRoles );


Mime
View raw message