jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r615802 - in /jackrabbit/trunk/jackrabbit-core: ./ src/main/java/org/apache/jackrabbit/core/config/ src/main/java/org/apache/jackrabbit/core/data/ src/main/java/org/apache/jackrabbit/core/data/db/ src/main/java/org/apache/jackrabbit/core/fs...
Date Mon, 28 Jan 2008 09:32:46 GMT
Author: jukka
Date: Mon Jan 28 01:32:41 2008
New Revision: 615802

URL: http://svn.apache.org/viewvc?rev=615802&view=rev
Log:
JCR-97: Improve Checkstyle conformance
    - Various Checkstyle improvements

Modified:
    jackrabbit/trunk/jackrabbit-core/checkstyle.xml
    jackrabbit/trunk/jackrabbit-core/pom.xml
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/DatabaseFileSystem.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRevision.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockToken.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeTemplateImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventStateCollection.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PMContext.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleCache.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionRecoveryManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/DbNameIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/HashMapIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/SimpleDbPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ResourceBasedBLOBStore.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/FineGrainedISMLocking.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersion.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionSelector.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java

Modified: jackrabbit/trunk/jackrabbit-core/checkstyle.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/checkstyle.xml?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/checkstyle.xml (original)
+++ jackrabbit/trunk/jackrabbit-core/checkstyle.xml Mon Jan 28 01:32:41 2008
@@ -28,7 +28,9 @@
 
     <!-- Checks that a package.html file exists for each package.     -->
     <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
+    <!-- Disabled:
     <module name="PackageHtml"/>
+    -->
 
     <!-- Checks whether files end with a new line.                        -->
     <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
@@ -47,7 +49,7 @@
         <!-- ************************************************************** -->
 
         <module name="Header">
-            <property name="headerFile" value="${basedir}/HEADER.txt"/>
+            <property name="headerFile" value="HEADER.txt"/>
         </module>
         <!-- <property name="tabWidth" value="4"/> -->
         <module name="LeftCurly">
@@ -70,9 +72,11 @@
 
         <!-- Checks for Javadoc comments.                     -->
         <!-- See http://checkstyle.sf.net/config_javadoc.html -->
-        <module name="JavadocMethod"/>
         <module name="JavadocType"/>
+        <!--  Disabled:
+        <module name="JavadocMethod"/>
         <module name="JavadocVariable"/>
+        -->
 
         <!-- Checks for Naming Conventions.                  -->
         <!-- See http://checkstyle.sf.net/config_naming.html -->
@@ -163,9 +167,9 @@
         <module name="UpperEll"/>
 
     </module>
-    
+
     <module name="SuppressionFilter">
         <property name="file" value="checkstyle-suppressions.xml"/>
-    </module>    
+    </module>
 
 </module>

Modified: jackrabbit/trunk/jackrabbit-core/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/pom.xml?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/pom.xml (original)
+++ jackrabbit/trunk/jackrabbit-core/pom.xml Mon Jan 28 01:32:41 2008
@@ -226,6 +226,12 @@
           </execution>
         </executions>
       </plugin>
+      <plugin>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+        <configuration>
+          <configLocation>checkstyle.xml</configLocation>
+        </configuration>
+      </plugin>
     </plugins>
     <resources>
       <resource>

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java Mon Jan 28 01:32:41 2008
@@ -29,7 +29,7 @@
 public class BeanConfig {
 
     /** The default class loader used by all instances of this class */
-    private static ClassLoader DEFAULT_CLASS_LOADER =
+    private static ClassLoader defaultClassLoader =
         BeanConfig.class.getClassLoader();
 
     /**
@@ -168,7 +168,7 @@
      * @see #setDefaultClassLoader(ClassLoader)
      */
     public static ClassLoader getDefaultClassLoader() {
-        return DEFAULT_CLASS_LOADER;
+        return defaultClassLoader;
     }
 
     /**
@@ -185,6 +185,6 @@
      * @see #getDefaultClassLoader()
      */
     public static void setDefaultClassLoader(ClassLoader classLoader) {
-        DEFAULT_CLASS_LOADER = classLoader;
+        defaultClassLoader = classLoader;
     }
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/FileDataStore.java Mon Jan 28 01:32:41 2008
@@ -186,7 +186,10 @@
             if (!file.exists()) {
                 temporary.renameTo(file);
                 if (!file.exists()) {
-                    throw new IOException("Can not rename " + temporary.getAbsolutePath() + " to " + file.getAbsolutePath() + " (media read only?)");
+                    throw new IOException(
+                            "Can not rename " + temporary.getAbsolutePath()
+                            + " to " + file.getAbsolutePath()
+                            + " (media read only?)");
                 }
             } else {
                 long now = System.currentTimeMillis();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/GarbageCollector.java Mon Jan 28 01:32:41 2008
@@ -158,7 +158,8 @@
         }
     }
 
-    private void scanNodes(Session session) throws UnsupportedRepositoryOperationException, RepositoryException, IllegalStateException, IOException {
+    private void scanNodes(Session session)
+        throws RepositoryException, IllegalStateException, IOException {
 
         // add a listener to get 'new' nodes
         // actually, new nodes are not the problem, but moved nodes

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/data/db/DbDataStore.java Mon Jan 28 01:32:41 2008
@@ -204,7 +204,8 @@
      * in the [databaseType].properties file, initialized with the default value.
      */
     protected String updateSQL =
-        "UPDATE ${tablePrefix}${table} SET ID=?, LENGTH=?, LAST_MODIFIED=? WHERE ID=? AND NOT EXISTS(SELECT ID FROM ${tablePrefix}${table} WHERE ID=?)";
+        "UPDATE ${tablePrefix}${table} SET ID=?, LENGTH=?, LAST_MODIFIED=?"
+        + " WHERE ID=? AND NOT EXISTS(SELECT ID FROM ${tablePrefix}${table} WHERE ID=?)";
 
     /**
      * This is the property 'delete'
@@ -346,7 +347,10 @@
                     long oldLength = rs.getLong(1);
                     long lastModified = rs.getLong(2);
                     if (oldLength != length) {
-                        String msg = DIGEST + " collision: temp=" + tempId + " id=" + id + " length=" + length + " oldLength=" + oldLength;
+                        String msg =
+                            DIGEST + " collision: temp=" + tempId
+                            + " id=" + id + " length=" + length
+                            + " oldLength=" + oldLength;
                         log.error(msg);
                         throw new DataStoreException(msg);
                     }
@@ -518,7 +522,10 @@
         InputStream in = DbDataStore.class.getResourceAsStream(databaseType + ".properties");
         if (in == null) {
             if (failIfNotFound) {
-                String msg = "Configuration error: The resource '" + databaseType + ".properties' could not be found; Please verify the databaseType property";
+                String msg =
+                    "Configuration error: The resource '" + databaseType
+                    + ".properties' could not be found;"
+                    + " Please verify the databaseType property";
                 log.debug(msg);
                 throw new DataStoreException(msg);
             } else {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/DatabaseFileSystem.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/DatabaseFileSystem.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/DatabaseFileSystem.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/DatabaseFileSystem.java Mon Jan 28 01:32:41 2008
@@ -138,15 +138,23 @@
     public boolean equals(Object obj) {
         if (this == obj) {
             return true;
-        }
-        if (obj instanceof DatabaseFileSystem) {
+        } else if (obj instanceof DatabaseFileSystem) {
             DatabaseFileSystem other = (DatabaseFileSystem) obj;
-            if (((schema != null) ? schema.equals(other.schema) : other.schema == null)
-                    && ((schemaObjectPrefix != null) ? schemaObjectPrefix.equals(other.schemaObjectPrefix) : other.schemaObjectPrefix == null)) {
-                return true;
-            }
+            return equals(schema, other.schema)
+                && equals(schemaObjectPrefix, other.schemaObjectPrefix);
+        } else {
+            return false;
+        }
+    }
+
+    private static boolean equals(Object a, Object b) {
+        if (a == null && b == null) {
+            return true;
+        } else if (a == null || b == null) {
+            return false;
+        } else {
+            return a.equals(b);
         }
-        return false;
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/db/OracleFileSystem.java Mon Jan 28 01:32:41 2008
@@ -81,8 +81,8 @@
     private static Logger log = LoggerFactory.getLogger(OracleFileSystem.class);
 
     private Class blobClass;
-    private Integer DURATION_SESSION_CONSTANT;
-    private Integer MODE_READWRITE_CONSTANT;
+    private Integer durationSessionConstant;
+    private Integer modeReadWriteConstant;
 
     /** the variable for the Oracle table space */
     public static final String TABLE_SPACE_VARIABLE =
@@ -143,9 +143,9 @@
         // class loader that the Oracle driver was loaded with
         try {
             blobClass = con.getClass().getClassLoader().loadClass("oracle.sql.BLOB");
-            DURATION_SESSION_CONSTANT =
+            durationSessionConstant =
                     new Integer(blobClass.getField("DURATION_SESSION").getInt(null));
-            MODE_READWRITE_CONSTANT =
+            modeReadWriteConstant =
                     new Integer(blobClass.getField("MODE_READWRITE").getInt(null));
         } catch (Exception e) {
             String msg = "failed to load/introspect oracle.sql.BLOB";
@@ -427,7 +427,9 @@
     /**
      * {@inheritDoc}
      */
-    public RandomAccessOutputStream getRandomAccessOutputStream(final String filePath) throws FileSystemException, UnsupportedOperationException {
+    public RandomAccessOutputStream getRandomAccessOutputStream(
+            final String filePath)
+            throws FileSystemException, UnsupportedOperationException {
         if (!initialized) {
             throw new IllegalStateException("not initialized");
         }
@@ -572,9 +574,9 @@
         Method createTemporary = blobClass.getMethod("createTemporary",
                 new Class[]{Connection.class, Boolean.TYPE, Integer.TYPE});
         Object blob = createTemporary.invoke(null,
-                new Object[]{con, Boolean.FALSE, DURATION_SESSION_CONSTANT});
+                new Object[]{con, Boolean.FALSE, durationSessionConstant});
         Method open = blobClass.getMethod("open", new Class[]{Integer.TYPE});
-        open.invoke(blob, new Object[]{MODE_READWRITE_CONSTANT});
+        open.invoke(blob, new Object[]{modeReadWriteConstant});
         Method getBinaryOutputStream =
                 blobClass.getMethod("getBinaryOutputStream", new Class[0]);
         OutputStream out = (OutputStream) getBinaryOutputStream.invoke(blob, null);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRevision.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRevision.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRevision.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileRevision.java Mon Jan 28 01:32:41 2008
@@ -16,9 +16,6 @@
  */
 package org.apache.jackrabbit.core.journal;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.RandomAccessFile;
@@ -29,11 +26,6 @@
 public class FileRevision {
 
     /**
-     * Logger.
-     */
-    private static final Logger log = LoggerFactory.getLogger(FileRevision.class);
-
-    /**
      * Underlying random access file.
      */
     private final RandomAccessFile raf;
@@ -59,8 +51,8 @@
                 set(0);
             }
         } catch (IOException e) {
-            String msg = "I/O error while attempting to create new file '" + file + "'.";
-            throw new JournalException(msg, e);
+            throw new JournalException(
+                    "I/O error while attempting to create new file '" + file + "'.", e);
         }
     }
 
@@ -96,4 +88,5 @@
             throw new JournalException("I/O error occurred.", e);
         }
     }
+
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/AbstractLockInfo.java Mon Jan 28 01:32:41 2008
@@ -85,7 +85,7 @@
      * @return the id
      */
     public NodeId getId() {
-        return lockToken.id;
+        return lockToken.getId();
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockManagerImpl.java Mon Jan 28 01:32:41 2008
@@ -180,8 +180,9 @@
      */
     private void reapplyLock(LockToken lockToken) {
         try {
-            NodeImpl node = (NodeImpl) session.getItemManager().getItem(lockToken.id);
-            Path path = getPath(lockToken.id);
+            NodeImpl node = (NodeImpl)
+                session.getItemManager().getItem(lockToken.getId());
+            Path path = getPath(lockToken.getId());
 
             LockInfo info = new LockInfo(lockToken, false,
                     node.getProperty(NameConstants.JCR_LOCKISDEEP).getBoolean(),
@@ -587,8 +588,8 @@
         try {
             LockToken lockToken = LockToken.parse(lt);
 
-            NodeImpl node = (NodeImpl) this.session.getItemManager().
-                    getItem(lockToken.id);
+            NodeImpl node = (NodeImpl)
+                this.session.getItemManager().getItem(lockToken.getId());
             PathMap.Element element = lockMap.map(node.getPrimaryPath(), true);
             if (element != null) {
                 AbstractLockInfo info = (AbstractLockInfo) element.get();
@@ -619,8 +620,8 @@
         try {
             LockToken lockToken = LockToken.parse(lt);
 
-            NodeImpl node = (NodeImpl) this.session.getItemManager().
-                    getItem(lockToken.id);
+            NodeImpl node = (NodeImpl)
+                this.session.getItemManager().getItem(lockToken.getId());
             PathMap.Element element = lockMap.map(node.getPrimaryPath(), true);
             if (element != null) {
                 AbstractLockInfo info = (AbstractLockInfo) element.get();
@@ -797,16 +798,12 @@
         Iterator iter = consolidateEvents(events);
         while (iter.hasNext()) {
             HierarchyEvent event = (HierarchyEvent) iter.next();
-            switch (event.type) {
-                case Event.NODE_ADDED:
-                    nodeAdded(event.path);
-                    break;
-                case Event.NODE_REMOVED:
-                    nodeRemoved(event.path);
-                    break;
-                case Event.NODE_ADDED | Event.NODE_REMOVED:
-                    nodeMoved(event.getOldPath(), event.getNewPath());
-                    break;
+            if (event.type == Event.NODE_ADDED) {
+                nodeAdded(event.path);
+            } else if (event.type == Event.NODE_REMOVED) {
+                nodeRemoved(event.path);
+            } else if (event.type == (Event.NODE_ADDED | Event.NODE_REMOVED)) {
+                nodeMoved(event.getOldPath(), event.getNewPath());
             }
         }
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockToken.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockToken.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockToken.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/lock/LockToken.java Mon Jan 28 01:32:41 2008
@@ -26,7 +26,7 @@
     /**
      * ID of node holding lock
      */
-    public final NodeId id;
+    private final NodeId id;
 
     /**
      * Create a new instance of this class. Used when creating new locks upon
@@ -35,6 +35,10 @@
      */
     public LockToken(NodeId id) {
         this.id = id;
+    }
+
+    public NodeId getId() {
+        return id;
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeDefDiff.java Mon Jan 28 01:32:41 2008
@@ -368,22 +368,18 @@
     }
 
     private String modificationTypeToString(int modifcationType) {
-        String typeString = "unknown";
         switch (modifcationType) {
-            case NONE:
-                typeString = "NONE";
-                break;
-            case TRIVIAL:
-                typeString = "TRIVIAL";
-                break;
-            case MINOR:
-                typeString = "MINOR";
-                break;
-            case MAJOR:
-                typeString = "MAJOR";
-                break;
+        case NONE:
+            return "NONE";
+        case TRIVIAL:
+            return "TRIVIAL";
+        case MINOR:
+            return "MINOR";
+        case MAJOR:
+            return "MAJOR";
+        default:
+            return "unknown";
         }
-        return typeString;
     }
 
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeManagerImpl.java Mon Jan 28 01:32:41 2008
@@ -747,7 +747,8 @@
      * <p/>
      * Throws a <code>NoSuchNodeTypeException</code> if one of the names listed is not a registered node type.
      * <p/>
-     * Throws an <code>UnsupportedRepositoryOperationException</code> if this implementation does not support node type registration.
+     * Throws an <code>UnsupportedRepositoryOperationException</code>
+     * if this implementation does not support node type registration.
      *
      * @param names a <code>String</code> array
      * @throws UnsupportedRepositoryOperationException if this implementation does not support node type registration.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeTemplateImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeTemplateImpl.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeTemplateImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/NodeTypeTemplateImpl.java Mon Jan 28 01:32:41 2008
@@ -25,7 +25,6 @@
 import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.nodetype.PropertyDefinition;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
 /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/compact/CompactNodeTypeDefReader.java Mon Jan 28 01:32:41 2008
@@ -498,7 +498,8 @@
                         ValueFactoryImpl.getInstance());
                 value = InternalValue.create(v, resolver);
             } catch (ValueFormatException e) {
-                lexer.fail("'" + currentToken + "' is not a valid string representation of a value of type " + pdi.getRequiredType());
+                lexer.fail("'" + currentToken + "' is not a valid string"
+                        + " representation of a value of type " + pdi.getRequiredType());
             } catch (RepositoryException e) {
                 lexer.fail("An error occured during value conversion of '" + currentToken + "'");
             }
@@ -525,7 +526,8 @@
             try {
                 constraint = ValueConstraint.create(pdi.getRequiredType(), currentToken, resolver);
             } catch (InvalidConstraintException e) {
-                lexer.fail("'" + currentToken + "' is not a valid constraint expression for a value of type " + pdi.getRequiredType());
+                lexer.fail("'" + currentToken + "' is not a valid constraint"
+                        + " expression for a value of type " + pdi.getRequiredType());
             }
             constraints.add(constraint);
             nextToken();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/virtual/VirtualNodeTypeStateProvider.java Mon Jan 28 01:32:41 2008
@@ -74,7 +74,8 @@
      */
     protected VirtualNodeState createRootNodeState() throws RepositoryException {
         VirtualNodeState root = new VirtualNodeState(this, parentId, rootNodeId, NameConstants.REP_NODETYPES, null);
-        NodeDefId id = ntReg.getEffectiveNodeType(NameConstants.REP_SYSTEM).getApplicableChildNodeDef(NameConstants.JCR_NODETYPES, NameConstants.REP_NODETYPES, ntReg).getId();
+        NodeDefId id = ntReg.getEffectiveNodeType(NameConstants.REP_SYSTEM).getApplicableChildNodeDef(
+                NameConstants.JCR_NODETYPES, NameConstants.REP_NODETYPES, ntReg).getId();
         root.setDefinitionId(id);
         Name[] ntNames = ntReg.getRegisteredNodeTypes();
         for (int i = 0; i < ntNames.length; i++) {
@@ -201,7 +202,9 @@
             throws RepositoryException {
         NodeId id = new NodeId(calculateStableUUID(
                 ntDef.getName().toString() + "/" + NameConstants.JCR_PROPERTYDEFINITION.toString() + "/" + n));
-        VirtualNodeState pState = createNodeState(parent, NameConstants.JCR_PROPERTYDEFINITION, id, NameConstants.NT_PROPERTYDEFINITION);
+        VirtualNodeState pState = createNodeState(
+                parent, NameConstants.JCR_PROPERTYDEFINITION, id,
+                NameConstants.NT_PROPERTYDEFINITION);
         // add properties
         if (!propDef.definesResidual()) {
             pState.setPropertyValue(NameConstants.JCR_NAME, InternalValue.create(propDef.getName()));
@@ -212,7 +215,9 @@
                 InternalValue.create(OnParentVersionAction.nameFromValue(propDef.getOnParentVersion())));
         pState.setPropertyValue(NameConstants.JCR_PROTECTED, InternalValue.create(propDef.isProtected()));
         pState.setPropertyValue(NameConstants.JCR_MULTIPLE, InternalValue.create(propDef.isMultiple()));
-        pState.setPropertyValue(NameConstants.JCR_REQUIREDTYPE, InternalValue.create(PropertyType.nameFromValue(propDef.getRequiredType()).toUpperCase()));
+        pState.setPropertyValue(
+                NameConstants.JCR_REQUIREDTYPE,
+                InternalValue.create(PropertyType.nameFromValue(propDef.getRequiredType()).toUpperCase()));
         pState.setPropertyValues(NameConstants.JCR_DEFAULTVALUES, PropertyType.STRING, propDef.getDefaultValues());
         ValueConstraint[] vc = propDef.getValueConstraints();
         InternalValue[] vals = new InternalValue[vc.length];
@@ -237,7 +242,8 @@
             throws RepositoryException {
         NodeId id = new NodeId(calculateStableUUID(
                 ntDef.getName().toString() + "/" + NameConstants.JCR_CHILDNODEDEFINITION.toString() + "/" + n));
-        VirtualNodeState pState = createNodeState(parent, NameConstants.JCR_CHILDNODEDEFINITION, id, NameConstants.NT_CHILDNODEDEFINITION);
+        VirtualNodeState pState = createNodeState(
+                parent, NameConstants.JCR_CHILDNODEDEFINITION, id, NameConstants.NT_CHILDNODEDEFINITION);
         // add properties
         if (!cnDef.definesResidual()) {
             pState.setPropertyValue(NameConstants.JCR_NAME, InternalValue.create(cnDef.getName()));

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventStateCollection.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventStateCollection.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventStateCollection.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventStateCollection.java Mon Jan 28 01:32:41 2008
@@ -36,8 +36,6 @@
 
 import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
-import javax.jcr.nodetype.NodeType;
-import javax.jcr.nodetype.NodeTypeManager;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -237,7 +235,8 @@
                                     if (moved.getIndex() == 0) {
                                         oldPath = PathFactoryImpl.getInstance().create(parentPath, moved.getName(), false);
                                     } else {
-                                        oldPath = PathFactoryImpl.getInstance().create(parentPath, moved.getName(), moved.getIndex(), false);
+                                        oldPath = PathFactoryImpl.getInstance().create(
+                                                parentPath, moved.getName(), moved.getIndex(), false);
                                     }
                                 } catch (RepositoryException e) {
                                     // should never happen actually

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PMContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PMContext.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PMContext.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PMContext.java Mon Jan 28 01:32:41 2008
@@ -20,7 +20,6 @@
 import org.apache.jackrabbit.core.fs.FileSystem;
 import org.apache.jackrabbit.core.nodetype.NodeTypeRegistry;
 import org.apache.jackrabbit.core.NodeId;
-import org.apache.jackrabbit.core.persistence.PersistenceManager;
 
 import javax.jcr.NamespaceRegistry;
 import java.io.File;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/PersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -18,7 +18,6 @@
 
 import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.PropertyId;
-import org.apache.jackrabbit.core.persistence.PMContext;
 import org.apache.jackrabbit.core.state.NodeState;
 import org.apache.jackrabbit.core.state.PropertyState;
 import org.apache.jackrabbit.core.state.NoSuchItemStateException;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -84,9 +84,6 @@
 public abstract class AbstractBundlePersistenceManager implements
     PersistenceManager, CachingPersistenceManager, IterablePersistenceManager {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /** the default logger */
     private static Logger log = LoggerFactory.getLogger(AbstractBundlePersistenceManager.class);
 
@@ -413,8 +410,10 @@
 
         // init prop defs
         if (context.getNodeTypeRegistry() != null) {
-            idJcrUUID = context.getNodeTypeRegistry().getEffectiveNodeType(NameConstants.MIX_REFERENCEABLE).getApplicablePropertyDef(
-                    NameConstants.JCR_UUID, PropertyType.STRING, false).getId();
+            idJcrUUID = context.getNodeTypeRegistry()
+                .getEffectiveNodeType(NameConstants.MIX_REFERENCEABLE)
+                .getApplicablePropertyDef(NameConstants.JCR_UUID, PropertyType.STRING, false)
+                .getId();
             idJcrPrimaryType = context.getNodeTypeRegistry().getEffectiveNodeType(NameConstants.NT_BASE).getApplicablePropertyDef(
                     NameConstants.JCR_PRIMARYTYPE, PropertyType.NAME, false).getId();
             idJcrMixinTypes = context.getNodeTypeRegistry().getEffectiveNodeType(NameConstants.NT_BASE).getApplicablePropertyDef(

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -89,9 +89,6 @@
  */
 public class BundleDbPersistenceManager extends AbstractBundlePersistenceManager {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /** the default logger */
     private static Logger log = LoggerFactory.getLogger(BundleDbPersistenceManager.class);
 
@@ -722,7 +719,9 @@
                         try {
                             NodePropBundle child = loadBundle(entry.getId());
                             if (child == null) {
-                                log.error("NodeState " + id.getUUID() + " references inexistent child " + entry.getName() + " with id " + entry.getId().getUUID());
+                                log.error("NodeState " + id.getUUID()
+                                        + " references inexistent child " + entry.getName()
+                                        + " with id " + entry.getId().getUUID());
                                 missingChildren.add(entry);
                             } else {
                                 NodeId cp = child.getParentId();
@@ -1279,15 +1278,22 @@
             bundleSelectSQL = "select BUNDLE_DATA from " + schemaObjectPrefix + "BUNDLE where NODE_ID_HI = ? and NODE_ID_LO = ?";
             bundleDeleteSQL = "delete from " + schemaObjectPrefix + "BUNDLE where NODE_ID_HI = ? and NODE_ID_LO = ?";
 
-            nodeReferenceInsertSQL = "insert into " + schemaObjectPrefix + "REFS (REFS_DATA, NODE_ID_HI, NODE_ID_LO) values (?, ?, ?)";
-            nodeReferenceUpdateSQL = "update " + schemaObjectPrefix + "REFS set REFS_DATA = ? where NODE_ID_HI = ? and NODE_ID_LO = ?";
+            nodeReferenceInsertSQL =
+                "insert into " + schemaObjectPrefix + "REFS"
+                + " (REFS_DATA, NODE_ID_HI, NODE_ID_LO) values (?, ?, ?)";
+            nodeReferenceUpdateSQL =
+                "update " + schemaObjectPrefix + "REFS"
+                + " set REFS_DATA = ? where NODE_ID_HI = ? and NODE_ID_LO = ?";
             nodeReferenceSelectSQL = "select REFS_DATA from " + schemaObjectPrefix + "REFS where NODE_ID_HI = ? and NODE_ID_LO = ?";
             nodeReferenceDeleteSQL = "delete from " + schemaObjectPrefix + "REFS where NODE_ID_HI = ? and NODE_ID_LO = ?";
 
             bundleSelectAllIdsSQL = "select NODE_ID_HI, NODE_ID_LO from " + schemaObjectPrefix + "BUNDLE";
             // need to use HI and LO parameters
             // this is not the exact statement, but not all databases support WHERE (NODE_ID_HI, NODE_ID_LOW) >= (?, ?)
-            bundleSelectAllIdsFromSQL = "select NODE_ID_HI, NODE_ID_LO from " + schemaObjectPrefix + "BUNDLE WHERE (NODE_ID_HI >= ?) AND (? IS NOT NULL) ORDER BY NODE_ID_HI, NODE_ID_LO";
+            bundleSelectAllIdsFromSQL =
+                "select NODE_ID_HI, NODE_ID_LO from " + schemaObjectPrefix + "BUNDLE"
+                + " WHERE (NODE_ID_HI >= ?) AND (? IS NOT NULL)"
+                + " ORDER BY NODE_ID_HI, NODE_ID_LO";
         }
 
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -63,9 +63,6 @@
  */
 public class BundleFsPersistenceManager extends AbstractBundlePersistenceManager {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /** the default logger */
     private static Logger log = LoggerFactory.getLogger(BundleFsPersistenceManager.class);
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/DerbyPersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -51,9 +51,6 @@
  */
 public class DerbyPersistenceManager extends BundleDbPersistenceManager {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /** name of the embedded driver */
     public static final String DERBY_EMBEDDED_DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/H2PersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -43,9 +43,6 @@
  */
 public class H2PersistenceManager extends BundleDbPersistenceManager {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /** the lock time out. see*/
     private long lockTimeout = 10000;
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MSSqlPersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -38,9 +38,6 @@
  */
 public class MSSqlPersistenceManager extends BundleDbPersistenceManager {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /** the MS SQL table space to use */
     protected String tableSpace = "";
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/MySqlPersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -37,9 +37,6 @@
  */
 public class MySqlPersistenceManager extends BundleDbPersistenceManager {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /**
      * {@inheritDoc}
      */

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/Oracle9PersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -58,11 +58,6 @@
 public class Oracle9PersistenceManager extends OraclePersistenceManager {
 
     /**
-     * the cvs/svn id
-     */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
-    /**
      * the default logger
      */
     private static Logger log = LoggerFactory.getLogger(Oracle9PersistenceManager.class);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/OraclePersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -47,9 +47,6 @@
  */
 public class OraclePersistenceManager extends BundleDbPersistenceManager {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /**
      * the default logger
      */

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleBinding.java Mon Jan 28 01:32:41 2008
@@ -48,9 +48,6 @@
  */
 public class BundleBinding extends ItemStateBinding {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /**
      * default logger
      */

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleCache.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleCache.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/BundleCache.java Mon Jan 28 01:32:41 2008
@@ -26,9 +26,6 @@
  */
 public class BundleCache {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /**
      * the default logger
      */

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionRecoveryManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionRecoveryManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionRecoveryManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionRecoveryManager.java Mon Jan 28 01:32:41 2008
@@ -127,7 +127,9 @@
      * @param password the password to use for the connection
      * @throws RepositoryException if the database driver could not be loaded
      */
-    public ConnectionRecoveryManager(boolean block, String driver, String url, String user, String password) throws RepositoryException {
+    public ConnectionRecoveryManager(
+            boolean block, String driver, String url, String user, String password)
+            throws RepositoryException {
         this.block = block;
         this.driver = driver;
         this.url = url;
@@ -248,7 +250,9 @@
      * @throws SQLException if an error occurs
      * @throws RepositoryException if the database driver could not be loaded
      */
-    public synchronized PreparedStatement executeStmt(String sql, Object[] params, boolean returnGeneratedKeys, int maxRows) throws SQLException, RepositoryException {
+    public synchronized PreparedStatement executeStmt(
+            String sql, Object[] params, boolean returnGeneratedKeys, int maxRows)
+            throws SQLException, RepositoryException {
         int trials = 2;
         SQLException lastException  = null;
         do {
@@ -273,7 +277,9 @@
      * @throws SQLException if an error occurs
      * @throws RepositoryException if the database driver could not be loaded
      */
-    private PreparedStatement executeStmtInternal(String sql, Object[] params, boolean returnGeneratedKeys, int maxRows) throws SQLException, RepositoryException {
+    private PreparedStatement executeStmtInternal(
+            String sql, Object[] params, boolean returnGeneratedKeys, int maxRows)
+            throws SQLException, RepositoryException {
         try {
             String key = sql;
             if (returnGeneratedKeys) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/DbNameIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/DbNameIndex.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/DbNameIndex.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/DbNameIndex.java Mon Jan 28 01:32:41 2008
@@ -36,11 +36,6 @@
 public class DbNameIndex implements StringIndex {
 
     /**
-     * The CVS/SVN id
-     */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
-    /**
      * The class that manages statement execution and recovery from connection loss.
      */
     protected ConnectionRecoveryManager connectionManager;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/HashMapIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/HashMapIndex.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/HashMapIndex.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/HashMapIndex.java Mon Jan 28 01:32:41 2008
@@ -36,9 +36,6 @@
  */
 public class HashMapIndex implements StringIndex {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /**
      * holds the string-to-index lookups.
      */

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ItemStateBinding.java Mon Jan 28 01:32:41 2008
@@ -43,9 +43,6 @@
  */
 public class ItemStateBinding {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /**
      * serialization version 1
      */

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NGKDbNameIndex.java Mon Jan 28 01:32:41 2008
@@ -27,11 +27,6 @@
 public class NGKDbNameIndex extends DbNameIndex {
 
     /**
-     * The CVS/SVN id
-     */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
-    /**
      * Creates a new index that is stored in a db.
      * @param con the ConnectionRecoveryManager
      * @param schemaObjectPrefix the prefix for table names

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NodePropBundle.java Mon Jan 28 01:32:41 2008
@@ -45,9 +45,6 @@
  */
 public class NodePropBundle {
 
-    /** the cvs/svn id */
-    static final String CVS_ID = "$URL$ $Rev$ $Date$";
-
     /**
      * default logger
      */

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/OraclePersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -88,8 +88,8 @@
     private static Logger log = LoggerFactory.getLogger(OraclePersistenceManager.class);
 
     private Class blobClass;
-    private Integer DURATION_SESSION_CONSTANT;
-    private Integer MODE_READWRITE_CONSTANT;
+    private Integer durationSessionConstant;
+    private Integer modeReadWriteConstant;
 
     /** the variable for the Oracle table space */
     public static final String TABLE_SPACE_VARIABLE =
@@ -154,9 +154,9 @@
         // use the Connection object for using the exact same
         // class loader that the Oracle driver was loaded with
         blobClass = con.getClass().getClassLoader().loadClass("oracle.sql.BLOB");
-        DURATION_SESSION_CONSTANT =
+        durationSessionConstant =
                 new Integer(blobClass.getField("DURATION_SESSION").getInt(null));
-        MODE_READWRITE_CONSTANT =
+        modeReadWriteConstant =
                 new Integer(blobClass.getField("MODE_READWRITE").getInt(null));
     }
 
@@ -370,9 +370,9 @@
         Method createTemporary = blobClass.getMethod("createTemporary",
                 new Class[]{Connection.class, Boolean.TYPE, Integer.TYPE});
         Object blob = createTemporary.invoke(null,
-                new Object[]{con, Boolean.FALSE, DURATION_SESSION_CONSTANT});
+                new Object[]{con, Boolean.FALSE, durationSessionConstant});
         Method open = blobClass.getMethod("open", new Class[]{Integer.TYPE});
-        open.invoke(blob, new Object[]{MODE_READWRITE_CONSTANT});
+        open.invoke(blob, new Object[]{modeReadWriteConstant});
         Method getBinaryOutputStream =
                 blobClass.getMethod("getBinaryOutputStream", new Class[0]);
         OutputStream out = (OutputStream) getBinaryOutputStream.invoke(blob, null);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/SimpleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/SimpleDbPersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/SimpleDbPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/db/SimpleDbPersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -17,10 +17,8 @@
 package org.apache.jackrabbit.core.persistence.db;
 
 import org.apache.jackrabbit.core.persistence.bundle.util.ConnectionFactory;
-import org.apache.jackrabbit.core.persistence.util.Serializer;
 
 import java.sql.Connection;
-import java.sql.DriverManager;
 import java.sql.SQLException;
 
 import javax.jcr.RepositoryException;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ResourceBasedBLOBStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ResourceBasedBLOBStore.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ResourceBasedBLOBStore.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/util/ResourceBasedBLOBStore.java Mon Jan 28 01:32:41 2008
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.persistence.util;
 
-import org.apache.jackrabbit.core.PropertyId;
 import org.apache.jackrabbit.core.fs.FileSystemResource;
 
 /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/xml/XMLPersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -566,13 +566,15 @@
                     writer = new BufferedWriter(osw);
                 }
 
+                String parentId = (state.getParentId() == null) ? "" : state.getParentId().getUUID().toString();
+                String encodedNodeType = Text.encodeIllegalXMLCharacters(state.getNodeTypeName().toString());
                 writer.write("<?xml version=\"1.0\" encoding=\"" + encoding + "\"?>\n");
                 writer.write("<" + NODE_ELEMENT + " "
                         + UUID_ATTRIBUTE + "=\"" + id.getUUID() + "\" "
-                        + PARENTUUID_ATTRIBUTE + "=\"" + (state.getParentId() == null ? "" : state.getParentId().getUUID().toString()) + "\" "
+                        + PARENTUUID_ATTRIBUTE + "=\"" + parentId + "\" "
                         + DEFINITIONID_ATTRIBUTE + "=\"" + state.getDefinitionId().toString() + "\" "
                         + MODCOUNT_ATTRIBUTE + "=\"" + state.getModCount() + "\" "
-                        + NODETYPE_ATTRIBUTE + "=\"" + Text.encodeIllegalXMLCharacters(state.getNodeTypeName().toString()) + "\">\n");
+                        + NODETYPE_ATTRIBUTE + "=\"" + encodedNodeType + "\">\n");
 
                 // mixin types
                 writer.write("\t<" + MIXINTYPES_ELEMENT + ">\n");

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/AbstractQueryHandler.java Mon Jan 28 01:32:41 2008
@@ -16,7 +16,6 @@
  */
 package org.apache.jackrabbit.core.query;
 
-import org.apache.jackrabbit.core.NodeId;
 import org.apache.jackrabbit.core.NodeIdIterator;
 import org.apache.jackrabbit.core.SessionImpl;
 import org.apache.jackrabbit.core.ItemManager;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/FineGrainedISMLocking.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/FineGrainedISMLocking.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/FineGrainedISMLocking.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/FineGrainedISMLocking.java Mon Jan 28 01:32:41 2008
@@ -46,7 +46,7 @@
     /**
      * An anonymous read lock without an id assigned.
      */
-    private final ReadLock ANONYMOUS_READ_LOCK = new ReadLockImpl();
+    private final ReadLock anonymousReadLock = new ReadLockImpl();
 
     /**
      * The active writer or <code>null</code> if there is none.
@@ -195,7 +195,7 @@
             } finally {
                 exclusive.release();
             }
-            return ANONYMOUS_READ_LOCK;
+            return anonymousReadLock;
         }
 
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/ItemState.java Mon Jan 28 01:32:41 2008
@@ -203,7 +203,9 @@
      */
     protected void reconnect() {
         if (this.overlayedState == null) {
-            throw new IllegalStateException("Item state cannot be reconnected because there's no underlying state to reconnect to: " + this);
+            throw new IllegalStateException(
+                    "Item state cannot be reconnected because there's no"
+                    + " underlying state to reconnect to: " + this);
         }
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/PropertyState.java Mon Jan 28 01:32:41 2008
@@ -328,7 +328,9 @@
         }
     }
 
-    private InternalValue createInternalValueFromInputStream(final InputStream stream, final long length) throws RepositoryException {
+    private InternalValue createInternalValueFromInputStream(
+            final InputStream stream, final long length)
+            throws RepositoryException {
         return InternalValue.create(new InputStream() {
 
             private long consumed = 0;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/SharedItemStateManager.java Mon Jan 28 01:32:41 2008
@@ -23,7 +23,6 @@
 import org.apache.jackrabbit.core.cluster.UpdateEventChannel;
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
 import org.apache.jackrabbit.core.persistence.bundle.CachingPersistenceManager;
-import org.apache.jackrabbit.core.version.XAVersionManager;
 import org.apache.jackrabbit.core.nodetype.EffectiveNodeType;
 import org.apache.jackrabbit.core.nodetype.NodeDefId;
 import org.apache.jackrabbit.core.nodetype.NodeTypeConflictException;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/mem/InMemPersistenceManager.java Mon Jan 28 01:32:41 2008
@@ -26,4 +26,4 @@
 public class InMemPersistenceManager
         extends org.apache.jackrabbit.core.persistence.mem.InMemPersistenceManager
         implements PersistenceManager {
-}
\ No newline at end of file
+}

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/InternalValue.java Mon Jan 28 01:32:41 2008
@@ -79,7 +79,8 @@
     /**
      * If set to 'true', the data store is used when configured in repository.xml
      */
-    public static final boolean USE_DATA_STORE = Boolean.valueOf(System.getProperty("org.jackrabbit.useDataStore", "true")).booleanValue();
+    public static final boolean USE_DATA_STORE =
+        Boolean.valueOf(System.getProperty("org.jackrabbit.useDataStore", "true")).booleanValue();
 
     /**
      * Temporary binary values smaller or equal this size are kept in memory

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalFrozenNodeImpl.java Mon Jan 28 01:32:41 2008
@@ -293,23 +293,18 @@
             } else {
                 opv = prop.getDefinition().getOnParentVersion();
             }
-            switch (opv) {
-                case OnParentVersionAction.ABORT:
-                    parent.reload();
-                    throw new VersionException("Checkin aborted due to OPV in " + prop.safeGetJCRPath());
-                case OnParentVersionAction.COMPUTE:
-                case OnParentVersionAction.IGNORE:
-                case OnParentVersionAction.INITIALIZE:
-                    break;
-                case OnParentVersionAction.VERSION:
-                case OnParentVersionAction.COPY:
-                    // ignore frozen properties
-                    if (!prop.getQName().equals(NameConstants.JCR_PRIMARYTYPE)
-                            && !prop.getQName().equals(NameConstants.JCR_MIXINTYPES)
-                            && !prop.getQName().equals(NameConstants.JCR_UUID)) {
-                        node.copyFrom(prop);
-                    }
-                    break;
+
+            if (opv == OnParentVersionAction.ABORT) {
+                parent.reload();
+                throw new VersionException("Checkin aborted due to OPV in " + prop.safeGetJCRPath());
+            } else if (opv == OnParentVersionAction.VERSION
+                    || opv == OnParentVersionAction.COPY) {
+                // ignore frozen properties
+                if (!prop.getQName().equals(NameConstants.JCR_PRIMARYTYPE)
+                        && !prop.getQName().equals(NameConstants.JCR_MIXINTYPES)
+                        && !prop.getQName().equals(NameConstants.JCR_UUID)) {
+                    node.copyFrom(prop);
+                }
             }
         }
 
@@ -323,31 +318,25 @@
             } else {
                 opv = child.getDefinition().getOnParentVersion();
             }
-            switch (opv) {
-                case OnParentVersionAction.ABORT:
-                    throw new VersionException("Checkin aborted due to OPV in " + child.safeGetJCRPath());
-                case OnParentVersionAction.COMPUTE:
-                case OnParentVersionAction.IGNORE:
-                case OnParentVersionAction.INITIALIZE:
-                    break;
-                case OnParentVersionAction.VERSION:
-                    if (child.isNodeType(NameConstants.MIX_VERSIONABLE)) {
-                        // create frozen versionable child
-                        NodeStateEx newChild = node.addNode(child.getQName(), NameConstants.NT_VERSIONEDCHILD, null, false);
-                        newChild.setPropertyValue(NameConstants.JCR_CHILDVERSIONHISTORY,
-                                InternalValue.create(new UUID(child.getVersionHistory().getUUID())));
-                        /*
+
+            if (opv == OnParentVersionAction.ABORT) {
+                throw new VersionException("Checkin aborted due to OPV in " + child.safeGetJCRPath());
+            } else if (opv == OnParentVersionAction.VERSION) {
+                if (child.isNodeType(NameConstants.MIX_VERSIONABLE)) {
+                    // create frozen versionable child
+                    NodeStateEx newChild = node.addNode(child.getQName(), NameConstants.NT_VERSIONEDCHILD, null, false);
+                    newChild.setPropertyValue(NameConstants.JCR_CHILDVERSIONHISTORY,
+                            InternalValue.create(new UUID(child.getVersionHistory().getUUID())));
+                    /*
                         newChild.setPropertyValue(JCR_BASEVERSION,
                                 InternalValue.create(child.getBaseVersion().getUUID()));
-                        */
-                        break;
-                    }
+                     */
+                } else {
                     // else copy but do not recurse
                     checkin(node, child.getQName(), child, MODE_COPY);
-                    break;
-                case OnParentVersionAction.COPY:
-                    checkin(node, child.getQName(), child, MODE_COPY_RECURSIVE);
-                    break;
+                }
+            } else if (opv == OnParentVersionAction.COPY) {
+                checkin(node, child.getQName(), child, MODE_COPY_RECURSIVE);
             }
         }
         return node;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersion.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersion.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersion.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersion.java Mon Jan 28 01:32:41 2008
@@ -18,7 +18,6 @@
 
 import org.apache.jackrabbit.spi.Name;
 
-import javax.jcr.version.Version;
 import java.util.Calendar;
 
 /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistory.java Mon Jan 28 01:32:41 2008
@@ -21,7 +21,6 @@
 import org.apache.jackrabbit.uuid.UUID;
 
 import javax.jcr.version.VersionException;
-import java.util.Iterator;
 
 /**
  * This interface defines the internal version history.

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionSelector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionSelector.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionSelector.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionSelector.java Mon Jan 28 01:32:41 2008
@@ -16,8 +16,6 @@
  */
 package org.apache.jackrabbit.core.version;
 
-import org.apache.jackrabbit.core.NodeImpl;
-
 import javax.jcr.RepositoryException;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionHistory;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java?rev=615802&r1=615801&r2=615802&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SysViewSAXEventGenerator.java Mon Jan 28 01:32:41 2008
@@ -54,9 +54,18 @@
     private static final Attributes ATTRS_BINARY_ENCODED_VALUE;
     static {
         AttributesImpl attrs = new AttributesImpl();
-        attrs.addAttribute(Name.NS_XMLNS_URI, NS_XMLSCHEMA_INSTANCE_PREFIX, "xmlns:" + NS_XMLSCHEMA_INSTANCE_PREFIX, CDATA_TYPE, NS_XMLSCHEMA_INSTANCE_URI);
-        attrs.addAttribute(Name.NS_XMLNS_URI, NS_XMLSCHEMA_PREFIX, "xmlns:" + NS_XMLSCHEMA_PREFIX, CDATA_TYPE, NS_XMLSCHEMA_URI);
-        attrs.addAttribute(NS_XMLSCHEMA_INSTANCE_URI, "type", NS_XMLSCHEMA_INSTANCE_PREFIX + ":type", "CDATA", NS_XMLSCHEMA_PREFIX + ":base64Binary");
+        attrs.addAttribute(
+                Name.NS_XMLNS_URI, NS_XMLSCHEMA_INSTANCE_PREFIX,
+                "xmlns:" + NS_XMLSCHEMA_INSTANCE_PREFIX,
+                CDATA_TYPE, NS_XMLSCHEMA_INSTANCE_URI);
+        attrs.addAttribute(
+                Name.NS_XMLNS_URI, NS_XMLSCHEMA_PREFIX,
+                "xmlns:" + NS_XMLSCHEMA_PREFIX,
+                CDATA_TYPE, NS_XMLSCHEMA_URI);
+        attrs.addAttribute(
+                NS_XMLSCHEMA_INSTANCE_URI, "type",
+                NS_XMLSCHEMA_INSTANCE_PREFIX + ":type",
+                CDATA_TYPE, NS_XMLSCHEMA_PREFIX + ":base64Binary");
         ATTRS_BINARY_ENCODED_VALUE = attrs;
     }
 
@@ -173,7 +182,7 @@
 
                 if (val.getType() != PropertyType.BINARY) {
                     String ser = val.getString();
-                    for (int ci = 0; ci < ser.length() && mustSendBinary == false; ci++) {
+                    for (int ci = 0; ci < ser.length() && !mustSendBinary; ci++) {
                         char c = ser.charAt(ci);
                         if (c >= 0 && c < 32 && c != '\r' && c != '\n' && c != '\t') {
                             mustSendBinary = true;



Mime
View raw message