Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87B3C17C43 for ; Wed, 11 Feb 2015 18:19:39 +0000 (UTC) Received: (qmail 16716 invoked by uid 500); 11 Feb 2015 18:19:39 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 16668 invoked by uid 500); 11 Feb 2015 18:19:39 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 16658 invoked by uid 99); 11 Feb 2015 18:19:39 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Feb 2015 18:19:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3ADC2E028F; Wed, 11 Feb 2015 18:19:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: smckinney@apache.org To: commits@directory.apache.org Message-Id: <3e50ea268e574133b8eb9a79fa41116c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: directory-fortress-core git commit: FC-64 - npe caused by malfunctioned read Date: Wed, 11 Feb 2015 18:19:39 +0000 (UTC) Repository: directory-fortress-core Updated Branches: refs/heads/master b5cb0d9de -> f397ef2eb FC-64 - npe caused by malfunctioned read 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/f397ef2e Tree: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/tree/f397ef2e Diff: http://git-wip-us.apache.org/repos/asf/directory-fortress-core/diff/f397ef2e Branch: refs/heads/master Commit: f397ef2eb7aeeb5f479d76e003263fe6318311a1 Parents: b5cb0d9 Author: Shawn McKinney Authored: Wed Feb 11 12:19:26 2015 -0600 Committer: Shawn McKinney Committed: Wed Feb 11 12:19:26 2015 -0600 ---------------------------------------------------------------------- .../apache/directory/fortress/core/rbac/AdminRoleDAO.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/directory-fortress-core/blob/f397ef2e/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 78a7b46..b9b97d8 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 @@ -427,8 +427,10 @@ final class AdminRoleDAO extends ApacheDsDataProvider { ld = getAdminConnection(); Entry findEntry = read( ld, dn, ROLE_ATRS ); - entity = unloadLdapEntry( findEntry, 0, adminRole.getContextId() ); - + if(findEntry != null) + { + entity = unloadLdapEntry( findEntry, 0, adminRole.getContextId() ); + } if ( entity == null ) { String warning = "getRole name [" + adminRole.getName() + "] no entry found dn [" + dn + "]"; @@ -680,7 +682,7 @@ final class AdminRoleDAO extends ApacheDsDataProvider entity.setOsP( getAttributeSet( le, ROLE_OSP ) ); entity.setOsU( getAttributeSet( le, ROLE_OSU ) ); unloadTemporal( le, entity ); - entity.setName( getAttribute( le, ROLE_NM ) ); + entity.setName( getAttribute( le, SchemaConstants.CN_AT ) ); entity.setRoleRangeRaw( getAttribute( le, ROLE_RANGE ) ); //entity.setParents(AdminRoleUtil.getParents(entity.getName().toUpperCase(), contextId)); entity.setParents( getAttributeSet( le, GlobalIds.PARENT_NODES ) );