chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject 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
Date Tue, 30 Nov 2010 16:43:03 GMT
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();
-        }
-    }
 }



Mime
View raw message