This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e5c672  Use isEmpty() instead of size check and inline local var used 
only once.
3e5c672 is described below

commit 3e5c672a4b818bea8379078dcf17d8ca0e4aa94c
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Tue Aug 4 18:41:25 2020 -0400

    Use isEmpty() instead of size check and inline local var used only once.
---
 .../java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java     | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java
 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java
index cdf9ff3..4154ccd 100644
--- 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java
+++ 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java
@@ -92,9 +92,8 @@ public class DefaultFileReplicator extends 
AbstractVfsComponent implements FileR
     public void close() {
         // Delete the temporary files
         synchronized (copies) {
-            while (copies.size() > 0) {
-                final File file = (File) removeFile();
-                deleteFile(file);
+            while (!copies.isEmpty()) {
+                deleteFile((File) removeFile());
             }
         }
 

Reply via email to