You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by sm...@apache.org on 2015/02/11 18:15:46 UTC

directory-fortress-core git commit: FC-64 - AdminRoleDAO.unload has NPE

Repository: directory-fortress-core
Updated Branches:
  refs/heads/master 59297a9e2 -> 20fd327af


FC-64 - AdminRoleDAO.unload has NPE


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

Branch: refs/heads/master
Commit: 20fd327af415712051b2b77bc06ffbba032e8f2b
Parents: 59297a9
Author: Shawn McKinney <sm...@apache.org>
Authored: Wed Feb 11 11:15:34 2015 -0600
Committer: Shawn McKinney <sm...@apache.org>
Committed: Wed Feb 11 11:15:34 2015 -0600

----------------------------------------------------------------------
 .../org/apache/directory/fortress/core/rbac/AdminRoleDAO.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/20fd327a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
index 1f17b2a..3b006c6 100755
--- a/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/rbac/AdminRoleDAO.java
@@ -22,6 +22,7 @@ package org.apache.directory.fortress.core.rbac;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
 
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
@@ -674,12 +675,12 @@ final class AdminRoleDAO extends ApacheDsDataProvider
         AdminRole entity = new ObjectFactory().createAdminRole();
         entity.setSequenceId( sequence );
         entity.setId( getAttribute( le, GlobalIds.FT_IID ) );
-        entity.setName( getAttribute( le, ROLE_NM ) );
         entity.setDescription( getAttribute( le, SchemaConstants.DESCRIPTION_AT ) );
         entity.setOccupants( getAttributes( le, ROLE_OCCUPANT ) );
         entity.setOsP( getAttributeSet( le, ROLE_OSP ) );
         entity.setOsU( getAttributeSet( le, ROLE_OSU ) );
         unloadTemporal( le, entity );
+        entity.setName( getAttribute( le, ROLE_NM ) );
         entity.setRoleRangeRaw( getAttribute( le, ROLE_RANGE ) );
         //entity.setParents(AdminRoleUtil.getParents(entity.getName().toUpperCase(), contextId));
         entity.setParents( getAttributeSet( le, GlobalIds.PARENT_NODES ) );