You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2010/11/30 17:43:03 UTC

svn commit: r1040631 - /incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamImpl.java

Author: fmui
Date: Tue Nov 30 16:43:02 2010
New Revision: 1040631

URL: http://svn.apache.org/viewvc?rev=1040631&view=rev
Log:
- removed finalize method because it causes some trouble in stressed in environments. Always close the content stream!

Modified:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamImpl.java

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamImpl.java?rev=1040631&r1=1040630&r2=1040631&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamImpl.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/dataobjects/ContentStreamImpl.java Tue Nov 30 16:43:02 2010
@@ -112,18 +112,4 @@ public class ContentStreamImpl extends A
         return "ContentStream [filename=" + filename + ", length=" + length + ", MIME type=" + mimeType
                 + ", has stream=" + (stream != null) + "]" + super.toString();
     }
-
-    @Override
-    protected void finalize() throws Throwable {
-        try {
-            if (stream != null) {
-                // this stream must be closed to release the underlying network
-                // resources
-                stream.close();
-            }
-        } catch (IOException e) {
-        } finally {
-            super.finalize();
-        }
-    }
 }