commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1807512 - /commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/test/FileLockTestCase.java
Date Wed, 06 Sep 2017 18:09:17 GMT
Author: ggregory
Date: Wed Sep  6 18:09:16 2017
New Revision: 1807512

URL: http://svn.apache.org/viewvc?rev=1807512&view=rev
Log:
Better lvar name.

Modified:
    commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/test/FileLockTestCase.java

Modified: commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/test/FileLockTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/test/FileLockTestCase.java?rev=1807512&r1=1807511&r2=1807512&view=diff
==============================================================================
--- commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/test/FileLockTestCase.java
(original)
+++ commons/proper/vfs/trunk/commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/zip/test/FileLockTestCase.java
Wed Sep  6 18:09:16 2017
@@ -40,7 +40,7 @@ public class FileLockTestCase {
     private FileSystemManager manager;
     private File newZipFile;
 
-    private String uri;
+    private String zipFileUri;
 
     private void assertDelete() {
         // We do not use newZipFile in the Assert message to avoid touching it before calling
delete().
@@ -48,13 +48,13 @@ public class FileLockTestCase {
     }
 
     private void resolveAndOpenCloseContent() throws FileSystemException {
-        try (final FileObject zipFileObject = manager.resolveFile(uri)) {
+        try (final FileObject zipFileObject = manager.resolveFile(zipFileUri)) {
             zipFileObject.getContent().close();
         }
     }
 
     public void resolveAndOpenCloseInputStream() throws IOException, FileSystemException
{
-        try (final FileObject zipFileObject = manager.resolveFile(uri)) {
+        try (final FileObject zipFileObject = manager.resolveFile(zipFileUri)) {
             zipFileObject.getContent().getInputStream().close();
         }
     }
@@ -65,13 +65,13 @@ public class FileLockTestCase {
         newZipFile = File.createTempFile("FileLockTestCase", "zip");
         newZipFile.deleteOnExit();
         FileUtils.copyFile(zipFile, newZipFile);
-        uri = "zip:file:" + newZipFile.getAbsolutePath() + "!/read-tests/file1.txt";
+        zipFileUri = "zip:file:" + newZipFile.getAbsolutePath() + "!/read-tests/file1.txt";
         manager = VFS.getManager();
     }
 
     @Test
     public void testCannotDeleteWhileStreaming() throws Exception {
-        try (final FileObject zipFileObject = manager.resolveFile(uri)) {
+        try (final FileObject zipFileObject = manager.resolveFile(zipFileUri)) {
             try (InputStream inputStream = zipFileObject.getContent().getInputStream()) {
                 if (Os.isFamily(Os.OS_FAMILY_WINDOWS)) {
                     // We do not use newZipFile in the Assert message to avoid touching it
before calling delete().
@@ -85,7 +85,7 @@ public class FileLockTestCase {
     @Test
     public void testCannotDeleteWhileStreaming2() throws Exception {
         Assume.assumeTrue(Os.isFamily(Os.OS_FAMILY_WINDOWS));
-        try (final FileObject zipFileObject = manager.resolveFile(uri)) {
+        try (final FileObject zipFileObject = manager.resolveFile(zipFileUri)) {
             try (InputStream inputStream = zipFileObject.getContent().getInputStream()) {
                 // We do not use newZipFile in the Assert message to avoid touching it before
calling delete().
                 Assert.assertFalse("Could not delete file", newZipFile.delete());
@@ -131,8 +131,8 @@ public class FileLockTestCase {
 
     @Test
     public void testNestedInputStreams() throws Exception {
-        try (final FileObject zipFileObject = manager.resolveFile(uri)) {
-            try (final FileObject zipFileObject2 = manager.resolveFile(uri)) {
+        try (final FileObject zipFileObject = manager.resolveFile(zipFileUri)) {
+            try (final FileObject zipFileObject2 = manager.resolveFile(zipFileUri)) {
                 zipFileObject2.getContent().getInputStream().close();
             }
             zipFileObject.getContent().getInputStream().close();



Mime
View raw message