jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r161915 - in incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core: ./ fs/ nodetype/ state/ version/ version/persistence/
Date Tue, 19 Apr 2005 16:34:03 GMT
Author: stefan
Date: Tue Apr 19 09:33:59 2005
New Revision: 161915

URL: http://svn.apache.org/viewcvs?view=rev&rev=161915
Log:
renamed InternalValue.EMPTY & ValueConstraint.EMPTY to EMPTY_ARRAY plus various minor
inline & javadoc corrections

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/InternalValue.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/InternalValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/InternalValue.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/InternalValue.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/InternalValue.java Tue
Apr 19 09:33:59 2005
@@ -60,7 +60,7 @@
  */
 public class InternalValue {
 
-    public static final InternalValue[] EMPTY = new InternalValue[0];
+    public static final InternalValue[] EMPTY_ARRAY = new InternalValue[0];
 
     private final Object val;
     private final int type;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/NodeImpl.java Tue Apr 19
09:33:59 2005
@@ -2669,7 +2669,7 @@
         prop.save();
         prop = internalSetProperty(JCR_BASEVERSION, InternalValue.create(new UUID(v.getUUID())));
         prop.save();
-        prop = internalSetProperty(JCR_PREDECESSORS, InternalValue.EMPTY, PropertyType.REFERENCE);
+        prop = internalSetProperty(JCR_PREDECESSORS, InternalValue.EMPTY_ARRAY, PropertyType.REFERENCE);
         prop.save();
         return v;
     }
@@ -3478,7 +3478,7 @@
         internalSetProperty(JCR_BASEVERSION, InternalValue.create(new UUID(version.getId())));
 
         // 4. N's jcr:predecessor property is set to null
-        internalSetProperty(JCR_PREDECESSORS, InternalValue.EMPTY, PropertyType.REFERENCE);
+        internalSetProperty(JCR_PREDECESSORS, InternalValue.EMPTY_ARRAY, PropertyType.REFERENCE);
 
         // also clear mergeFailed
         internalSetProperty(JCR_MERGEFAILED, (InternalValue[]) null);

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/RepositoryImpl.java Tue
Apr 19 09:33:59 2005
@@ -923,7 +923,7 @@
         }
     }
 
-    //-----------------------------------------< overrideable factory methods >
+    //------------------------------------------< overridable factory methods >
     /**
      * Creates an instance of the {@link SessionImpl} class representing a
      * user authenticated by the <code>loginContext</code> instance attached

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java
Tue Apr 19 09:33:59 2005
@@ -155,7 +155,7 @@
         InputStream in = fs.getInputStream(path);
         try {
             byte[] buffer = new byte[8192];
-            int read = 0;
+            int read;
             while ((read = in.read(buffer)) > 0) {
                 out.write(buffer, 0, read);
             }

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
Tue Apr 19 09:33:59 2005
@@ -87,7 +87,7 @@
         this.ntReg = ntReg;
         this.ntReg.addListener(this);
 
-        // setup item cache with soft references to node type instances
+        // setup caches with soft references to node type & item definition instances
         ntCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
         pdCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
         ndCache = new ReferenceMap(ReferenceMap.HARD, ReferenceMap.SOFT);
@@ -180,6 +180,7 @@
         // flush cache
         ntCache.remove(ntName);
         // just clear all definitions from cache
+        // @todo do smart/selective flush of definition caches
         pdCache.clear();
         ndCache.clear();
     }
@@ -191,6 +192,7 @@
         // sync cache
         ntCache.remove(ntName);
         // just clear all definitions from cache
+        // @todo do smart/selective flush of definition caches
         pdCache.clear();
         ndCache.clear();
     }
@@ -296,4 +298,3 @@
         }
     }
 }
-

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/PropDefImpl.java
Tue Apr 19 09:33:59 2005
@@ -36,12 +36,12 @@
     /**
      * The value constrsints.
      */
-    private ValueConstraint[] valueConstraints = ValueConstraint.EMPTY;
+    private ValueConstraint[] valueConstraints = ValueConstraint.EMPTY_ARRAY;
 
     /**
      * The default values.
      */
-    private InternalValue[] defaultValues = InternalValue.EMPTY;
+    private InternalValue[] defaultValues = InternalValue.EMPTY_ARRAY;
 
     /**
      * The 'multiple' flag
@@ -75,7 +75,7 @@
             throw new IllegalStateException("Unable to set attribute. Property definition
already compiled.");
         }
         this.valueConstraints =
-                (valueConstraints == null) ? ValueConstraint.EMPTY : valueConstraints;
+                (valueConstraints == null) ? ValueConstraint.EMPTY_ARRAY : valueConstraints;
     }
 
     /**
@@ -88,7 +88,7 @@
             throw new IllegalStateException("Unable to set attribute. Property definition
already compiled.");
         }
         this.defaultValues =
-                (defaultValues == null) ? InternalValue.EMPTY : defaultValues;
+                (defaultValues == null) ? InternalValue.EMPTY_ARRAY : defaultValues;
     }
 
     /**

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/nodetype/ValueConstraint.java
Tue Apr 19 09:33:59 2005
@@ -43,9 +43,10 @@
  * it.
  */
 public abstract class ValueConstraint {
+
     protected static Logger log = Logger.getLogger(ValueConstraint.class);
 
-    public static final ValueConstraint[] EMPTY = new ValueConstraint[0];
+    public static final ValueConstraint[] EMPTY_ARRAY = new ValueConstraint[0];
 
     final String definition;
 

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/state/PropertyState.java
Tue Apr 19 09:33:59 2005
@@ -74,7 +74,7 @@
         super(parentUUID, new PropertyId(parentUUID, name), initialStatus, isTransient);
         this.name = name;
         type = PropertyType.UNDEFINED;
-        values = InternalValue.EMPTY;
+        values = InternalValue.EMPTY_ARRAY;
         multiValued = false;
     }
 

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/VersionItemStateProvider.java
Tue Apr 19 09:33:59 2005
@@ -193,8 +193,8 @@
                 state = new VersionNodeState(this, v, vi.getParent().getId());
                 state.setDefinitionId(NDEF_VERSION);
                 state.setPropertyValue(JCR_CREATED, InternalValue.create(v.getCreated()));
-                state.setPropertyValues(JCR_PREDECESSORS, PropertyType.REFERENCE, InternalValue.EMPTY);
-                state.setPropertyValues(JCR_SUCCESSORS, PropertyType.REFERENCE, InternalValue.EMPTY);
+                state.setPropertyValues(JCR_PREDECESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
+                state.setPropertyValues(JCR_SUCCESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
 
             } else if (vi instanceof InternalFrozenNode) {
                 InternalFrozenNode fn = (InternalFrozenNode) vi;

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java?view=diff&r1=161914&r2=161915
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/version/persistence/InternalVersionHistoryImpl.java
Tue Apr 19 09:33:59 2005
@@ -470,7 +470,7 @@
 
         // initialize 'created' and 'predecessors'
         vNode.setPropertyValue(JCR_CREATED, InternalValue.create(Calendar.getInstance()));
-        vNode.setPropertyValues(JCR_PREDECESSORS, PropertyType.REFERENCE, InternalValue.EMPTY);
+        vNode.setPropertyValues(JCR_PREDECESSORS, PropertyType.REFERENCE, InternalValue.EMPTY_ARRAY);
 
         // add also an empty frozen node to the root version
         InternalFrozenNodeImpl.checkin(vNode, JCR_FROZENNODE, src, true, false);



Mime
View raw message