Author: cziegeler Date: Thu May 8 08:52:29 2014 New Revision: 1593207 URL: http://svn.apache.org/r1593207 Log: Minor optimization of getting property values for a value map implementation
Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/JcrPropertyMapCacheEntry.java Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/JcrPropertyMapCacheEntry.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/JcrPropertyMapCacheEntry.java?rev=1593207&r1=1593206&r2=1593207&view=diff ============================================================================== --- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/JcrPropertyMapCacheEntry.java (original) +++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/JcrPropertyMapCacheEntry.java Thu May 8 08:52:29 2014 @@ -75,9 +75,8 @@ public class JcrPropertyMapCacheEntry { isMulti = false; values = new Value[] {prop.getValue()}; } - Object tmp = JcrResourceUtil.toJavaObject(prop); if (isDefaultValueCacheable()) { - this.defaultValue = tmp; + this.defaultValue = JcrResourceUtil.toJavaObject(prop); } else { this.defaultValue = null; } @@ -150,6 +149,4 @@ public class JcrPropertyMapCacheEntry { private boolean isDefaultValueCacheable() throws RepositoryException { return property.getType() != PropertyType.BINARY; } - - } \ No newline at end of file