directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject directory-fortress-core git commit: FC-191 - filterbuf is null guaranteed to be dereferenced
Date Mon, 10 Oct 2016 16:49:16 GMT
Repository: directory-fortress-core
Updated Branches:
  refs/heads/master a6a56e290 -> 50164fff2


FC-191 - filterbuf is null guaranteed to be dereferenced


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

Branch: refs/heads/master
Commit: 50164fff28b702519fd394069b88750a0c08b451
Parents: a6a56e2
Author: Shawn McKinney <smckinney@apache.org>
Authored: Mon Oct 10 11:27:51 2016 -0500
Committer: Shawn McKinney <smckinney@apache.org>
Committed: Mon Oct 10 11:27:51 2016 -0500

----------------------------------------------------------------------
 .../java/org/apache/directory/fortress/core/impl/RoleDAO.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/50164fff/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java b/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java
index 854e56d..0f7b988 100755
--- a/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java
+++ b/src/main/java/org/apache/directory/fortress/core/impl/RoleDAO.java
@@ -479,7 +479,7 @@ final class RoleDAO extends LdapDataProvider
         List<Role> roleList = new ArrayList<>();
         LdapConnection ld = null;
         String roleRoot = getRootDn( group.getContextId(), GlobalIds.ROLE_ROOT );
-        StringBuilder filterbuf = null;
+        StringBuilder filterbuf = new StringBuilder();
 
         try
         {
@@ -489,7 +489,6 @@ final class RoleDAO extends LdapDataProvider
             List<String> members = group.getMembers();
             if ( CollectionUtils.isNotEmpty( members ) )
             {
-                filterbuf = new StringBuilder();
                 filterbuf.append( GlobalIds.FILTER_PREFIX );
                 filterbuf.append( GlobalIds.ROLE_OBJECT_CLASS_NM );
                 filterbuf.append( ")(" );


Mime
View raw message