directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [directory-server] branch master updated: Fix for DIRSERVER-2231. If the entryDnCache is not existing, we don't try to read it and get a NPE...
Date Tue, 03 Apr 2018 16:54:23 GMT
This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-server.git


The following commit(s) were added to refs/heads/master by this push:
     new 4a0a6b0  Fix for DIRSERVER-2231. If the entryDnCache is not existing, we don't try
to read it and get a NPE...
     new 7124084  Merge branch 'master' of https://gitbox.apache.org/repos/asf/directory-server
4a0a6b0 is described below

commit 4a0a6b018bed916e718127c0ad868d380b3a990a
Author: Emmanuel L├ęcharny <elecharny@symas.com>
AuthorDate: Tue Apr 3 18:50:23 2018 +0200

    Fix for DIRSERVER-2231. If the entryDnCache is not existing, we don't
    try to read it and get a NPE...
---
 .../core/partition/impl/btree/AbstractBTreePartition.java     | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
b/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
index d3981e9..a3e06ab 100644
--- a/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
+++ b/xdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/AbstractBTreePartition.java
@@ -2654,11 +2654,14 @@ public abstract class AbstractBTreePartition extends AbstractPartition
implement
         {
             rwLock.readLock().lock();
 
-            Element el = entryDnCache.get( id );
-            
-            if ( el != null )
+            if ( entryDnCache != null )
             {
-                return ( Dn ) el.getObjectValue();
+                Element el = entryDnCache.get( id );
+                
+                if ( el != null )
+                {
+                    return ( Dn ) el.getObjectValue();
+                }
             }
             
             do

-- 
To stop receiving notification emails like this one, please contact
elecharny@apache.org.

Mime
View raw message