jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r937290 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/ jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ jackrabbit-s...
Date Fri, 23 Apr 2010 13:40:59 GMT
Author: stefan
Date: Fri Apr 23 13:40:59 2010
New Revision: 937290

URL: http://svn.apache.org/viewvc?rev=937290&view=rev
Log:
#0000 avoid unnecessary object creation

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
    jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
    jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/NodeInfoImpl.java
    jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventFactory.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java?rev=937290&r1=937289&r2=937290&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionImpl.java
Fri Apr 23 13:40:59 2010
@@ -401,7 +401,7 @@ class InternalVersionImpl extends Intern
      */
     synchronized Name[] internalGetLabels() {
         if (labelCache == null) {
-            return new Name[0];
+            return Name.EMPTY_ARRAY;
         } else {
             return labelCache.toArray(new Name[labelCache.size()]);
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java?rev=937290&r1=937289&r2=937290&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/virtual/AbstractVISProvider.java
Fri Apr 23 13:40:59 2010
@@ -279,7 +279,7 @@ public abstract class AbstractVISProvide
         if (id == null) {
             id = new NodeId();
         }
-        state = new VirtualNodeState(this, parent.getNodeId(), id, nodeTypeName, new Name[0]);
+        state = new VirtualNodeState(this, parent.getNodeId(), id, nodeTypeName, Name.EMPTY_ARRAY);
 
         cache(state);
         return state;

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=937290&r1=937289&r2=937290&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Fri Apr 23 13:40:59 2010
@@ -799,7 +799,7 @@ public class NodeImpl extends ItemImpl i
             } catch (RepositoryException e) {
                 // should never occur
                 log.warn("Internal error", e);
-                mixinValue = new Name[0];
+                mixinValue = Name.EMPTY_ARRAY;
             }
         }
         List<Name> l = new ArrayList<Name>();

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java?rev=937290&r1=937289&r2=937290&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/nodetype/NodeTypeTemplateImpl.java
Fri Apr 23 13:40:59 2010
@@ -63,7 +63,7 @@ public class NodeTypeTemplateImpl implem
         // TODO: see https://jsr-283.dev.java.net/issues/show_bug.cgi?id=798
         queryable = true;
         // TODO see https://jsr-283.dev.java.net/issues/show_bug.cgi?id=797
-        superTypeNames = new Name[0];
+        superTypeNames = Name.EMPTY_ARRAY;
         this.resolver = resolver;
     }
 

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java?rev=937290&r1=937289&r2=937290&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2dav/QueryInfoImpl.java
Fri Apr 23 13:40:59 2010
@@ -96,7 +96,7 @@ public class QueryInfoImpl implements Qu
     public Name[] getSelectorNames() {
         if (results.isEmpty()) {
             // TODO: this is not correct
-            return new Name[0];
+            return Name.EMPTY_ARRAY;
         } else {
             Set<Name> uniqueNames = new HashSet<Name>();
             QueryResultRowImpl row = (QueryResultRowImpl) results.get(0);

Modified: jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/NodeInfoImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/NodeInfoImpl.java?rev=937290&r1=937289&r2=937290&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/NodeInfoImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2dav/src/main/java/org/apache/jackrabbit/spi2davex/NodeInfoImpl.java
Fri Apr 23 13:40:59 2010
@@ -44,7 +44,7 @@ public class NodeInfoImpl extends ItemIn
     private NodeId id;
     private String uniqueID;
     private Name primaryNodeTypeName;
-    private Name[] mixinNodeTypeNames = new Name[0];
+    private Name[] mixinNodeTypeNames = Name.EMPTY_ARRAY;
 
     private final Set<PropertyInfo> propertyInfos = new LinkedHashSet<PropertyInfo>();
     private Set<ChildInfo> childInfos = null;

Modified: jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventFactory.java?rev=937290&r1=937289&r2=937290&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventFactory.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi2jcr/src/main/java/org/apache/jackrabbit/spi2jcr/EventFactory.java
Fri Apr 23 13:40:59 2010
@@ -103,7 +103,7 @@ class EventFactory {
         }
 
         Name nodeTypeName = null;
-        Name[] mixinTypes = new Name[0];
+        Name[] mixinTypes = Name.EMPTY_ARRAY;
         if (node != null) {
             try {
                 parentId = idFactory.createNodeId(node.getUUID(), null);



Mime
View raw message