You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2008/01/27 21:35:51 UTC
svn commit: r615640 - in
/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core:
cluster/ config/ journal/ util/ value/
Author: jukka
Date: Sun Jan 27 12:35:46 2008
New Revision: 615640
URL: http://svn.apache.org/viewvc?rev=615640&view=rev
Log:
JCR-97: Improve Checkstyle conformance
- Removed trailing spaces
Modified:
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/AbstractClusterOperation.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockEventChannel.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockOperation.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.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/util/RepositoryLock.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInTempFile.java
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/AbstractClusterOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/AbstractClusterOperation.java?rev=615640&r1=615639&r2=615640&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/AbstractClusterOperation.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/AbstractClusterOperation.java Sun Jan 27 12:35:46 2008
@@ -78,7 +78,7 @@
* @throws JournalException if an error occurs
*/
protected abstract void write() throws JournalException;
-
+
/**
* {@inheritDoc}
*/
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockEventChannel.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockEventChannel.java?rev=615640&r1=615639&r2=615640&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockEventChannel.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockEventChannel.java Sun Jan 27 12:35:46 2008
@@ -26,7 +26,7 @@
/**
* Create a new cluster operation that should be used to inform other
* instances in the cluster. Called when a node is about to be
- * locked.
+ * locked.
*
* @param nodeId node id
* @param deep flag indicating whether lock is deep
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockOperation.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockOperation.java?rev=615640&r1=615639&r2=615640&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockOperation.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/cluster/LockOperation.java Sun Jan 27 12:35:46 2008
@@ -41,7 +41,7 @@
private String owner;
/**
- * Flag indicating whether this is a lock.
+ * Flag indicating whether this is a lock.
*/
private boolean isLock;
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java?rev=615640&r1=615639&r2=615640&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/config/BeanConfig.java Sun Jan 27 12:35:46 2008
@@ -31,13 +31,13 @@
/** The default class loader used by all instances of this class */
private static ClassLoader DEFAULT_CLASS_LOADER =
BeanConfig.class.getClassLoader();
-
+
/**
* The current class loader used by this instance to create instances of
* configured classes.
*/
private ClassLoader classLoader = getDefaultClassLoader();
-
+
/**
* The class name of the configured bean.
*/
@@ -126,11 +126,11 @@
}
//---------- Configurable class loader support ----------------------------
-
+
/**
* Returns the current <code>ClassLoader</code> used to instantiate objects
* in the {@link #newInstance()} method.
- *
+ *
* @see #newInstance()
* @see #setClassLoader(ClassLoader)
* @see #getDefaultClassLoader()
@@ -139,15 +139,15 @@
public ClassLoader getClassLoader() {
return classLoader;
}
-
+
/**
* Sets the <code>ClassLoader</code> used to instantiate objects in the
* {@link #newInstance()} method.
- *
+ *
* @param classLoader The class loader to set on this instance. If this is
* <code>null</code> the system class loader will be used, which may
* lead to unexpected class loading failures.
- *
+ *
* @see #newInstance()
* @see #getClassLoader()
* @see #getDefaultClassLoader()
@@ -156,12 +156,12 @@
public void setClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
}
-
+
/**
* Returns the current <code>ClassLoader</code> used for new instances of
* this class as the loader used to instantiate objects in the
* {@link #newInstance()} method.
- *
+ *
* @see #newInstance()
* @see #getClassLoader()
* @see #setClassLoader(ClassLoader)
@@ -170,15 +170,15 @@
public static ClassLoader getDefaultClassLoader() {
return DEFAULT_CLASS_LOADER;
}
-
+
/**
* Sets the <code>ClassLoader</code> used for new instances of this class as
* the loader to instantiate objects in the {@link #newInstance()} method.
- *
+ *
* @param classLoader The class loader to set as the default class loader.
* If this is <code>null</code> the system class loader will be used,
- * which may lead to unexpected class loading failures.
- *
+ * which may lead to unexpected class loading failures.
+ *
* @see #newInstance()
* @see #getClassLoader()
* @see #setClassLoader(ClassLoader)
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java?rev=615640&r1=615639&r2=615640&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/journal/DatabaseJournal.java Sun Jan 27 12:35:46 2008
@@ -64,7 +64,7 @@
* <pre>
* <param name="driver" value="javax.naming.InitialContext" />
* <param name="url" value="java:comp/env/jdbc/Test" />
- * </pre> *
+ * </pre> *
* </ul>
*/
public class DatabaseJournal extends AbstractJournal {
@@ -149,7 +149,7 @@
* Statement appending a new record.
*/
private PreparedStatement insertRevisionStmt;
-
+
/**
* Auto commit level.
*/
@@ -275,7 +275,7 @@
return ConnectionFactory.getConnection(driver, url, user, password);
} catch (RepositoryException e) {
String msg = "Unable to load driver class.";
- throw new JournalException(msg, e);
+ throw new JournalException(msg, e);
}
}
@@ -494,7 +494,7 @@
}
}
}
-
+
/**
* Rollback a connection. Does nothing if the connection passed is
* <code>null</code> and logs any exception as warning.
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=615640&r1=615639&r2=615640&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 12:35:46 2008
@@ -114,10 +114,10 @@
maximumSize = DEFAULT_MAXSIZE;
}
rootDirectory = new File(directory);
-
+
// JCR-1341: Cluster Journal directory should be created automatically
rootDirectory.mkdirs();
-
+
if (!rootDirectory.exists() || !rootDirectory.isDirectory()) {
String msg = "Directory specified does either not exist " +
"or is not a directory: " + directory;
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/RepositoryLock.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/RepositoryLock.java?rev=615640&r1=615639&r2=615640&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/RepositoryLock.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/util/RepositoryLock.java Sun Jan 27 12:35:46 2008
@@ -63,7 +63,7 @@
* The lock file within the given directory.
*/
private final File file;
-
+
/**
* The random access file.
*/
@@ -72,7 +72,7 @@
/**
* Unique identifier (canonical path name) of the locked directory.
* Used to ensure exclusive locking within a single JVM.
- *
+ *
* @see https://issues.apache.org/jira/browse/JCR-933
*/
private final String identifier;
@@ -124,10 +124,10 @@
throw e;
}
}
-
+
/**
* Try to lock the random access file.
- *
+ *
* @throws RepositoryException
*/
private void tryLock() throws RepositoryException {
@@ -175,7 +175,7 @@
}
}
}
-
+
/**
* Close the random access file if it is open, and set it to null.
*/
@@ -188,7 +188,7 @@
}
randomAccessFile = null;
}
- }
+ }
/**
* Releases repository lock.
@@ -219,5 +219,5 @@
}
}
}
-
+
}
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInTempFile.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInTempFile.java?rev=615640&r1=615639&r2=615640&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInTempFile.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/BLOBInTempFile.java Sun Jan 27 12:35:46 2008
@@ -32,23 +32,23 @@
* Represents binary data which is stored in a temporary file.
*/
public class BLOBInTempFile extends BLOBFileValue {
-
+
/**
* the prefix of the string representation of this value
- */
+ */
private static final String PREFIX = "file:";
-
+
private File file;
private long length;
private final boolean temp;
-
+
/**
* Creates a new instance from a stream.
* The input stream is always closed by this method.
*
* @param in the input stream
- * @throws IOException
- */
+ * @throws IOException
+ */
private BLOBInTempFile(InputStream in, boolean temp) throws RepositoryException {
this.temp = temp;
OutputStream out = null;
@@ -63,10 +63,10 @@
break;
}
out.write(buffer, 0, len);
- length += len;
+ length += len;
}
} catch (IOException e) {
- throw new RepositoryException("Error creating temporary file", e);
+ throw new RepositoryException("Error creating temporary file", e);
} finally {
try {
in.close();
@@ -77,7 +77,7 @@
try {
out.close();
} catch (IOException e) {
- throw new RepositoryException("Error creating temporary file", e);
+ throw new RepositoryException("Error creating temporary file", e);
}
}
}
@@ -87,7 +87,7 @@
* Creates a new instance from file.
*
* @param in the input stream
- */
+ */
private BLOBInTempFile(File file, boolean temp) {
this.file = file;
this.length = file.length();
@@ -98,20 +98,20 @@
* Creates a new instance from a stream.
*
* @param in the stream
- */
+ */
static BLOBInTempFile getInstance(InputStream in, boolean temp) throws RepositoryException {
return new BLOBInTempFile(in, temp);
}
-
+
/**
* Creates a new instance from a file.
*
* @param file the file
- */
+ */
static BLOBInTempFile getInstance(File file, boolean temp) throws IOException {
return new BLOBInTempFile(file, temp);
- }
-
+ }
+
/**
* {@inheritDoc}
*/
@@ -145,7 +145,7 @@
return new FileInputStream(file);
} catch (FileNotFoundException fnfe) {
throw new RepositoryException("file backing binary value not found", fnfe);
- }
+ }
}
/**
@@ -153,8 +153,8 @@
*/
public String toString() {
return PREFIX + file.toString();
- }
-
+ }
+
/**
* {@inheritDoc}
*/
@@ -168,7 +168,7 @@
}
return false;
}
-
+
/**
* Returns zero to satisfy the Object equals/hashCode contract.
* This class is mutable and not meant to be used as a hash key.
@@ -178,6 +178,6 @@
*/
public int hashCode() {
return 0;
- }
-
+ }
+
}