jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r382385 - in /incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state: NodeState.java TransientItemStateManager.java
Date Thu, 02 Mar 2006 14:08:17 GMT
Author: stefan
Date: Thu Mar  2 06:08:16 2006
New Revision: 382385

URL: http://svn.apache.org/viewcvs?rev=382385&view=rev
Log:
- avoid unnecessary object creation
- make NodeState.ChildNodeEntry final to allow compiler to inline certain method calls

Modified:
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
    incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/TransientItemStateManager.java

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java?rev=382385&r1=382384&r2=382385&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
Thu Mar  2 06:08:16 2006
@@ -1332,7 +1332,7 @@
      * <p/>
      * <code>ChildNodeEntry</code> instances are immutable.
      */
-    public static class ChildNodeEntry {
+    public static final class ChildNodeEntry {
 
         private int hash = 0;
 

Modified: incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/TransientItemStateManager.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/TransientItemStateManager.java?rev=382385&r1=382384&r2=382385&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/TransientItemStateManager.java
(original)
+++ incubator/jackrabbit/trunk/jackrabbit/src/main/java/org/apache/jackrabbit/core/state/TransientItemStateManager.java
Thu Mar  2 06:08:16 2006
@@ -238,8 +238,7 @@
                 throw new ItemStateException(msg);
             }
 
-            PropertyState state = new PropertyState(
-                    new PropertyId(parentId, propName), initialStatus, true);
+            PropertyState state = new PropertyState(id, initialStatus, true);
             // put transient state in the map
             transientStore.put(state);
             return state;
@@ -255,8 +254,7 @@
     PropertyState createPropertyState(PropertyState overlayedState, int initialStatus)
             throws ItemStateException {
 
-        PropertyId id = new PropertyId(overlayedState.getParentId(),
-                overlayedState.getName());
+        PropertyId id = overlayedState.getPropertyId();
 
         // check map; synchronized to ensure an entry is not created twice.
         synchronized (transientStore) {



Mime
View raw message