jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r898325 - in /jackrabbit/trunk/jackrabbit-core/src: main/java/org/apache/jackrabbit/core/data/ main/java/org/apache/jackrabbit/core/journal/ main/java/org/apache/jackrabbit/core/persistence/pool/ main/java/org/apache/jackrabbit/core/persist...
Date Tue, 12 Jan 2010 14:00:47 GMT
Author: thomasm
Date: Tue Jan 12 14:00:47 2010
New Revision: 898325

URL: http://svn.apache.org/viewvc?rev=898325&view=rev
Log:
JCR-97: Improve Checkstyle conformance (spaces for tabs)

Modified:
    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/journal/AbstractJournal.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/DbNameIndex.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/PostgreSQLNameIndex.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RestoreAndCheckoutTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/PersistenceManagerIteratorTest.java

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=898325&r1=898324&r2=898325&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
Tue Jan 12 14:00:47 2010
@@ -104,7 +104,7 @@
     /**
      * All data identifiers that are currently in use are in this set until they are garbage
collected.
      */
-    protected Map<DataIdentifier, WeakReference<DataIdentifier>> inUse = 
+    protected Map<DataIdentifier, WeakReference<DataIdentifier>> inUse =
         Collections.synchronizedMap(new WeakHashMap<DataIdentifier, WeakReference<DataIdentifier>>());
 
     /**
@@ -128,7 +128,7 @@
         directory = new File(path);
         directory.mkdirs();
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -147,7 +147,7 @@
             return new FileDataRecord(identifier, file);
         }
     }
-    
+
     /**
      * Returns the record with the given identifier. Note that this method
      * performs no sanity checks on the given identifier. It is up to the
@@ -312,7 +312,7 @@
             for (File f: file.listFiles()) {
                 count += deleteOlderRecursive(f, min);
             }
-            
+
             // JCR-1396: FileDataStore Garbage Collector and empty directories
             // Automatic removal of empty directories (but not the root!)
             synchronized (this) {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java?rev=898325&r1=898324&r2=898325&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/AbstractJournal.java
Tue Jan 12 14:00:47 2010
@@ -192,7 +192,7 @@
     /**
      * Synchronize contents from journal. May be overridden by subclasses.
      *
-     * @param startRevision start point (exlusive)
+     * @param startRevision start point (exclusive)
      * @throws JournalException if an error occurs
      */
     protected void doSync(long startRevision) throws JournalException {

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java?rev=898325&r1=898324&r2=898325&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
Tue Jan 12 14:00:47 2010
@@ -761,9 +761,9 @@
         
         if (uuids == null) {
             // get all node bundles in the database with a single sql statement,
-            // which is (probably) faster than loading each bundle and traversing the tree
       	
+            // which is (probably) faster than loading each bundle and traversing the tree
             
             ResultSet rs = null;
-            try {            	
+            try {               
                 String sql = "select count(*) from " + schemaObjectPrefix + "BUNDLE";
                 rs = conHelper.exec(sql, new Object[0], false, 0);
                 try {
@@ -828,7 +828,7 @@
                 }
             } catch (Exception e) {
                 log.error("Error loading bundle", e);
-            } finally {            	
+            } finally {                 
                 DbUtility.close(rs);
                 total = count;
             }
@@ -1435,13 +1435,13 @@
                 throws Exception {
             ResultSet rs = null;
             boolean exists;
-        	try {
-	            rs = conHelper.exec(blobSelectExistSQL, new Object[]{blobId}, false, 0);
-	            // a BLOB exists if the result has at least one entry
-	            exists = rs.next();
-        	} finally {
-	            DbUtility.close(rs);
-        	}
+                try {
+                    rs = conHelper.exec(blobSelectExistSQL, new Object[]{blobId}, false,
0);
+                    // a BLOB exists if the result has at least one entry
+                    exists = rs.next();
+                } finally {
+                    DbUtility.close(rs);
+                }
             String sql = (exists) ? blobUpdateSQL : blobInsertSQL;
             Object[] params = new Object[]{new StreamWrapper(in, size), blobId};
             conHelper.exec(sql, params);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/DbNameIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/DbNameIndex.java?rev=898325&r1=898324&r2=898325&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/DbNameIndex.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/DbNameIndex.java
Tue Jan 12 14:00:47 2010
@@ -142,7 +142,7 @@
             ise.initCause(e);
             throw ise;
         } finally {
-        	DbUtility.close(rs);
+            DbUtility.close(rs);
         }
         if (result != -1) {
             return result;
@@ -172,7 +172,7 @@
             ise.initCause(e);
             throw ise;
         } finally {
-        	DbUtility.close(rs);
+            DbUtility.close(rs);
         }
     }
 
@@ -187,7 +187,7 @@
         String result = null;
         ResultSet rs = null;
         try {
-           rs = conHelper.exec(nameSelectSQL, new Object[] { Integer.valueOf(index) }, false,
0);
+            rs = conHelper.exec(nameSelectSQL, new Object[] { Integer.valueOf(index) }, false,
0);
             if (rs.next()) {
                 result = rs.getString(1);
             }
@@ -197,7 +197,7 @@
             ise.initCause(e);
             throw ise;
         } finally {
-        	DbUtility.close(rs);
+            DbUtility.close(rs);
         }
         if (result == null) {
             throw new IllegalArgumentException("Index not found: " + index);

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/PostgreSQLNameIndex.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/PostgreSQLNameIndex.java?rev=898325&r1=898324&r2=898325&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/PostgreSQLNameIndex.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/util/PostgreSQLNameIndex.java
Tue Jan 12 14:00:47 2010
@@ -65,7 +65,7 @@
         try {
             conHelper.exec(nameInsertSQL, new Object[]{string});
             return getGeneratedKey();
-        } catch (Exception e) {        	
+        } catch (Exception e) {
             IllegalStateException ise = new IllegalStateException("Unable to insert index
for string: " + string);
             ise.initCause(e);
             throw ise;

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RestoreAndCheckoutTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RestoreAndCheckoutTest.java?rev=898325&r1=898324&r2=898325&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RestoreAndCheckoutTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/RestoreAndCheckoutTest.java
Tue Jan 12 14:00:47 2010
@@ -29,41 +29,42 @@
  */
 public class RestoreAndCheckoutTest extends AbstractJCRTest {
 
-	private static final int NODES_COUNT = 10;
+    private static final int NODES_COUNT = 10;
 
-	public void testRestoreAndCheckout() throws RepositoryException {
-		Session session = getHelper().getSuperuserSession();
-		
-		Node rootNode = session.getRootNode();
-		Node myRoot = rootNode.addNode("myRoot");
-		myRoot.addMixin("mix:versionable");
-		rootNode.save();
-		myRoot.checkin();
-
-		// create n child and grandchild versionable nodes
-		for (int i = 0; i < NODES_COUNT; i++) {
-			myRoot.checkout();
-			Node childNode = myRoot.addNode("child" + i);
-			childNode.addMixin("mix:versionable");
-			Node grandChildNode = childNode.addNode("grandChild");
-			grandChildNode.addMixin("mix:versionable");
-			myRoot.save();
-			grandChildNode.checkin();
-			childNode.checkin();
-			myRoot.checkin();
-		}
-
-		// restore child, then restore/checkout grandchild nodes
-		for (int i = 0; i < NODES_COUNT; i++) {
-			Node childNode = myRoot.getNode("child" + i);
-			childNode.restore("1.0", false);
-			Node grandChildNode = childNode.getNode("grandChild");
-			grandChildNode.restore("1.0", false);
-			// critical location regarding item state manager caching (see JCR-1197)
-			grandChildNode.checkout();
-			grandChildNode.checkin();
-		}
+    public void testRestoreAndCheckout() throws RepositoryException {
+        Session session = getHelper().getSuperuserSession();
 
-		session.logout();
-	}
+        Node rootNode = session.getRootNode();
+        Node myRoot = rootNode.addNode("myRoot");
+        myRoot.addMixin("mix:versionable");
+        rootNode.save();
+        myRoot.checkin();
+
+        // create n child and grandchild versionable nodes
+        for (int i = 0; i < NODES_COUNT; i++) {
+            myRoot.checkout();
+            Node childNode = myRoot.addNode("child" + i);
+            childNode.addMixin("mix:versionable");
+            Node grandChildNode = childNode.addNode("grandChild");
+            grandChildNode.addMixin("mix:versionable");
+            myRoot.save();
+            grandChildNode.checkin();
+            childNode.checkin();
+            myRoot.checkin();
+        }
+
+        // restore child, then restore/checkout grandchild nodes
+        for (int i = 0; i < NODES_COUNT; i++) {
+            Node childNode = myRoot.getNode("child" + i);
+            childNode.restore("1.0", false);
+            Node grandChildNode = childNode.getNode("grandChild");
+            grandChildNode.restore("1.0", false);
+            // critical location regarding item state manager caching (see
+            // JCR-1197)
+            grandChildNode.checkout();
+            grandChildNode.checkin();
+        }
+
+        session.logout();
+    }
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/PersistenceManagerIteratorTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/PersistenceManagerIteratorTest.java?rev=898325&r1=898324&r2=898325&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/PersistenceManagerIteratorTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/PersistenceManagerIteratorTest.java
Tue Jan 12 14:00:47 2010
@@ -63,7 +63,7 @@
         String[] names = new String[coll.size()];
         Iterator<WorkspaceConfig> wspIt = coll.iterator();
         for (int i = 0; wspIt.hasNext(); i++) {
-            WorkspaceConfig wsc = (WorkspaceConfig) wspIt.next();
+            WorkspaceConfig wsc = wspIt.next();
             names[i] = wsc.getName();
         }
 



Mime
View raw message