jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r179772 - in /incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value: BLOBFileValue.java InternalValue.java
Date Fri, 03 Jun 2005 11:13:36 GMT
Author: tripod
Date: Fri Jun  3 04:13:35 2005
New Revision: 179772

URL: http://svn.apache.org/viewcvs?rev=179772&view=rev
Log:
- avoinding returning of an open stream

Modified:
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
    incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java?rev=179772&r1=179771&r2=179772&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/BLOBFileValue.java
Fri Jun  3 04:13:35 2005
@@ -19,6 +19,7 @@
 import org.apache.jackrabbit.core.fs.FileSystemException;
 import org.apache.jackrabbit.core.fs.FileSystemResource;
 import org.apache.jackrabbit.core.util.ISO8601;
+import org.apache.log4j.Logger;
 
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
@@ -46,6 +47,11 @@
 public class BLOBFileValue implements Value {
 
     /**
+     * The default logger
+     */
+    private static Logger log = Logger.getLogger(BLOBFileValue.class);
+
+    /**
      * the property type
      */
     public static final int TYPE = PropertyType.BINARY;
@@ -321,6 +327,7 @@
                 fsResource.delete(pruneEmptyParentDirs);
             } catch (FileSystemException fse) {
                 // ignore
+                log.warn("Error while deleting BLOBFileValue: " + fse.getMessage());
             }
         } else {
             // this instance is backed by a in-memory buffer

Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java?rev=179772&r1=179771&r2=179772&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java
(original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/value/InternalValue.java
Fri Jun  3 04:13:35 2005
@@ -299,7 +299,7 @@
             throws RepositoryException {
         switch (type) {
             case PropertyType.BINARY:
-                return new BinaryValue(((BLOBFileValue) val).getStream());
+                return (BLOBFileValue) val;
             case PropertyType.BOOLEAN:
                 return new BooleanValue(((Boolean) val));
             case PropertyType.DATE:



Mime
View raw message