commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1808940 - in /commons/proper/vfs/trunk: commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java src/changes/changes.xml
Date Tue, 19 Sep 2017 19:59:48 GMT
Author: ggregory
Date: Tue Sep 19 19:59:48 2017
New Revision: 1808940

URL: http://svn.apache.org/viewvc?rev=1808940&view=rev
Log:
[VFS-644] AbstractFileSystem.streamClosed() always sets openStream count to zero.

Modified:
    commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java
    commons/proper/vfs/trunk/src/changes/changes.xml

Modified: commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java?rev=1808940&r1=1808939&r2=1808940&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java
Tue Sep 19 19:59:48 2017
@@ -575,16 +575,7 @@ public abstract class AbstractFileSystem
     }
 
     void streamClosed() {
-        int count;
-
-        do {
-            count = openStreams.get();
-            if (count < 1) {
-                return;
-            }
-        } while (openStreams.compareAndSet(count, count - 1));
-
-        if (count == 1) {
+        if (openStreams.decrementAndGet() == 0) {
             notifyAllStreamsClosed();
         }
     }

Modified: commons/proper/vfs/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/src/changes/changes.xml?rev=1808940&r1=1808939&r2=1808940&view=diff
==============================================================================
--- commons/proper/vfs/trunk/src/changes/changes.xml (original)
+++ commons/proper/vfs/trunk/src/changes/changes.xml Tue Sep 19 19:59:48 2017
@@ -89,6 +89,9 @@ The <action> type attribute can be add,u
       <action issue="VFS-291" dev="ggregory" type="fix">
         ZIP archives are not properly closed after unzipping and cannot be deleted until
the JVM exists.
       </action>
+      <action issue="VFS-644" dev="ggregory" type="fix">
+        AbstractFileSystem.streamClosed() always sets openStream count to zero.
+      </action>
     </release>  
     <release version="2.1" date="2016-05-19" description="New features and bug fix release.
 



Mime
View raw message