commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1409278 - /commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
Date Wed, 14 Nov 2012 17:58:26 GMT
Author: ggregory
Date: Wed Nov 14 17:58:25 2012
New Revision: 1409278

URL: http://svn.apache.org/viewvc?rev=1409278&view=rev
Log:
StringBuilder does not need to be declared far from its usage.

Modified:
    commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java

Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java?rev=1409278&r1=1409277&r2=1409278&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
(original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java
Wed Nov 14 17:58:25 2012
@@ -522,7 +522,6 @@ public abstract class AbstractFileObject
     @Override
     public URL getURL() throws FileSystemException
     {
-        final StringBuilder buf = new StringBuilder();
         try
         {
             return AccessController.doPrivileged(new PrivilegedExceptionAction<URL>()
@@ -530,6 +529,7 @@ public abstract class AbstractFileObject
                 @Override
                 public URL run() throws MalformedURLException
                 {
+                    final StringBuilder buf = new StringBuilder();
                     return new URL(UriParser.extractScheme(name.getURI(), buf), "", -1,
                         buf.toString(), new DefaultURLStreamHandler(fs.getContext(), fs.getFileSystemOptions()));
                 }



Mime
View raw message