jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexparvule...@apache.org
Subject svn commit: r1350542 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
Date Fri, 15 Jun 2012 09:00:32 GMT
Author: alexparvulescu
Date: Fri Jun 15 09:00:31 2012
New Revision: 1350542

URL: http://svn.apache.org/viewvc?rev=1350542&view=rev
Log:
JCR-3343 ClusterNode's updateCommited method throws NPE - patch contributed by Mete Atamel

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java?rev=1350542&r1=1350541&r2=1350542&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
Fri Jun 15 09:00:31 2012
@@ -683,7 +683,8 @@ public class ClusterNode implements Runn
 
                 log.debug("Stored record '{}' to Journal ({})", recordRevision, journalUpdateSize);
 
-                long updateSize = (Long)update.getAttribute(ATTRIBUTE_UPDATE_SIZE);
+                Object updateSizeValue = update.getAttribute(ATTRIBUTE_UPDATE_SIZE);
+                long updateSize = updateSizeValue != null? (Long)updateSizeValue : 0;
                 updateCount.compareAndSet(Integer.MAX_VALUE, 0);
 
                 auditLogger.info("[{}] {} {} ({})", new Object[]{updateCount.incrementAndGet(),




Mime
View raw message