jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1467265 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
Date Fri, 12 Apr 2013 13:29:42 GMT
Author: mduerig
Date: Fri Apr 12 13:29:42 2013
New Revision: 1467265

URL: http://svn.apache.org/r1467265
Log:
simplify, avoid multiple calls to toString

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java?rev=1467265&r1=1467264&r2=1467265&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
Fri Apr 12 13:29:42 2013
@@ -161,8 +161,9 @@ class KernelNodeStoreBranch extends Abst
                 } else {
                     // commit into branch and merge
                     head.compareAgainstBaseState(store.getRootState(headRevision), diff);
-                    if (diff.toString().length() > 0) {
-                        headRevision = kernel.commit("", diff.toString(), headRevision, null);
+                    String jsop = diff.toString();
+                    if (!jsop.isEmpty()) {
+                        headRevision = kernel.commit("", jsop, headRevision, null);
                     }
                     newRevision = kernel.merge(headRevision, null);
                     headRevision = null;



Mime
View raw message