Improve JCR base library
[lgpl/argeo-commons.git] / org.argeo.jcr / src / org / argeo / jcr / fs / BinaryChannel.java
index b90bb900ae129827768f277831a86e17a128f018..2039f778a7a67231eab5eab4b1fd757d19044445 100644 (file)
@@ -19,7 +19,6 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.nodetype.NodeType;
 
-import org.apache.commons.io.IOUtils;
 import org.argeo.jcr.JcrUtils;
 
 public class BinaryChannel implements SeekableByteChannel {
@@ -78,7 +77,10 @@ public class BinaryChannel implements SeekableByteChannel {
                                throw new JcrFsException("Cannot close " + file, e);
                        } finally {
                                JcrUtils.closeQuietly(newBinary);
-                               IOUtils.closeQuietly(fc);
+                               // IOUtils.closeQuietly(fc);
+                               if (fc != null) {
+                                       fc.close();
+                               }
                        }
                } else {
                        clearReadState();