jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r627503 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
Date Wed, 13 Feb 2008 16:04:02 GMT
Author: stefan
Date: Wed Feb 13 08:03:59 2008
New Revision: 627503

URL: http://svn.apache.org/viewvc?rev=627503&view=rev
Log:
JCR-1371:  [PATCH] unnecessary synchronized collections used only in thread safe way

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java?rev=627503&r1=627502&r2=627503&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/xml/NodeTypeReader.java
Wed Feb 13 08:03:59 2008
@@ -42,7 +42,8 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.Properties;
-import java.util.Vector;
+import java.util.List;
+import java.util.ArrayList;
 
 /**
  * Node type definition reader. This class is used to read the
@@ -117,7 +118,7 @@
      */
     public NodeTypeDef[] getNodeTypeDefs()
             throws InvalidNodeTypeDefException, NameException, NamespaceException {
-        Vector defs = new Vector();
+        List defs = new ArrayList();
         while (walker.iterateElements(Constants.NODETYPE_ELEMENT)) {
             defs.add(getNodeTypeDef());
         }
@@ -153,7 +154,7 @@
 
         // supertype declarations
         if (walker.enterElement(Constants.SUPERTYPES_ELEMENT)) {
-            Vector supertypes = new Vector();
+            List supertypes = new ArrayList();
             while (walker.iterateElements(Constants.SUPERTYPE_ELEMENT)) {
                 supertypes.add(
                         resolver.getQName(walker.getContent()));
@@ -164,7 +165,7 @@
         }
 
         // property definitions
-        Vector properties = new Vector();
+        List properties = new ArrayList();
         while (walker.iterateElements(Constants.PROPERTYDEFINITION_ELEMENT)) {
             PropDefImpl def = getPropDef();
             def.setDeclaringNodeType(type.getName());
@@ -174,7 +175,7 @@
                 properties.toArray(new PropDef[properties.size()]));
 
         // child node definitions
-        Vector nodes = new Vector();
+        List nodes = new ArrayList();
         while (walker.iterateElements(Constants.CHILDNODEDEFINITION_ELEMENT)) {
             NodeDefImpl def = getChildNodeDef();
             def.setDeclaringNodeType(type.getName());
@@ -224,7 +225,7 @@
 
         // value constraints
         if (walker.enterElement(Constants.VALUECONSTRAINTS_ELEMENT)) {
-            Vector constraints = new Vector();
+            List constraints = new ArrayList();
             int type = def.getRequiredType();
             while (walker.iterateElements(Constants.VALUECONSTRAINT_ELEMENT)) {
                 String constraint = walker.getContent();
@@ -243,7 +244,7 @@
 
         // default values
         if (walker.enterElement(Constants.DEFAULTVALUES_ELEMENT)) {
-            Vector values = new Vector();
+            List values = new ArrayList();
             int type = def.getRequiredType();
             if (type == PropertyType.UNDEFINED) {
                 type = PropertyType.STRING;
@@ -306,7 +307,7 @@
 
         // required primary types
         if (walker.enterElement(Constants.REQUIREDPRIMARYTYPES_ELEMENT)) {
-            Vector types = new Vector();
+            List types = new ArrayList();
             while (walker.iterateElements(Constants.REQUIREDPRIMARYTYPE_ELEMENT)) {
                 types.add(resolver.getQName(walker.getContent()));
             }



Mime
View raw message