directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r996346 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Date Sun, 12 Sep 2010 17:39:33 GMT
Author: kayyagari
Date: Sun Sep 12 17:39:32 2010
New Revision: 996346

URL: http://svn.apache.org/viewvc?rev=996346&view=rev
Log:
o fixed a NPE which will arise when replication is not enabled

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=996346&r1=996345&r2=996346&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
Sun Sep 12 17:39:32 2010
@@ -153,7 +153,7 @@ public class DefaultPartitionNexus exten
 
     final List<Modification> mods = new ArrayList<Modification>( 2 );
 
-    private String lastSyncedCtxCsn = "";
+    private String lastSyncedCtxCsn = null;
 
 
     /**
@@ -445,7 +445,7 @@ public class DefaultPartitionNexus exten
         try
         {
             // update only if the CSN changes
-            if ( !lastSyncedCtxCsn.equals( directoryService.getContextCsn() ) )
+            if ( ( lastSyncedCtxCsn != null ) && !lastSyncedCtxCsn.equals( directoryService.getContextCsn()
) )
             {
                 lastSyncedCtxCsn = directoryService.getContextCsn();
 



Mime
View raw message