jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1360733 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java
Date Thu, 12 Jul 2012 15:45:31 GMT
Author: mduerig
Date: Thu Jul 12 15:45:30 2012
New Revision: 1360733

URL: http://svn.apache.org/viewvc?rev=1360733&view=rev
Log:
OAK-184: Allow PropertyState.getValues() to work on single-valued properties
collapse identical branches in if statement

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java?rev=1360733&r1=1360732&r2=1360733&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/EmptyPropertyState.java
Thu Jul 12 15:45:30 2012
@@ -18,14 +18,14 @@
  */
 package org.apache.jackrabbit.oak.plugins.memory;
 
-import org.apache.jackrabbit.oak.api.CoreValue;
-import org.apache.jackrabbit.oak.api.PropertyState;
-
 import java.util.Collections;
 import java.util.List;
 
 import javax.annotation.Nonnull;
 
+import org.apache.jackrabbit.oak.api.CoreValue;
+import org.apache.jackrabbit.oak.api.PropertyState;
+
 /**
  * Property state that contains an empty array of values. Used as a base
  * class for {@link SinglePropertyState} and {@link MultiPropertyState}.
@@ -102,11 +102,7 @@ class EmptyPropertyState implements Prop
 
     @Override
     public String toString() {
-        if (isArray()) {
-            return getName() + '=' + getValues();
-        } else {
-            return getName() + '=' + getValues();
-        }
+        return getName() + '=' + getValues();
     }
 
 }



Mime
View raw message