jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r615671 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core: ./ cluster/ fs/db/ fs/mem/ journal/ nodetype/ observation/ persistence/bundle/ persistence/bundle/util/ query/ query/lucene/ security/ state/ value/ ve...
Date Sun, 27 Jan 2008 22:59:44 GMT
Author: jukka
Date: Sun Jan 27 14:59:36 2008
New Revision: 615671

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

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/LocalNamespaceMappings.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SearchManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.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/mem/MemoryFileSystem.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileJournal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitsetENTCacheImpl.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/observation/EventState.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/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/util/BundleCache.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ErrorHandling.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/LRUNodeIdCache.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NamespaceIndex.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/query/RelationQueryNode.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AggregateRuleImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CaseTermQuery.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexFormatVersion.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingConfigurationImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingQueue.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JQOM2LuceneQueryBuilder.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MoreLikeThis.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PropertiesSynonymProvider.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryResultImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RangeQuery.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimpleExcerptProvider.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/Util.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WeightedHighlighter.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardQuery.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/SimpleJBossAccessManager.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/NodeState.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInMemory.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.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/InternalVersionHistoryImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/LocalNamespaceMappings.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/LocalNamespaceMappings.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/LocalNamespaceMappings.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/LocalNamespaceMappings.java Sun Jan 27 14:59:36 2008
@@ -260,7 +260,7 @@
      */
     public void namespaceRemoved(String uri) {
         if (uriToPrefix.containsKey(uri)) {
-            String prefix = (String)uriToPrefix.remove(uri);
+            String prefix = (String) uriToPrefix.remove(uri);
             prefixToURI.remove(prefix);
         }
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SearchManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SearchManager.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SearchManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SearchManager.java Sun Jan 27 14:59:36 2008
@@ -217,14 +217,13 @@
         try {
             if (nsReg.getPrefix(NS_FN_OLD_URI).equals(NS_FN_PREFIX)) {
                 // old uri is mapped to 'fn' prefix -> re-map
-                String prefix;
-                for (int i = 0; ; i++) {
+                String prefix = null;
+                for (int i = 0; prefix == null; i++) {
                     try {
                         nsReg.getURI(NS_FN_OLD_PREFIX + i);
                     } catch (NamespaceException e) {
                         // not mapped to uri
                         prefix = NS_FN_OLD_PREFIX + i;
-                        break;
                     }
                 }
                 nsReg.registerNamespace(prefix, NS_FN_OLD_URI);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/SessionImpl.java Sun Jan 27 14:59:36 2008
@@ -603,7 +603,7 @@
      */
     public GarbageCollector createDataStoreGarbageCollector() throws RepositoryException, ItemStateException {
         ArrayList pmList = new ArrayList();
-        VersionManagerImpl vm = (VersionManagerImpl)rep.getVersionManager();
+        VersionManagerImpl vm = (VersionManagerImpl) rep.getVersionManager();
         PersistenceManager pm = vm.getPersistenceManager();
         pmList.add(pm);
         String[] wspNames = rep.getWorkspaceNames();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/XASessionImpl.java Sun Jan 27 14:59:36 2008
@@ -403,8 +403,8 @@
         super.logout();
         // dispose the caches
         try {
-            ((XAVersionManager)versionMgr).close();
-        } catch(Exception e) {
+            ((XAVersionManager) versionMgr).close();
+        } catch (Exception e) {
             log.warn("error while closing XAVersionManager", e);
         }
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/ClusterNode.java Sun Jan 27 14:59:36 2008
@@ -264,7 +264,8 @@
             synchronized (this) {
                 try {
                     wait(syncDelay);
-                } catch (InterruptedException e) {}
+                } catch (InterruptedException e) {
+                }
 
                 if (status == STOPPED) {
                     return;

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -207,7 +207,8 @@
 
         try {
             // close shared prepared statements
-            for (Iterator it = preparedStatements.values().iterator(); it.hasNext(); ) {
+            Iterator it = preparedStatements.values().iterator();
+            while (it.hasNext()) {
                 closeStatement((PreparedStatement) it.next());
             }
             preparedStatements.clear();
@@ -1007,7 +1008,8 @@
         // gracefully in order to avoid potential memory leaks
 
         // close shared prepared statements
-        for (Iterator it = preparedStatements.values().iterator(); it.hasNext(); ) {
+        Iterator it = preparedStatements.values().iterator();
+        while (it.hasNext()) {
             closeStatement((PreparedStatement) it.next());
         }
         try {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/fs/mem/MemoryFileSystem.java Sun Jan 27 14:59:36 2008
@@ -248,7 +248,7 @@
         moves.put(srcPath, destPath);
         if (getEntry(srcPath).isFolder()) {
             srcPath = srcPath + "/";
-            Iterator iterator= entries.keySet().iterator();
+            Iterator iterator = entries.keySet().iterator();
             while (iterator.hasNext()) {
                 String name = (String) iterator.next();
                 if (name.startsWith(srcPath)) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileJournal.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileJournal.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/FileJournal.java Sun Jan 27 14:59:36 2008
@@ -206,7 +206,8 @@
     /**
      * {@inheritDoc}
      */
-    public void close() {}
+    public void close() {
+    }
 
     /**
      * Bean getters

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitsetENTCacheImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitsetENTCacheImpl.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitsetENTCacheImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/nodetype/BitsetENTCacheImpl.java Sun Jan 27 14:59:36 2008
@@ -42,7 +42,7 @@
      */
     private static final long[] OR_MASK = new long[BPW];
     static {
-        for (int i=0; i<BPW; i++) {
+        for (int i = 0; i < BPW; i++) {
             OR_MASK[i] = 1L << i;
         }
     }
@@ -168,7 +168,7 @@
                     i = new Integer(idx);
                     nameIndex.put(name, i);
                     if (idx >= names.length) {
-                        Name[] newNames = new Name[names.length*2];
+                        Name[] newNames = new Name[names.length * 2];
                         System.arraycopy(names, 0, newNames, 0, names.length);
                         names = newNames;
                     }
@@ -265,11 +265,11 @@
          */
         public BitsetKey(Name[] names, int maxBit) {
             this.names = names;
-            bits = new long[maxBit/BPW+1];
+            bits = new long[maxBit / BPW + 1];
 
-            for (int i=0; i<names.length; i++) {
+            for (int i = 0; i < names.length; i++) {
                 int n = getBitNumber(names[i]);
-                bits[n/BPW] |= OR_MASK[n%BPW];
+                bits[n / BPW] |= OR_MASK[n % BPW];
             }
             hashCode = calcHashCode();
         }
@@ -283,10 +283,10 @@
             this.bits = bits;
             names = new Name[numBits];
             int i = nextSetBit(0);
-            int j=0;
+            int j = 0;
             while (i >= 0) {
                 names[j++] = BitsetENTCacheImpl.this.getName(i);
-                i = nextSetBit(i+1);
+                i = nextSetBit(i + 1);
             }
             hashCode = calcHashCode();
         }
@@ -311,7 +311,7 @@
              */
             BitsetKey other = (BitsetKey) otherKey;
             int len = Math.max(bits.length, other.bits.length);
-            for (int i=0; i<len; i++) {
+            for (int i = 0; i < len; i++) {
                 long w1 = i < bits.length ? bits[i] : 0;
                 long w2 = i < other.bits.length ? other.bits[i] : 0;
                 long r = ~w1 & w2;
@@ -337,7 +337,7 @@
             int len = Math.max(bits.length, other.bits.length);
             long[] newBits = new long[len];
             int numBits = 0;
-            for (int i=0; i<len; i++) {
+            for (int i = 0; i < len; i++) {
                 long w1 = i < bits.length ? bits[i] : 0;
                 long w2 = i < other.bits.length ? other.bits[i] : 0;
                 newBits[i] = w1 & ~w2;
@@ -354,8 +354,8 @@
          * @return the bit position of the bit or -1 if none found.
          */
         private int nextSetBit(int fromIndex) {
-            int addr = fromIndex/BPW;
-            int off = fromIndex%BPW;
+            int addr = fromIndex / BPW;
+            int off = fromIndex % BPW;
             while (addr < bits.length) {
                 if (bits[addr] != 0) {
                     while (off < BPW) {
@@ -364,7 +364,7 @@
                         }
                         off++;
                     }
-                    off=0;
+                    off = 0;
                 }
                 addr++;
             }
@@ -387,7 +387,7 @@
              val =  (val + (val >>> 4)) & 0x0f0f0f0f0f0f0f0fL;
              val += val >>> 8;
              val += val >>> 16;
-             return ((int)(val) + (int)(val >>> 32)) & 0xff;
+             return ((int) (val) + (int) (val >>> 32)) & 0xff;
          }
 
 
@@ -403,8 +403,8 @@
             if (res == 0) {
                 int adr = Math.max(bits.length, o.bits.length) - 1;
                 while (adr >= 0) {
-                    long w1 = adr<bits.length ? bits[adr] : 0;
-                    long w2 = adr<o.bits.length ? o.bits[adr] : 0;
+                    long w1 = adr < bits.length ? bits[adr] : 0;
+                    long w2 = adr < o.bits.length ? o.bits[adr] : 0;
                     if (w1 != w2) {
                         // some signed arithmetic here
                         long h1 = w1 >>> 32;
@@ -413,7 +413,7 @@
                             h1 = w1 & 0x0ffffL;
                             h2 = w2 & 0x0ffffL;
                         }
-                        return (int) (h2-h1);
+                        return (int) (h2 - h1);
                     }
                     adr--;
                 }
@@ -435,8 +435,8 @@
                 }
                 int adr = Math.max(bits.length, o.bits.length) - 1;
                 while (adr >= 0) {
-                    long w1 = adr<bits.length ? bits[adr] : 0;
-                    long w2 = adr<o.bits.length ? o.bits[adr] : 0;
+                    long w1 = adr < bits.length ? bits[adr] : 0;
+                    long w2 = adr < o.bits.length ? o.bits[adr] : 0;
                     if (w1 != w2) {
                         return false;
                     }
@@ -460,15 +460,15 @@
          */
         private int calcHashCode() {
             long h = 1234;
-            int addr = bits.length -1;
-            while (addr >=0 && bits[addr] == 0) {
+            int addr = bits.length - 1;
+            while (addr >= 0 && bits[addr] == 0) {
                 addr--;
             }
-            while (addr >=0) {
+            while (addr >= 0) {
                 h ^= bits[addr] * (addr + 1);
                 addr--;
             }
-            return (int)((h >> 32) ^ h);
+            return (int) ((h >> 32) ^ h);
         }
 
         /**
@@ -478,10 +478,10 @@
             StringBuffer buf = new StringBuffer("w=");
             buf.append(names.length);
             int i = nextSetBit(0);
-            while (i>=0) {
+            while (i >= 0) {
                 buf.append(", ").append(i).append("=");
                 buf.append(BitsetENTCacheImpl.this.getName(i));
-                i = nextSetBit(i+1);
+                i = nextSetBit(i + 1);
             }
             return buf.toString();
         }

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -66,7 +66,7 @@
         orderableChildNodes = def.hasOrderableChildNodes();
         NodeDefinition[] nodeDefs = def.getDeclaredChildNodeDefinitions();
         for (int i = 0; i < nodeDefs.length; i++) {
-            nodeDefinitionTemplates.add(new NodeDefinitionTemplateImpl(nodeDefs[i])) ;
+            nodeDefinitionTemplates.add(new NodeDefinitionTemplateImpl(nodeDefs[i]));
         }
         PropertyDefinition[] propDefs = def.getDeclaredPropertyDefinitions();
         for (int i = 0; i < propDefs.length; i++) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/observation/EventState.java Sun Jan 27 14:59:36 2008
@@ -505,7 +505,8 @@
             } catch (NoSuchNodeTypeException e) {
                 log.warn("Unknown node type: " + nodeType);
             }
-            for (Iterator it = mixins.iterator(); it.hasNext(); ) {
+            Iterator it = mixins.iterator();
+            while (it.hasNext()) {
                 Name mixinName = (Name) it.next();
                 try {
                     tmp.add(ntMgr.getNodeType(mixinName));

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -134,7 +134,7 @@
      * @return the size of the bundlecache in megabytes.
      */
     public String getBundleCacheSize() {
-        return String.valueOf(bundleCacheSize/(1024 * 1024));
+        return String.valueOf(bundleCacheSize / (1024 * 1024));
     }
 
     /**

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -249,7 +249,7 @@
             setSchema("derby");
         }
         if (getUrl() == null) {
-            setUrl("jdbc:derby:"+ context.getHomeDir().getPath() +"/db/itemState;create=true");
+            setUrl("jdbc:derby:" + context.getHomeDir().getPath() + "/db/itemState;create=true");
         }
         if (getUser() == null) {
             setUser("");

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -80,7 +80,7 @@
             setDriver("org.h2.Driver");
         }
         if (getUrl() == null) {
-            setUrl("jdbc:h2:file:"+ context.getHomeDir().getPath() +"/db/itemState");
+            setUrl("jdbc:h2:file:" + context.getHomeDir().getPath() + "/db/itemState");
         }
         if (getUser() == null) {
             setUser("sa");

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -102,10 +102,10 @@
         } else {
             misses++;
         }
-        if (log.isInfoEnabled() && (hits+misses)%10000 == 0) {
-            long c = curSize/1024;
-            long m = maxSize/1024;
-            long a = bundles.size()>0 ? curSize/bundles.size() : 0;
+        if (log.isInfoEnabled() && (hits + misses) % 10000 == 0) {
+            long c = curSize / 1024;
+            long m = maxSize / 1024;
+            long a = bundles.size() > 0 ? curSize / bundles.size() : 0;
             log.info("num=" + bundles.size() + " mem=" + c + "k max=" + m + "k avg=" + a
                     + " hits=" + hits + " miss=" + misses);
         }
@@ -129,11 +129,11 @@
             entry.size = bundle.getSize();
         }
         bundles.put(bundle.getId(), entry);
-        curSize+= entry.size;
+        curSize += entry.size;
         // now limit size of cache
         while (curSize > maxSize) {
             entry = (Entry) bundles.remove(0);
-            curSize-= entry.size;
+            curSize -= entry.size;
         }
     }
 
@@ -158,7 +158,7 @@
     public NodePropBundle remove(NodeId id) {
         Entry entry = (Entry) bundles.remove(id);
         if (entry != null) {
-            curSize-= entry.size;
+            curSize -= entry.size;
             return entry.bundle;
         } else {
             return null;
@@ -170,9 +170,9 @@
      */
     public void clear() {
         bundles.clear();
-        curSize=0;
-        hits=0;
-        misses=0;
+        curSize = 0;
+        hits = 0;
+        misses = 0;
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ErrorHandling.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ErrorHandling.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ErrorHandling.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ErrorHandling.java Sun Jan 27 14:59:36 2008
@@ -51,8 +51,8 @@
      * @param str flags
      */
     public ErrorHandling(String str) {
-        for (int i=0; i<CODES.length; i++) {
-            if (str.indexOf(CODES[i])>=0) {
+        for (int i = 0; i < CODES.length; i++) {
+            if (str.indexOf(CODES[i]) >= 0) {
                 flags.add(CODES[i]);
             }
         }

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -146,7 +146,7 @@
             try {
                 save();
             } catch (Exception e) {
-                throw new IllegalStateException("Unable to store lookup table: "  +e);
+                throw new IllegalStateException("Unable to store lookup table: "  + e);
             }
         }
         return idx.intValue();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/LRUNodeIdCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/LRUNodeIdCache.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/LRUNodeIdCache.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/LRUNodeIdCache.java Sun Jan 27 14:59:36 2008
@@ -71,7 +71,7 @@
             missing.put(id, id);
             hits++;
         }
-        if (log.isInfoEnabled() && (hits+misses)%10000 == 0) {
+        if (log.isInfoEnabled() && (hits + misses) % 10000 == 0) {
             log.info("num=" + missing.size() + "/" + maxSize + " hits=" + hits + " miss=" + misses);
         }
         return o != null;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NamespaceIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NamespaceIndex.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NamespaceIndex.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/NamespaceIndex.java Sun Jan 27 14:59:36 2008
@@ -52,7 +52,7 @@
         try {
             return nsReg.getURIIndex(uri);
         } catch (NamespaceException e) {
-            throw new IllegalStateException("URI not valid? "  +e.toString());
+            throw new IllegalStateException("URI not valid? "  + e.toString());
         }
     }
 

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -178,7 +178,7 @@
 
         // add fake property entries
         state.addPropertyName(NameConstants.JCR_PRIMARYTYPE);
-        if (mixinTypeNames.size()>0) {
+        if (mixinTypeNames.size() > 0) {
             state.addPropertyName(NameConstants.JCR_MIXINTYPES);
         }
         // uuid is special...only if 'referenceable'
@@ -376,7 +376,7 @@
         return properties.containsKey(name)
                 || name.equals(NameConstants.JCR_PRIMARYTYPE)
                 || (isReferenceable && name.equals(NameConstants.JCR_UUID))
-                || (mixinTypeNames.size()>0 && name.equals(NameConstants.JCR_MIXINTYPES));
+                || (mixinTypeNames.size() > 0 && name.equals(NameConstants.JCR_MIXINTYPES));
     }
 
     /**
@@ -699,7 +699,7 @@
         private void destroy(BLOBStore blobStore) {
             // delete blobs if needed
             if (blobIds != null) {
-                for (int i=0; i<blobIds.length; i++) {
+                for (int i = 0; i < blobIds.length; i++) {
                     if (blobIds[i] != null) {
                         try {
                             blobStore.remove(blobIds[i]);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/RelationQueryNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/RelationQueryNode.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/RelationQueryNode.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/RelationQueryNode.java Sun Jan 27 14:59:36 2008
@@ -331,7 +331,7 @@
                     && valueLong == other.valueLong
                     && valuePosition == other.valuePosition
                     && (valueString == null ? other.valueString == null : valueString.equals(other.valueString))
-                    && (relPath == null ? other.relPath== null : relPath.equals(other.relPath));
+                    && (relPath == null ? other.relPath == null : relPath.equals(other.relPath));
         }
         return false;
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractExcerpt.java Sun Jan 27 14:59:36 2008
@@ -182,7 +182,8 @@
         Set relevantTerms = new HashSet();
         query.extractTerms(extractedTerms);
         // only keep terms for fulltext fields
-        for (Iterator it = extractedTerms.iterator(); it.hasNext(); ) {
+        Iterator it = extractedTerms.iterator();
+        while (it.hasNext()) {
             Term t = (Term) it.next();
             if (t.field().equals(FieldNames.FULLTEXT)) {
                 relevantTerms.add(t);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractIndex.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractIndex.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AbstractIndex.java Sun Jan 27 14:59:36 2008
@@ -409,7 +409,8 @@
     private Document getFinishedDocument(Document doc) throws IOException {
         if (!Util.isDocumentReady(doc)) {
             Document copy = new Document();
-            for (Iterator fields = doc.getFields().iterator(); fields.hasNext(); ) {
+            Iterator fields = doc.getFields().iterator();
+            while (fields.hasNext()) {
                 Field f = (Field) fields.next();
                 Field field = null;
                 Field.TermVector tv = getTermVectorParameter(f);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AggregateRuleImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AggregateRuleImpl.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AggregateRuleImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/AggregateRuleImpl.java Sun Jan 27 14:59:36 2008
@@ -327,7 +327,8 @@
             }
             if (pattern.getLength() - 1 == offset) {
                 // last segment -> add to collector if node type matches
-                for (Iterator it = cne.iterator(); it.hasNext(); ) {
+                Iterator it = cne.iterator();
+                while (it.hasNext()) {
                     NodeId id = ((NodeState.ChildNodeEntry) it.next()).getId();
                     NodeState ns = (NodeState) ism.getItemState(id);
                     if (nodeTypeName == null || ns.getNodeTypeName().equals(nodeTypeName)) {
@@ -337,7 +338,8 @@
             } else {
                 // traverse
                 offset++;
-                for (Iterator it = cne.iterator(); it.hasNext(); ) {
+                Iterator it = cne.iterator();
+                while (it.hasNext()) {
                     NodeId id = ((NodeState.ChildNodeEntry) it.next()).getId();
                     resolve((NodeState) ism.getItemState(id), collector, offset);
                 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CachingIndexReader.java Sun Jan 27 14:59:36 2008
@@ -246,7 +246,8 @@
             }
         }
         double foreignParents = 0;
-        for (Iterator it = docs.values().iterator(); it.hasNext(); ) {
+        Iterator it = docs.values().iterator();
+        while (it.hasNext()) {
             NodeInfo info = (NodeInfo) it.next();
             NodeInfo parent = (NodeInfo) docs.get(info.parent);
             if (parent != null) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CaseTermQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CaseTermQuery.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CaseTermQuery.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/CaseTermQuery.java Sun Jan 27 14:59:36 2008
@@ -121,7 +121,8 @@
                     rangeScans.add(new RangeScan(reader, term, term));
                 }
 
-                for (Iterator it = rangeScans.iterator(); it.hasNext(); ) {
+                Iterator it = rangeScans.iterator();
+                while (it.hasNext()) {
                     TermEnum terms = (TermEnum) it.next();
                     do {
                         Term t = terms.term();
@@ -141,7 +142,8 @@
                     } while (terms.next());
                 }
             } finally {
-                for (Iterator it = rangeScans.iterator(); it.hasNext(); ) {
+                Iterator it = rangeScans.iterator();
+                while (it.hasNext()) {
                     TermEnum terms = (TermEnum) it.next();
                     try {
                         terms.close();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DefaultHighlighter.java Sun Jan 27 14:59:36 2008
@@ -404,7 +404,8 @@
 
         public void trim() {
             int end = startOffset + (mergeGap / 2);
-            for (Iterator it = offsetInfosList.iterator(); it.hasNext(); ) {
+            Iterator it = offsetInfosList.iterator();
+            while (it.hasNext()) {
                 TermVectorOffsetInfo tvoi = (TermVectorOffsetInfo) it.next();
                 if (tvoi.getStartOffset() > end) {
                     it.remove();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexFormatVersion.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexFormatVersion.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexFormatVersion.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexFormatVersion.java Sun Jan 27 14:59:36 2008
@@ -60,7 +60,7 @@
      * Returns the index format version
      * @return the index format version.
      */
-    public int getVersion(){
+    public int getVersion() {
         return version;
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingConfigurationImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingConfigurationImpl.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingConfigurationImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingConfigurationImpl.java Sun Jan 27 14:59:36 2008
@@ -146,12 +146,12 @@
                         String analyzerClassName = analyzerNode.getAttributes().getNamedItem("class").getNodeValue();
                         try {
                         Class clazz = Class.forName(analyzerClassName);
-                            if(clazz == JackrabbitAnalyzer.class) {
+                            if (clazz == JackrabbitAnalyzer.class) {
                                 log.warn("Not allowed to configure " + JackrabbitAnalyzer.class.getName() +  " for a property. " +
                                         "Using default analyzer for that property.");
                             }
-                            else if(Analyzer.class.isAssignableFrom(clazz)){
-                                Analyzer analyzer = (Analyzer)clazz.newInstance();
+                            else if (Analyzer.class.isAssignableFrom(clazz)) {
+                                Analyzer analyzer = (Analyzer) clazz.newInstance();
                                 NodeList propertyChildNodes = analyzerNode.getChildNodes();
                                 for (int k = 0; k < propertyChildNodes.getLength(); k++) {
                                     Node propertyNode = propertyChildNodes.item(k);
@@ -164,15 +164,16 @@
                                         fieldName = fieldName.substring(0, idx + 1)
                                                     + FieldNames.FULLTEXT_PREFIX + fieldName.substring(idx + 1);;
                                         Object prevAnalyzer = analyzers.put(fieldName, analyzer);
-                                        if(prevAnalyzer!=null){
-                                            log.warn("Property " + propName.getLocalName() + " has been configured for multiple analyzers. " +
-                                                    " Last configured analyzer is used");
+                                        if (prevAnalyzer != null) {
+                                            log.warn("Property " + propName.getLocalName()
+                                                    + " has been configured for multiple analyzers. "
+                                                    + " Last configured analyzer is used");
                                         }
                                     }
                                 }
                             } else {
                                 log.warn("org.apache.lucene.analysis.Analyzer is not a superclass of "
-                                        + analyzerClassName +". Ignoring this configure analyzer" );
+                                        + analyzerClassName + ". Ignoring this configure analyzer" );
                             }
                         } catch (ClassNotFoundException e) {
                             log.warn("Analyzer class not found: " + analyzerClassName, e);
@@ -279,8 +280,8 @@
      * @return the <code>analyzer</code> to use for indexing this property
      */
     public Analyzer getPropertyAnalyzer(String fieldName) {
-        if(analyzers.containsKey(fieldName)){
-            return (Analyzer)analyzers.get(fieldName);
+        if (analyzers.containsKey(fieldName)) {
+            return (Analyzer) analyzers.get(fieldName);
         }
         return null;
     }
@@ -301,7 +302,8 @@
             rules.addAll(r);
         }
 
-        for (Iterator it = state.getMixinTypeNames().iterator(); it.hasNext(); ) {
+        Iterator it = state.getMixinTypeNames().iterator();
+        while (it.hasNext()) {
             r = (List) configElements.get(it.next());
             if (r != null) {
                 if (rules == null) {
@@ -312,7 +314,8 @@
         }
 
         if (rules != null) {
-            for (Iterator it = rules.iterator(); it.hasNext(); ) {
+            it = rules.iterator();
+            while (it.hasNext()) {
                 IndexingRule ir = (IndexingRule) it.next();
                 if (ir.appliesTo(state)) {
                     return ir;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingQueue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingQueue.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingQueue.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/IndexingQueue.java Sun Jan 27 14:59:36 2008
@@ -91,7 +91,8 @@
             finished.addAll(pendingDocuments.values());
         }
 
-        for (Iterator it = finished.iterator(); it.hasNext(); ) {
+        Iterator it = finished.iterator();
+        while (it.hasNext()) {
             Document doc = (Document) it.next();
             if (!Util.isDocumentReady(doc)) {
                 it.remove();
@@ -151,7 +152,8 @@
      */
     public synchronized void close() throws IOException {
         // go through pending documents and close readers
-        for (Iterator it = pendingDocuments.values().iterator(); it.hasNext(); ) {
+        Iterator it = pendingDocuments.values().iterator();
+        while (it.hasNext()) {
             Document doc = (Document) it.next();
             Util.disposeDocument(doc);
             it.remove();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JQOM2LuceneQueryBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JQOM2LuceneQueryBuilder.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JQOM2LuceneQueryBuilder.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JQOM2LuceneQueryBuilder.java Sun Jan 27 14:59:36 2008
@@ -636,7 +636,7 @@
         }
         Query q;
         if (terms.size() == 1) {
-            q= new TermQuery((Term) terms.get(0));
+            q = new TermQuery((Term) terms.get(0));
         } else {
             BooleanQuery b = new BooleanQuery();
             for (Iterator it = terms.iterator(); it.hasNext();) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitAnalyzer.java Sun Jan 27 14:59:36 2008
@@ -55,7 +55,7 @@
     /**
      * @param analyzer the default jackrabbit analyzer
      */
-    protected void setDefaultAnalyzer(Analyzer analyzer){
+    protected void setDefaultAnalyzer(Analyzer analyzer) {
         defaultAnalyzer = analyzer;
     }
 
@@ -65,9 +65,9 @@
      * analyzer than the default, this analyzer is used for tokenization
      */
     public TokenStream tokenStream(String fieldName, Reader reader) {
-        if(indexingConfig!=null){
+        if (indexingConfig != null) {
             Analyzer propertyAnalyzer = indexingConfig.getPropertyAnalyzer(fieldName);
-            if(propertyAnalyzer!=null){
+            if (propertyAnalyzer != null) {
                 return propertyAnalyzer.tokenStream(fieldName, reader);
             }
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MoreLikeThis.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MoreLikeThis.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MoreLikeThis.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MoreLikeThis.java Sun Jan 27 14:59:36 2008
@@ -153,7 +153,7 @@
      * Default maximum number of tokens to parse in each example doc field that is not stored with TermVector support.
      * @see #getMaxNumTokensParsed
      */
-    public static final int DEFAULT_MAX_NUM_TOKENS_PARSED=5000;
+    public static final int DEFAULT_MAX_NUM_TOKENS_PARSED = 5000;
 
     /**
      * Default analyzer to parse source doc with.
@@ -253,7 +253,7 @@
     /**
      * The maximum number of tokens to parse in each example doc field that is not stored with TermVector support
      */
-    private int maxNumTokensParsed=DEFAULT_MAX_NUM_TOKENS_PARSED;
+    private int maxNumTokensParsed = DEFAULT_MAX_NUM_TOKENS_PARSED;
 
     /**
      * Ignore words if less than this len.
@@ -755,22 +755,22 @@
      */
     private void addTermFrequencies(Map termFreqMap, TermFreqVector vector) {
         String[] terms = vector.getTerms();
-        int freqs[]=vector.getTermFrequencies();
+        int[] freqs = vector.getTermFrequencies();
         for (int j = 0; j < terms.length; j++) {
             String term = terms[j];
 
-            if(isNoiseWord(term)){
+            if (isNoiseWord(term)) {
                 continue;
             }
             // increment frequency
             Int cnt = (Int) termFreqMap.get(term);
             if (cnt == null) {
-                cnt=new Int();
+                cnt = new Int();
                 termFreqMap.put(term, cnt);
-                cnt.x=freqs[j];
+                cnt.x = freqs[j];
             }
             else {
-                cnt.x+=freqs[j];
+                cnt.x += freqs[j];
             }
         }
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/MultiIndex.java Sun Jan 27 14:59:36 2008
@@ -1143,7 +1143,8 @@
                     new Long(finished.size()));
 
             // remove documents from the queue
-            for (Iterator it = finished.keySet().iterator(); it.hasNext(); ) {
+            Iterator it = finished.keySet().iterator();
+            while (it.hasNext()) {
                 try {
                     indexingQueue.removeDocument(it.next().toString());
                 } catch (IOException e) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PropertiesSynonymProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PropertiesSynonymProvider.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PropertiesSynonymProvider.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/PropertiesSynonymProvider.java Sun Jan 27 14:59:36 2008
@@ -151,7 +151,8 @@
             Map synonyms = new HashMap();
             Properties props = new Properties();
             props.load(config.getInputStream());
-            for (Iterator it = props.entrySet().iterator(); it.hasNext(); ) {
+            Iterator it = props.entrySet().iterator();
+            while (it.hasNext()) {
                 Map.Entry e = (Map.Entry) it.next();
                 String key = (String) e.getKey();
                 String value = (String) e.getValue();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryResultImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryResultImpl.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryResultImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/QueryResultImpl.java Sun Jan 27 14:59:36 2008
@@ -294,7 +294,7 @@
                 numResults = result.length();
             }
 
-            int start = resultNodes.size() + invalid + (int)offset;
+            int start = resultNodes.size() + invalid + (int) offset;
             int max = Math.min(result.length(), numResults);
             for (int i = start; i < max && resultNodes.size() < maxResultSize; i++) {
                 NodeId id = NodeId.valueOf(result.doc(i).get(FieldNames.UUID));

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RangeQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RangeQuery.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RangeQuery.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/RangeQuery.java Sun Jan 27 14:59:36 2008
@@ -423,7 +423,8 @@
                 startTerms.add(new Term(lowerTerm.field(), termText.toString()));
             }
 
-            for (Iterator it = startTerms.iterator(); it.hasNext(); ) {
+            Iterator it = startTerms.iterator();
+            while (it.hasNext()) {
                 Term startTerm = (Term) it.next();
 
                 TermEnum terms = reader.terms(startTerm);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SearchIndex.java Sun Jan 27 14:59:36 2008
@@ -1122,7 +1122,7 @@
      */
     protected void retrieveAggregateRoot(Set removedNodeIds, Map map) {
         if (indexingConfig != null) {
-            AggregateRule aggregateRules[] = indexingConfig.getAggregateRules();
+            AggregateRule[] aggregateRules = indexingConfig.getAggregateRules();
             if (aggregateRules == null) {
                 return;
             }
@@ -1136,7 +1136,8 @@
                     TermDocs tDocs = reader.termDocs();
                     try {
                         ItemStateManager ism = getContext().getItemStateManager();
-                        for (Iterator it = removedNodeIds.iterator(); it.hasNext(); ) {
+                        Iterator it = removedNodeIds.iterator();
+                        while (it.hasNext()) {
                             NodeId id = (NodeId) it.next();
                             aggregateUUIDs = aggregateUUIDs.createTerm(
                                     id.getUUID().toString());

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimpleExcerptProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimpleExcerptProvider.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimpleExcerptProvider.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/SimpleExcerptProvider.java Sun Jan 27 14:59:36 2008
@@ -60,8 +60,8 @@
         try {
             NodeState nodeState = (NodeState) ism.getItemState(id);
             String separator = "";
-            for (Iterator it = nodeState.getPropertyNames().iterator();
-                 it.hasNext() && text.length() < maxFragmentSize; ) {
+            Iterator it = nodeState.getPropertyNames().iterator();
+            while (it.hasNext() && text.length() < maxFragmentSize) {
                 PropertyId propId = new PropertyId(id, (Name) it.next());
                 PropertyState propState = (PropertyState) ism.getItemState(propId);
                 if (propState.getType() == PropertyType.STRING) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/Util.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/Util.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/Util.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/Util.java Sun Jan 27 14:59:36 2008
@@ -41,7 +41,8 @@
      * @param old the document to dispose.
      */
     public static void disposeDocument(Document old) {
-        for (Enumeration e = old.fields(); e.hasMoreElements();) {
+        Enumeration e = old.fields();
+        while (e.hasMoreElements()) {
             Field f = (Field) e.nextElement();
             if (f.readerValue() != null) {
                 try {
@@ -62,7 +63,8 @@
      *         otherwise.
      */
     public static boolean isDocumentReady(Document doc) {
-        for (Enumeration fields = doc.fields(); fields.hasMoreElements(); ) {
+        Enumeration fields = doc.fields();
+        while (fields.hasMoreElements()) {
             Field f = (Field) fields.nextElement();
             if (f.readerValue() instanceof TextExtractorReader) {
                 TextExtractorReader r = (TextExtractorReader) f.readerValue();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WeightedHighlighter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WeightedHighlighter.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WeightedHighlighter.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WeightedHighlighter.java Sun Jan 27 14:59:36 2008
@@ -162,10 +162,12 @@
 
         Map offsetInfos = new IdentityHashMap();
         // remove overlapping fragment infos
-        for (Iterator it = infos.iterator(); it.hasNext(); ) {
+        Iterator it = infos.iterator();
+        while (it.hasNext()) {
             FragmentInfo fi = (FragmentInfo) it.next();
             boolean overlap = false;
-            for (Iterator fit = fi.iterator(); fit.hasNext() && !overlap; ) {
+            Iterator fit = fi.iterator();
+            while (fit.hasNext() && !overlap) {
                 TermVectorOffsetInfo oi = (TermVectorOffsetInfo) fit.next();
                 if (offsetInfos.containsKey(oi)) {
                     overlap = true;
@@ -174,7 +176,8 @@
             if (overlap) {
                 it.remove();
             } else {
-                for (Iterator oit = fi.iterator(); oit.hasNext(); ) {
+                Iterator oit = fi.iterator();
+                while (oit.hasNext()) {
                     offsetInfos.put(oit.next(), null);
                 }
             }
@@ -182,13 +185,15 @@
 
         // create excerpts
         StringBuffer sb = new StringBuffer(excerptStart);
-        for (Iterator it = infos.iterator(); it.hasNext(); ) {
+        it = infos.iterator();
+        while (it.hasNext()) {
             FragmentInfo fi = (FragmentInfo) it.next();
             sb.append(fragmentStart);
             int limit = Math.max(0, fi.getStartOffset() / 2 + fi.getEndOffset() / 2 - surround);
             int len = startFragment(sb, text, fi.getStartOffset(), limit);
             TermVectorOffsetInfo lastOffsetInfo = null;
-            for (Iterator fIt = fi.iterator(); fIt.hasNext(); ) {
+            Iterator fIt = fi.iterator();
+            while (fIt.hasNext()) {
                 TermVectorOffsetInfo oi = (TermVectorOffsetInfo) fIt.next();
                 if (lastOffsetInfo != null) {
                     // fill in text between terms

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardQuery.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardQuery.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardQuery.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardQuery.java Sun Jan 27 14:59:36 2008
@@ -276,7 +276,7 @@
         WildcardQueryScorer(Similarity similarity, IndexReader reader) {
             super(similarity);
             this.reader = reader;
-            this.cacheKey = field + '\uFFFF' + propName + '\uFFFF' + transform +'\uFFFF' + pattern;
+            this.cacheKey = field + '\uFFFF' + propName + '\uFFFF' + transform + '\uFFFF' + pattern;
             // check cache
             PerQueryCache cache = PerQueryCache.getInstance();
             Map m = (Map) cache.get(WildcardQueryScorer.class, reader);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/WildcardTermEnum.java Sun Jan 27 14:59:36 2008
@@ -277,7 +277,8 @@
                     Matcher matcher = createRegexp(pattern.substring(idx)).matcher(input);
 
                     // do range scans with patter matcher
-                    for (Iterator it = rangeScans.iterator(); it.hasNext(); ) {
+                    Iterator it = rangeScans.iterator();
+                    while (it.hasNext()) {
                         RangeScan scan = (RangeScan) it.next();
                         do {
                             Term t = scan.term();
@@ -292,7 +293,8 @@
 
                 } finally {
                     // close range scans
-                    for (Iterator it = rangeScans.iterator(); it.hasNext(); ) {
+                    Iterator it = rangeScans.iterator();
+                    while (it.hasNext()) {
                         RangeScan scan = (RangeScan) it.next();
                         try {
                             scan.close();

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/SimpleJBossAccessManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/SimpleJBossAccessManager.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/SimpleJBossAccessManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/SimpleJBossAccessManager.java Sun Jan 27 14:59:36 2008
@@ -70,7 +70,7 @@
         while (iterator.hasNext()) {
             Principal principal = (Principal) iterator.next();
             if (principal instanceof Group
-                    && principal.getName().equalsIgnoreCase("Roles")){
+                    && principal.getName().equalsIgnoreCase("Roles")) {
                 Group group = (Group) principal;
                 Enumeration members = group.members();
                 while (members.hasMoreElements()) {

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -255,7 +255,8 @@
      * only one thread calls this method at a time.
      */
     private void notifyWaitingReaders() {
-        for (Iterator it = waitingReaders.iterator(); it.hasNext(); ) {
+        Iterator it = waitingReaders.iterator();
+        while (it.hasNext()) {
             ((Sync) it.next()).release();
             it.remove();
         }
@@ -269,7 +270,8 @@
             if (waitingWriters.isEmpty()) {
                 return;
             }
-            for (Iterator it = waitingWriters.iterator(); it.hasNext(); ) {
+            Iterator it = waitingWriters.iterator();
+            while (it.hasNext()) {
                 ((Sync) it.next()).release();
                 it.remove();
             }
@@ -369,7 +371,8 @@
             for (int i = 0; i < slots.length; i++) {
                 Map locks = slots[i];
                 if (!locks.isEmpty()) {
-                    for (Iterator it = locks.keySet().iterator(); it.hasNext(); ) {
+                    Iterator it = locks.keySet().iterator();
+                    while (it.hasNext()) {
                         ItemId id = (ItemId) it.next();
                         if (FineGrainedISMLocking.hasDependency(changes, id)) {
                             return true;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/state/NodeState.java Sun Jan 27 14:59:36 2008
@@ -931,7 +931,7 @@
                     if (siblings.size() > 0) {
                         // reuse immutable Name instance from 1st same name sibling
                         // in order to help gc conserving memory
-                        nodeName = ((ChildNodeEntry)siblings.get(0)).getName();
+                        nodeName = ((ChildNodeEntry) siblings.get(0)).getName();
                     }
                 } else {
                     // map entry is a single child node entry,

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInMemory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInMemory.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInMemory.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInMemory.java Sun Jan 27 14:59:36 2008
@@ -105,7 +105,7 @@
         byte[] data = new byte[len];
         try {
             for (int i = 0; i < len; i++) {
-                data[i] = (byte) ((Character.digit(s.charAt(i+i), 16) << 4) | (Character.digit(s.charAt(i+i+1), 16)));
+                data[i] = (byte) ((Character.digit(s.charAt(2 * i), 16) << 4) | (Character.digit(s.charAt(2 * i + 1), 16)));
             }
         } catch (NumberFormatException e) {
             String msg = "unable to deserialize byte array " + s;

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/DateVersionSelector.java Sun Jan 27 14:59:36 2008
@@ -149,7 +149,7 @@
         VersionIterator iter = history.getAllVersions();
         while (iter.hasNext()) {
             Version v = iter.nextVersion();
-            if (v.getPredecessors().length==0) {
+            if (v.getPredecessors().length == 0) {
                 // ignore root version
                 continue;
             }

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=615671&r1=615670&r2=615671&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 Sun Jan 27 14:59:36 2008
@@ -189,9 +189,9 @@
         try {
             NodeId id = new NodeId(uuid);
             InternalFreeze[] frozen = getFrozenChildNodes();
-            for (int i=0; i<frozen.length; i++) {
-                if (frozen[i] instanceof InternalFrozenVersionHistory &&
-                    ((InternalFrozenVersionHistory) frozen[i])
+            for (int i = 0; i < frozen.length; i++) {
+                if (frozen[i] instanceof InternalFrozenVersionHistory
+                        && ((InternalFrozenVersionHistory) frozen[i])
                             .getVersionHistoryId().equals(id)) {
                     return true;
                 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionHistoryImpl.java Sun Jan 27 14:59:36 2008
@@ -149,7 +149,8 @@
         rootVersion = createVersionInstance(NameConstants.JCR_ROOTVERSION);
 
         // get version entries
-        ChildNodeEntry[] children = (ChildNodeEntry[])node.getState().getChildNodeEntries().toArray();
+        ChildNodeEntry[] children = (ChildNodeEntry[])
+            node.getState().getChildNodeEntries().toArray();
         for (int i = 0; i < children.length; i++) {
             ChildNodeEntry child = children[i];
             if (child.getName().equals(NameConstants.JCR_VERSIONLABELS)) {
@@ -162,8 +163,8 @@
         if (rootVersion.getSuccessors().length == 0) {
             Iterator iter = nameCache.keySet().iterator();
             while (iter.hasNext()) {
-                Name versionName = (Name)iter.next();
-                InternalVersionImpl v = (InternalVersionImpl)createVersionInstance(versionName);
+                Name versionName = (Name) iter.next();
+                InternalVersionImpl v = (InternalVersionImpl) createVersionInstance(versionName);
                 v.legacyResolveSuccessors();
             }
         }
@@ -199,8 +200,8 @@
             // add labels
             Iterator iter = labelCache.keySet().iterator();
             while (iter.hasNext()) {
-                Name labelName = (Name)iter.next();
-                Name versionName = (Name)labelCache.get(labelName);
+                Name labelName = (Name) iter.next();
+                Name versionName = (Name) labelCache.get(labelName);
                 if (v.getName().equals(versionName)) {
                     v.internalAddLabel(labelName);
                 }
@@ -250,12 +251,12 @@
      * {@inheritDoc}
      */
     public InternalVersion getVersion(Name versionName) throws VersionException {
-        NodeId versionId = (NodeId)nameCache.get(versionName);
+        NodeId versionId = (NodeId) nameCache.get(versionName);
         if (versionId == null) {
             throw new VersionException("Version " + versionName + " does not exist.");
         }
 
-        InternalVersion v = (InternalVersion)versionCache.get(versionId);
+        InternalVersion v = (InternalVersion) versionCache.get(versionId);
         if (v == null) {
             v = createVersionInstance(versionName);
         }
@@ -280,11 +281,11 @@
      * {@inheritDoc}
      */
     public InternalVersion getVersion(NodeId id) {
-        InternalVersion v = (InternalVersion)versionCache.get(id);
+        InternalVersion v = (InternalVersion) versionCache.get(id);
         if (v == null) {
             Iterator iter = nameCache.keySet().iterator();
             while (iter.hasNext()) {
-                Name versionName = (Name)iter.next();
+                Name versionName = (Name) iter.next();
                 if (nameCache.get(versionName).equals(id)) {
                     v = createVersionInstance(versionName);
                     break;
@@ -298,13 +299,13 @@
      * {@inheritDoc}
      */
     public InternalVersion getVersionByLabel(Name label) {
-        Name versionName = (Name)labelCache.get(label);
+        Name versionName = (Name) labelCache.get(label);
         if (versionName == null) {
             return null;
         }
 
-        NodeId id = (NodeId)nameCache.get(versionName);
-        InternalVersion v = (InternalVersion)versionCache.get(id);
+        NodeId id = (NodeId) nameCache.get(versionName);
+        InternalVersion v = (InternalVersion) versionCache.get(id);
         if (v == null) {
             v = createVersionInstance(versionName);
         }
@@ -414,7 +415,7 @@
                 return null;
             }
         } else {
-            prev = (InternalVersionImpl)getVersion(prevName);
+            prev = (InternalVersionImpl) getVersion(prevName);
             if (prev.equals(version)) {
                 return version;
             } else if (!move) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/VersionManagerImpl.java Sun Jan 27 14:59:36 2008
@@ -219,7 +219,7 @@
     public VersionHistory createVersionHistory(Session session, final NodeState node)
             throws RepositoryException {
         InternalVersionHistory history = (InternalVersionHistory)
-                escFactory.doSourced((SessionImpl) session, new SourcedTarget(){
+                escFactory.doSourced((SessionImpl) session, new SourcedTarget() {
             public Object run() throws RepositoryException {
                 return createVersionHistory(node);
             }
@@ -296,7 +296,7 @@
      */
     public Version checkin(final NodeImpl node) throws RepositoryException {
         InternalVersion version = (InternalVersion)
-                escFactory.doSourced((SessionImpl) node.getSession(), new SourcedTarget(){
+                escFactory.doSourced((SessionImpl) node.getSession(), new SourcedTarget() {
             public Object run() throws RepositoryException {
                 String histUUID = node.getProperty(NameConstants.JCR_VERSIONHISTORY).getString();
                 return checkin((InternalVersionHistoryImpl)
@@ -323,7 +323,7 @@
                     + " does not exist in this VersionHistory");
         }
 
-        escFactory.doSourced((SessionImpl) history.getSession(), new SourcedTarget(){
+        escFactory.doSourced((SessionImpl) history.getSession(), new SourcedTarget() {
             public Object run() throws RepositoryException {
                 InternalVersionHistoryImpl vh = (InternalVersionHistoryImpl)
                         historyImpl.getInternalVersionHistory();
@@ -345,7 +345,7 @@
             throws RepositoryException {
 
         InternalVersion v = (InternalVersion)
-                escFactory.doSourced((SessionImpl) history.getSession(), new SourcedTarget(){
+                escFactory.doSourced((SessionImpl) history.getSession(), new SourcedTarget() {
             public Object run() throws RepositoryException {
                 InternalVersionHistoryImpl vh = (InternalVersionHistoryImpl)
                         ((VersionHistoryImpl) history).getInternalVersionHistory();
@@ -471,14 +471,16 @@
      * <p/>
      * Not used.
      */
-    public void stateCreated(ItemState created) {}
+    public void stateCreated(ItemState created) {
+    }
 
     /**
      * {@inheritDoc}
      * <p/>
      * Not used.
      */
-    public void stateModified(ItemState modified) {}
+    public void stateModified(ItemState modified) {
+    }
 
     /**
      * {@inheritDoc}
@@ -500,7 +502,8 @@
      * <p/>
      * Not used.
      */
-    public void stateDiscarded(ItemState discarded) {}
+    public void stateDiscarded(ItemState discarded) {
+    }
 
     //--------------------------------------------------< UpdateEventListener >
 

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/XAVersionManager.java Sun Jan 27 14:59:36 2008
@@ -383,11 +383,11 @@
             // also put 'successor' and 'predecessor' version items to xaItem sets
             InternalVersion v = history.getVersion(name);
             InternalVersion[] vs = v.getSuccessors();
-            for (int i=0; i<vs.length; i++) {
+            for (int i = 0; i < vs.length; i++) {
                 xaItems.put(vs[i].getId(), vs[i]);
             }
             vs = v.getPredecessors();
-            for (int i=0; i<vs.length; i++) {
+            for (int i = 0; i < vs.length; i++) {
                 xaItems.put(vs[i].getId(), vs[i]);
             }
         }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/SessionImporter.java Sun Jan 27 14:59:36 2008
@@ -198,7 +198,7 @@
                 } else {
                     // edge case: colliding node does have same uuid
                     // (see http://issues.apache.org/jira/browse/JCR-1128)
-                    if (! (existing.getId().equals(id)
+                    if (!(existing.getId().equals(id)
                             && (uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
                             || uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))) {
                         throw new ItemExistsException(existing.safeGetJCRPath());

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java?rev=615671&r1=615670&r2=615671&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/xml/WorkspaceImporter.java Sun Jan 27 14:59:36 2008
@@ -430,7 +430,7 @@
                     } else {
                         // edge case: colliding node does have same uuid
                         // (see http://issues.apache.org/jira/browse/JCR-1128)
-                        if (! (idExisting.equals(id)
+                        if (!(idExisting.equals(id)
                                 && (uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
                                 || uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING))) {
                             throw new ItemExistsException(itemOps.safeGetJCRPath(existing.getNodeId()));



Mime
View raw message