You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2010/12/16 12:04:15 UTC
svn commit: r1049923 -
/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/RefCountingBLOBFileValue.java
Author: angela
Date: Thu Dec 16 11:04:15 2010
New Revision: 1049923
URL: http://svn.apache.org/viewvc?rev=1049923&view=rev
Log:
minor improvement
Modified:
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/RefCountingBLOBFileValue.java
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/RefCountingBLOBFileValue.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/RefCountingBLOBFileValue.java?rev=1049923&r1=1049922&r2=1049923&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/RefCountingBLOBFileValue.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/value/RefCountingBLOBFileValue.java Thu Dec 16 11:04:15 2010
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
* {@link RefCountBinary} is created and the reference count {@link #refCount}
* is incremented. The underlying value is discarded once this
* {@link RefCountingBLOBFileValue} and all its light weight
- * {@link RefCountBinary} intances have been discarded.
+ * {@link RefCountBinary} instances have been discarded.
*/
public class RefCountingBLOBFileValue extends BLOBFileValue {
@@ -67,7 +67,7 @@ public class RefCountingBLOBFileValue ex
//----------------------------< BLOBFileValue >-----------------------------
/**
- * Discards the underyling value if the reference count drops to zero.
+ * Discards the underlying value if the reference count drops to zero.
*/
public synchronized void dispose() {
if (refCount > 0) {
@@ -89,6 +89,7 @@ public class RefCountingBLOBFileValue ex
* @param pruneEmptyParentDirs if <code>true</code>, empty parent
* directories will automatically be deleted
*/
+ @Override
void delete(boolean pruneEmptyParentDirs) {
value.delete(pruneEmptyParentDirs);
}
@@ -100,6 +101,7 @@ public class RefCountingBLOBFileValue ex
* @throws RepositoryException if an error occurs while creating the copy or
* if this value has been disposed already.
*/
+ @Override
synchronized BLOBFileValue copy() throws RepositoryException {
if (refCount <= 0) {
throw new RepositoryException("this BLOBFileValue has been disposed");
@@ -136,6 +138,7 @@ public class RefCountingBLOBFileValue ex
return value.getStream();
}
+ @Override
protected void finalize() throws Throwable {
if (!disposed) {
dispose();
@@ -166,10 +169,12 @@ public class RefCountingBLOBFileValue ex
}
}
+ @Override
void delete(boolean pruneEmptyParentDirs) {
getInternalValue().delete(pruneEmptyParentDirs);
}
+ @Override
BLOBFileValue copy() throws RepositoryException {
checkDisposed();
return getInternalValue().copy();
@@ -191,6 +196,7 @@ public class RefCountingBLOBFileValue ex
return 0;
}
+ @Override
protected void finalize() throws Throwable {
dispose();
super.finalize();