You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2012/12/03 14:37:52 UTC
svn commit: r1416507 [2/8] - in /commons/proper/vfs/trunk/core/src:
main/java/org/apache/commons/vfs2/ main/java/org/apache/commons/vfs2/auth/
main/java/org/apache/commons/vfs2/cache/
main/java/org/apache/commons/vfs2/impl/ main/java/org/apache/commons...
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java Mon Dec 3 13:37:12 2012
@@ -178,13 +178,13 @@ public class DefaultFileMonitor implemen
{
// Traverse the children
final FileObject[] children = file.getChildren();
- for (FileObject element : children)
+ for (final FileObject element : children)
{
doAddFile(element);
}
}
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
LOG.error(fse.getLocalizedMessage(), fse);
}
@@ -214,14 +214,14 @@ public class DefaultFileMonitor implemen
{
// Traverse the children
final FileObject[] children = file.getChildren();
- for (FileObject element : children)
+ for (final FileObject element : children)
{
this.addFile(element); // Add depth first
}
}
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
LOG.error(fse.getLocalizedMessage(), fse);
}
@@ -239,7 +239,7 @@ public class DefaultFileMonitor implemen
{
synchronized (this.monitorMap)
{
- FileName fn = file.getName();
+ final FileName fn = file.getName();
if (this.monitorMap.get(fn) != null)
{
FileObject parent;
@@ -247,7 +247,7 @@ public class DefaultFileMonitor implemen
{
parent = file.getParent();
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
parent = null;
}
@@ -256,7 +256,7 @@ public class DefaultFileMonitor implemen
if (parent != null)
{ // Not the root
- FileMonitorAgent parentAgent =
+ final FileMonitorAgent parentAgent =
this.monitorMap.get(parent.getName());
if (parentAgent != null)
{
@@ -289,7 +289,7 @@ public class DefaultFileMonitor implemen
* Set the delay between runs.
* @param delay The delay period.
*/
- public void setDelay(long delay)
+ public void setDelay(final long delay)
{
if (delay > 0)
{
@@ -316,7 +316,7 @@ public class DefaultFileMonitor implemen
*
* @param checksPerRun a value less than 1 will disable this feature
*/
- public void setChecksPerRun(int checksPerRun)
+ public void setChecksPerRun(final int checksPerRun)
{
this.checksPerRun = checksPerRun;
}
@@ -375,7 +375,7 @@ public class DefaultFileMonitor implemen
for (int iterFileNames = 0; iterFileNames < fileNames.length;
iterFileNames++)
{
- FileName fileName = (FileName) fileNames[iterFileNames];
+ final FileName fileName = (FileName) fileNames[iterFileNames];
FileMonitorAgent agent;
synchronized (this.monitorMap)
{
@@ -394,7 +394,7 @@ public class DefaultFileMonitor implemen
{
Thread.sleep(getDelay());
}
- catch (InterruptedException e)
+ catch (final InterruptedException e)
{
// Woke up.
}
@@ -416,7 +416,7 @@ public class DefaultFileMonitor implemen
{
Thread.sleep(getDelay());
}
- catch (InterruptedException e)
+ catch (final InterruptedException e)
{
continue;
}
@@ -437,7 +437,7 @@ public class DefaultFileMonitor implemen
private long timestamp;
private Map<FileName, Object> children;
- private FileMonitorAgent(DefaultFileMonitor fm, FileObject file)
+ private FileMonitorAgent(final DefaultFileMonitor fm, final FileObject file)
{
this.fm = fm;
this.file = file;
@@ -449,7 +449,7 @@ public class DefaultFileMonitor implemen
{
this.exists = this.file.exists();
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
this.exists = false;
this.timestamp = -1;
@@ -461,7 +461,7 @@ public class DefaultFileMonitor implemen
{
this.timestamp = this.file.getContent().getLastModifiedTime();
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
this.timestamp = -1;
}
@@ -475,15 +475,15 @@ public class DefaultFileMonitor implemen
if (this.file.getType().hasChildren())
{
this.children = new HashMap<FileName, Object>();
- FileObject[] childrenList = this.file.getChildren();
- for (FileObject element : childrenList)
+ final FileObject[] childrenList = this.file.getChildren();
+ for (final FileObject element : childrenList)
{
this.children.put(element.getName(), new
Object()); // null?
}
}
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
this.children = null;
}
@@ -499,7 +499,7 @@ public class DefaultFileMonitor implemen
{
this.file.refresh();
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
LOG.error(fse.getLocalizedMessage(), fse);
}
@@ -512,7 +512,7 @@ public class DefaultFileMonitor implemen
* FileObject.
* @param child The child to add.
*/
- private void fireAllCreate(FileObject child)
+ private void fireAllCreate(final FileObject child)
{
// Add listener so that it can be triggered
if (this.fm.getFileListener() != null)
@@ -538,8 +538,8 @@ public class DefaultFileMonitor implemen
{
if (child.getType().hasChildren())
{
- FileObject[] newChildren = child.getChildren();
- for (FileObject element : newChildren)
+ final FileObject[] newChildren = child.getChildren();
+ for (final FileObject element : newChildren)
{
fireAllCreate(element);
}
@@ -547,7 +547,7 @@ public class DefaultFileMonitor implemen
}
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
LOG.error(fse.getLocalizedMessage(), fse);
}
@@ -563,12 +563,12 @@ public class DefaultFileMonitor implemen
{
if (this.file.getType().hasChildren())
{
- FileObject[] newChildren = this.file.getChildren();
+ final FileObject[] newChildren = this.file.getChildren();
if (this.children != null)
{
// See which new children are not listed in the current children map.
- Map<FileName, Object> newChildrenMap = new HashMap<FileName, Object>();
- Stack<FileObject> missingChildren = new Stack<FileObject>();
+ final Map<FileName, Object> newChildrenMap = new HashMap<FileName, Object>();
+ final Stack<FileObject> missingChildren = new Stack<FileObject>();
for (int i = 0; i < newChildren.length; i++)
{
@@ -590,7 +590,7 @@ public class DefaultFileMonitor implemen
while (!missingChildren.empty())
{
- FileObject child = missingChildren.pop();
+ final FileObject child = missingChildren.pop();
this.fireAllCreate(child);
}
}
@@ -603,7 +603,7 @@ public class DefaultFileMonitor implemen
{
this.children = new HashMap<FileName, Object>();
}
- for (FileObject element : newChildren)
+ for (final FileObject element : newChildren)
{
this.children.put(element.getName(), new
Object()); // null?
@@ -612,7 +612,7 @@ public class DefaultFileMonitor implemen
}
}
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
LOG.error(fse.getLocalizedMessage(), fse);
}
@@ -680,7 +680,7 @@ public class DefaultFileMonitor implemen
this.checkForNewChildren();
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
LOG.error(fse.getLocalizedMessage(), fse);
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileReplicator.java Mon Dec 3 13:37:12 2012
@@ -75,7 +75,7 @@ public class DefaultFileReplicator
{
if (tempDir == null)
{
- String baseTmpDir = System.getProperty("java.io.tmpdir");
+ final String baseTmpDir = System.getProperty("java.io.tmpdir");
tempDir = new File(baseTmpDir, "vfs_cache").getAbsoluteFile();
}
@@ -119,7 +119,7 @@ public class DefaultFileReplicator
* physically deletes the file from the filesystem
* @param file The File to delete.
*/
- protected void deleteFile(File file)
+ protected void deleteFile(final File file)
{
try
{
@@ -150,7 +150,7 @@ public class DefaultFileReplicator
* removes a instance from the list of copies
* @param file The File to remove.
*/
- protected void removeFile(Object file)
+ protected void removeFile(final Object file)
{
synchronized (copies)
{
@@ -187,7 +187,7 @@ public class DefaultFileReplicator
return file;
}
- protected void addFile(Object file)
+ protected void addFile(final Object file)
{
synchronized (copies)
{
@@ -212,7 +212,7 @@ public class DefaultFileReplicator
// imario@apache.org: BUG34976 get rid of maybe reserved and dangerous characters
// e.g. to allow replication of http://hostname.org/fileservlet?file=abc.txt
- String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_');
+ final String safeBasename = UriParser.encode(baseName, TMP_RESERVED_CHARS).replace('%', '_');
return "tmp_" + getFilecount() + "_" + safeBasename;
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java Mon Dec 3 13:37:12 2012
@@ -46,7 +46,7 @@ public class DefaultFileSystemConfigBuil
* @param userAuthenticator The UserAuthenticator.
* @throws FileSystemException if an error occurs setting the UserAuthenticator.
*/
- public void setUserAuthenticator(FileSystemOptions opts, UserAuthenticator userAuthenticator)
+ public void setUserAuthenticator(final FileSystemOptions opts, final UserAuthenticator userAuthenticator)
throws FileSystemException
{
setParam(opts, "userAuthenticator", userAuthenticator);
@@ -57,7 +57,7 @@ public class DefaultFileSystemConfigBuil
* @param opts The FileSystemOptions.
* @return The UserAuthenticator.
*/
- public UserAuthenticator getUserAuthenticator(FileSystemOptions opts)
+ public UserAuthenticator getUserAuthenticator(final FileSystemOptions opts)
{
return (UserAuthenticator) getParam(opts, "userAuthenticator");
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java Mon Dec 3 13:37:12 2012
@@ -331,7 +331,7 @@ public class DefaultFileSystemManager im
* constructor with a single {@link FileObject} as argument
* @throws FileSystemException if an error occurs setting the decorator.
*/
- public void setFileObjectDecorator(Class<?> fileObjectDecorator) throws FileSystemException
+ public void setFileObjectDecorator(final Class<?> fileObjectDecorator) throws FileSystemException
{
if (init)
{
@@ -346,7 +346,7 @@ public class DefaultFileSystemManager im
{
fileObjectDecoratorConst = fileObjectDecorator.getConstructor(new Class[]{FileObject.class});
}
- catch (NoSuchMethodException e)
+ catch (final NoSuchMethodException e)
{
throw new FileSystemException("vfs.impl/invalid-decorator.error", fileObjectDecorator.getName(), e);
}
@@ -371,7 +371,7 @@ public class DefaultFileSystemManager im
* @param fileContentInfoFactory The FileContentInfoFactory.
* @throws FileSystemException if an error occurs setting the FileContentInfoFactory.
*/
- public void setFileContentInfoFactory(FileContentInfoFactory fileContentInfoFactory)
+ public void setFileContentInfoFactory(final FileContentInfoFactory fileContentInfoFactory)
throws FileSystemException
{
if (init)
@@ -527,7 +527,7 @@ public class DefaultFileSystemManager im
}
// Close the providers.
- for (Object provider : providers.values())
+ for (final Object provider : providers.values())
{
closeComponent(provider);
}
@@ -558,7 +558,7 @@ public class DefaultFileSystemManager im
}
// Close the providers.
- for (FileProvider fileProvider : providers.values())
+ for (final FileProvider fileProvider : providers.values())
{
final AbstractFileProvider provider = (AbstractFileProvider) fileProvider;
provider.freeUnusedResources();
@@ -789,7 +789,7 @@ public class DefaultFileSystemManager im
// // UriParser.canonicalizePath(buffer, 0, name.length());
// Normalise the path
- FileType fileType = UriParser.normalisePath(buffer);
+ final FileType fileType = UriParser.normalisePath(buffer);
// Check the name is ok
final String resolvedPath = buffer.toString();
@@ -843,7 +843,7 @@ public class DefaultFileSystemManager im
* @throws FileSystemException if an error occurs.
*/
@Override
- public FileName resolveURI(String uri) throws FileSystemException
+ public FileName resolveURI(final String uri) throws FileSystemException
{
UriParser.checkUriEncoding(uri);
@@ -1014,7 +1014,7 @@ public class DefaultFileSystemManager im
* @param filesystem The FileSystem to close.
*/
@Override
- public void closeFileSystem(FileSystem filesystem)
+ public void closeFileSystem(final FileSystem filesystem)
{
// inform the cache ...
getFilesCache().clear(filesystem);
@@ -1031,9 +1031,9 @@ public class DefaultFileSystemManager im
*
* @param filesystem The FileSystem to close.
*/
- public void _closeFileSystem(FileSystem filesystem)
+ public void _closeFileSystem(final FileSystem filesystem)
{
- FileProvider provider = providers.get(filesystem.getRootName().getScheme());
+ final FileProvider provider = providers.get(filesystem.getRootName().getScheme());
if (provider != null)
{
((AbstractFileProvider) provider).closeFileSystem(filesystem);
@@ -1049,7 +1049,7 @@ public class DefaultFileSystemManager im
@Override
public URLStreamHandler createURLStreamHandler(final String protocol)
{
- FileProvider provider = providers.get(protocol);
+ final FileProvider provider = providers.get(protocol);
if (provider != null)
{
return new DefaultURLStreamHandler(context);
@@ -1067,7 +1067,7 @@ public class DefaultFileSystemManager im
@Override
public String[] getSchemes()
{
- String[] schemes = new String[providers.size()];
+ final String[] schemes = new String[providers.size()];
providers.keySet().toArray(schemes);
return schemes;
}
@@ -1083,7 +1083,7 @@ public class DefaultFileSystemManager im
public Collection<Capability> getProviderCapabilities(final String scheme)
throws FileSystemException
{
- FileProvider provider = providers.get(scheme);
+ final FileProvider provider = providers.get(scheme);
if (provider == null)
{
throw new FileSystemException("vfs.impl/unknown-scheme.error", scheme);
@@ -1102,7 +1102,7 @@ public class DefaultFileSystemManager im
public FileSystemConfigBuilder getFileSystemConfigBuilder(final String scheme)
throws FileSystemException
{
- FileProvider provider = providers.get(scheme);
+ final FileProvider provider = providers.get(scheme);
if (provider == null)
{
throw new FileSystemException("vfs.impl/unknown-scheme.error", scheme);
@@ -1144,7 +1144,7 @@ public class DefaultFileSystemManager im
final FileOperationProvider operationProvider)
throws FileSystemException
{
- for (String scheme : schemes)
+ for (final String scheme : schemes)
{
if (!operationProviders.containsKey(scheme))
{
@@ -1182,7 +1182,7 @@ public class DefaultFileSystemManager im
throws FileSystemException
{
- List<?> providers = operationProviders.get(scheme);
+ final List<?> providers = operationProviders.get(scheme);
if (providers == null || providers.size() == 0)
{
return null;
@@ -1200,7 +1200,7 @@ public class DefaultFileSystemManager im
* @since 2.1
*/
@Override
- public FileObject resolveFile(URI uri) throws FileSystemException
+ public FileObject resolveFile(final URI uri) throws FileSystemException
{
// TODO Push the URI deeper into VFS
return resolveFile(baseFile, uri.toString(), null);
@@ -1216,13 +1216,13 @@ public class DefaultFileSystemManager im
* @since 2.1
*/
@Override
- public FileObject resolveFile(URL url) throws FileSystemException
+ public FileObject resolveFile(final URL url) throws FileSystemException
{
try
{
return this.resolveFile(url.toURI());
}
- catch (URISyntaxException e)
+ catch (final URISyntaxException e)
{
throw new FileSystemException(e);
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultVfsComponentContext.java Mon Dec 3 13:37:12 2012
@@ -63,7 +63,7 @@ final class DefaultVfsComponentContext
}
@Override
- public FileName parseURI(String uri) throws FileSystemException
+ public FileName parseURI(final String uri) throws FileSystemException
{
return manager.resolveURI(uri);
}
@@ -72,7 +72,7 @@ final class DefaultVfsComponentContext
* Returns a {@link FileObject} for a local file.
*/
@Override
- public FileObject toFileObject(File file)
+ public FileObject toFileObject(final File file)
throws FileSystemException
{
return manager.toFileObject(file);
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java Mon Dec 3 13:37:12 2012
@@ -31,14 +31,14 @@ import org.apache.commons.vfs2.FileConte
public class FileContentInfoFilenameFactory implements FileContentInfoFactory
{
@Override
- public FileContentInfo create(FileContent fileContent)
+ public FileContentInfo create(final FileContent fileContent)
{
String contentType = null;
- String name = fileContent.getFile().getName().getBaseName();
+ final String name = fileContent.getFile().getName().getBaseName();
if (name != null)
{
- FileNameMap fileNameMap = URLConnection.getFileNameMap();
+ final FileNameMap fileNameMap = URLConnection.getFileNameMap();
contentType = fileNameMap.getContentTypeFor(name);
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/PrivilegedFileReplicator.java Mon Dec 3 13:37:12 2012
@@ -40,7 +40,7 @@ public class PrivilegedFileReplicator
private final FileReplicator replicator;
private final VfsComponent replicatorComponent;
- public PrivilegedFileReplicator(FileReplicator replicator)
+ public PrivilegedFileReplicator(final FileReplicator replicator)
{
this.replicator = replicator;
if (replicator instanceof VfsComponent)
@@ -119,7 +119,7 @@ public class PrivilegedFileReplicator
* @throws FileSystemException if an error occurs.
*/
@Override
- public File replicateFile(FileObject srcFile, FileSelector selector)
+ public File replicateFile(final FileObject srcFile, final FileSelector selector)
throws FileSystemException
{
try
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/ProviderConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/ProviderConfiguration.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/ProviderConfiguration.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/ProviderConfiguration.java Mon Dec 3 13:37:12 2012
@@ -38,12 +38,12 @@ public class ProviderConfiguration
return className;
}
- public void setClassName(String className)
+ public void setClassName(final String className)
{
this.className = className;
}
- public void setScheme(String scheme)
+ public void setScheme(final String scheme)
{
schemes.add(scheme);
}
@@ -53,7 +53,7 @@ public class ProviderConfiguration
return schemes;
}
- public void setDependency(String dependency)
+ public void setDependency(final String dependency)
{
dependenies.add(dependency);
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java Mon Dec 3 13:37:12 2012
@@ -61,7 +61,7 @@ public class StandardFileSystemManager
{
setConfiguration(new URL(configUri));
}
- catch (MalformedURLException e)
+ catch (final MalformedURLException e)
{
getLogger().warn(e.getLocalizedMessage(), e);
}
@@ -134,21 +134,21 @@ public class StandardFileSystemManager
*/
protected void configurePlugins() throws FileSystemException
{
- ClassLoader cl = findClassLoader();
+ final ClassLoader cl = findClassLoader();
Enumeration<URL> enumResources;
try
{
enumResources = cl.getResources(PLUGIN_CONFIG_RESOURCE);
}
- catch (IOException e)
+ catch (final IOException e)
{
throw new FileSystemException(e);
}
while (enumResources.hasMoreElements())
{
- URL url = enumResources.nextElement();
+ final URL url = enumResources.nextElement();
configure(url);
}
}
@@ -204,7 +204,7 @@ public class StandardFileSystemManager
{
configStream.close();
}
- catch (IOException e)
+ catch (final IOException e)
{
getLogger().warn(e.getLocalizedMessage(), e);
}
@@ -339,7 +339,7 @@ public class StandardFileSystemManager
// Make sure all required schemes are available
final String[] requiredSchemes = getRequiredSchemes(providerDef);
- for (String requiredScheme : requiredSchemes)
+ for (final String requiredScheme : requiredSchemes)
{
if (!hasProvider(requiredScheme))
{
@@ -352,7 +352,7 @@ public class StandardFileSystemManager
// Make sure all required classes are in classpath
final String[] requiredClasses = getRequiredClasses(providerDef);
- for (String requiredClass : requiredClasses)
+ for (final String requiredClass : requiredClasses)
{
if (!findClass(requiredClass))
{
@@ -424,7 +424,7 @@ public class StandardFileSystemManager
for (int i = 0; i < count; i++)
{
final Element dep = (Element) deps.item(i);
- String className = dep.getAttribute("class-name");
+ final String className = dep.getAttribute("class-name");
if (className != null && className.length() > 0)
{
classes.add(className);
@@ -444,7 +444,7 @@ public class StandardFileSystemManager
for (int i = 0; i < count; i++)
{
final Element dep = (Element) deps.item(i);
- String scheme = dep.getAttribute("scheme");
+ final String scheme = dep.getAttribute("scheme");
if (scheme != null && scheme.length() > 0)
{
schemes.add(scheme);
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/SynchronizedFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/SynchronizedFileObject.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/SynchronizedFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/SynchronizedFileObject.java Mon Dec 3 13:37:12 2012
@@ -30,7 +30,7 @@ import org.apache.commons.vfs2.NameScope
*/
public class SynchronizedFileObject extends DecoratedFileObject
{
- public SynchronizedFileObject(FileObject fileObject)
+ public SynchronizedFileObject(final FileObject fileObject)
{
super(fileObject);
}
@@ -45,7 +45,7 @@ public class SynchronizedFileObject exte
}
@Override
- public void copyFrom(FileObject srcFile, FileSelector selector) throws FileSystemException
+ public void copyFrom(final FileObject srcFile, final FileSelector selector) throws FileSystemException
{
synchronized (this)
{
@@ -81,7 +81,7 @@ public class SynchronizedFileObject exte
}
@Override
- public int delete(FileSelector selector) throws FileSystemException
+ public int delete(final FileSelector selector) throws FileSystemException
{
synchronized (this)
{
@@ -99,7 +99,7 @@ public class SynchronizedFileObject exte
}
@Override
- public void findFiles(FileSelector selector, boolean depthwise, List<FileObject> selected)
+ public void findFiles(final FileSelector selector, final boolean depthwise, final List<FileObject> selected)
throws FileSystemException
{
synchronized (this)
@@ -109,7 +109,7 @@ public class SynchronizedFileObject exte
}
@Override
- public FileObject[] findFiles(FileSelector selector) throws FileSystemException
+ public FileObject[] findFiles(final FileSelector selector) throws FileSystemException
{
synchronized (this)
{
@@ -118,7 +118,7 @@ public class SynchronizedFileObject exte
}
@Override
- public FileObject getChild(String name) throws FileSystemException
+ public FileObject getChild(final String name) throws FileSystemException
{
synchronized (this)
{
@@ -190,7 +190,7 @@ public class SynchronizedFileObject exte
}
@Override
- public boolean setReadable(boolean readable, boolean ownerOnly) throws FileSystemException
+ public boolean setReadable(final boolean readable, final boolean ownerOnly) throws FileSystemException
{
synchronized (this)
{
@@ -199,7 +199,7 @@ public class SynchronizedFileObject exte
}
@Override
- public boolean setWritable(boolean writable, boolean ownerOnly) throws FileSystemException
+ public boolean setWritable(final boolean writable, final boolean ownerOnly) throws FileSystemException
{
synchronized (this)
{
@@ -208,7 +208,7 @@ public class SynchronizedFileObject exte
}
@Override
- public boolean setExecutable(boolean executable, boolean ownerOnly) throws FileSystemException
+ public boolean setExecutable(final boolean executable, final boolean ownerOnly) throws FileSystemException
{
synchronized (this)
{
@@ -217,7 +217,7 @@ public class SynchronizedFileObject exte
}
@Override
- public void moveTo(FileObject destFile) throws FileSystemException
+ public void moveTo(final FileObject destFile) throws FileSystemException
{
synchronized (this)
{
@@ -226,7 +226,7 @@ public class SynchronizedFileObject exte
}
@Override
- public FileObject resolveFile(String name, NameScope scope) throws FileSystemException
+ public FileObject resolveFile(final String name, final NameScope scope) throws FileSystemException
{
synchronized (this)
{
@@ -235,7 +235,7 @@ public class SynchronizedFileObject exte
}
@Override
- public FileObject resolveFile(String path) throws FileSystemException
+ public FileObject resolveFile(final String path) throws FileSystemException
{
synchronized (this)
{
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/URLStreamHandlerProxy.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/URLStreamHandlerProxy.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/URLStreamHandlerProxy.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/URLStreamHandlerProxy.java Mon Dec 3 13:37:12 2012
@@ -49,7 +49,7 @@ class URLStreamHandlerProxy
url.getPort(), url.getAuthority(), url.getUserInfo(),
url.getFile(), url.getQuery(), url.getRef());
}
- catch (MalformedURLException mue)
+ catch (final MalformedURLException mue)
{
//We retrow this as a simple runtime exception.
//It is retrown in URL as a MalformedURLException anyway.
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VFSClassLoader.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VFSClassLoader.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VFSClassLoader.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VFSClassLoader.java Mon Dec 3 13:37:12 2012
@@ -272,19 +272,19 @@ public class VFSClassLoader extends Secu
try
{
final String url = cs.getLocation().toString();
- FileObject file = lookupFileObject(url);
+ final FileObject file = lookupFileObject(url);
if (file == null)
{
return super.getPermissions(cs);
}
- FileObject parentLayer = file.getFileSystem().getParentLayer();
+ final FileObject parentLayer = file.getFileSystem().getParentLayer();
if (parentLayer == null)
{
return super.getPermissions(cs);
}
- Permissions combi = new Permissions();
+ final Permissions combi = new Permissions();
PermissionCollection permCollect = super.getPermissions(cs);
copyPermissions(permCollect, combi);
@@ -315,7 +315,7 @@ public class VFSClassLoader extends Secu
protected void copyPermissions(final PermissionCollection src,
final PermissionCollection dest)
{
- for (Enumeration<Permission> elem = src.elements(); elem.hasMoreElements();)
+ for (final Enumeration<Permission> elem = src.elements(); elem.hasMoreElements();)
{
final Permission permission = elem.nextElement();
dest.add(permission);
@@ -401,7 +401,7 @@ public class VFSClassLoader extends Secu
*/
private Resource loadResource(final String name) throws FileSystemException
{
- for (FileObject baseFile : resources)
+ for (final FileObject baseFile : resources)
{
final FileObject file = baseFile.resolveFile(name, NameScope.DESCENDENT_OR_SELF);
if (file.exists())
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileName.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileName.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileName.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileName.java Mon Dec 3 13:37:12 2012
@@ -31,13 +31,13 @@ public class VirtualFileName extends Abs
}
@Override
- public FileName createName(String absPath, FileType type)
+ public FileName createName(final String absPath, final FileType type)
{
return new VirtualFileName(getScheme(), absPath, type);
}
@Override
- protected void appendRootUri(StringBuilder buffer, boolean addPassword)
+ protected void appendRootUri(final StringBuilder buffer, final boolean addPassword)
{
buffer.append(getScheme());
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileSystem.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileSystem.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VirtualFileSystem.java Mon Dec 3 13:37:12 2012
@@ -185,7 +185,7 @@ public class VirtualFileSystem extends A
}
// Find matching junction
- for (FileName junctionPoint : junctions.keySet())
+ for (final FileName junctionPoint : junctions.keySet())
{
if (junctionPoint.isDescendent(name))
{
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java Mon Dec 3 13:37:12 2012
@@ -80,12 +80,12 @@ public abstract class AbstractFileOperat
* if operation cannot be retrieved.
*/
@Override
- public final FileOperation getOperation(FileObject file, Class<? extends FileOperation> operationClass)
+ public final FileOperation getOperation(final FileObject file, final Class<? extends FileOperation> operationClass)
throws FileSystemException
{
- Class<? extends FileOperation> implementation = lookupOperation(operationClass);
+ final Class<? extends FileOperation> implementation = lookupOperation(operationClass);
- FileOperation operationInstance = instantiateOperation(file, implementation);
+ final FileOperation operationInstance = instantiateOperation(file, implementation);
return operationInstance;
}
@@ -115,10 +115,10 @@ public abstract class AbstractFileOperat
// find appropriate class
Class<? extends FileOperation> foundClass = null;
- Iterator<Class<? extends FileOperation>> iterator = operations.iterator();
+ final Iterator<Class<? extends FileOperation>> iterator = operations.iterator();
while (iterator.hasNext())
{
- Class<? extends FileOperation> operation = iterator.next();
+ final Class<? extends FileOperation> operation = iterator.next();
if (operationClass.isAssignableFrom(operation))
{
foundClass = operation;
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/DefaultFileOperations.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/DefaultFileOperations.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/DefaultFileOperations.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/DefaultFileOperations.java Mon Dec 3 13:37:12 2012
@@ -67,12 +67,13 @@ public class DefaultFileOperations imple
final List<Class<? extends FileOperation>> operations = new ArrayList<Class<? extends FileOperation>>();
- for (FileOperationProvider provider : providers)
+ for (final FileOperationProvider provider : providers)
{
provider.collectOperations(operations, fileObject);
}
@SuppressWarnings("unchecked")
+ final
Class<? extends FileOperation>[] array =
(Class<? extends FileOperation>[]) operations.toArray(new Class<?>[] {});
return array;
@@ -84,7 +85,7 @@ public class DefaultFileOperations imple
* @throws FileSystemException if an error occurs.
*/
@Override
- public FileOperation getOperation(Class<? extends FileOperation> operationClass)
+ public FileOperation getOperation(final Class<? extends FileOperation> operationClass)
throws FileSystemException
{
@@ -100,7 +101,7 @@ public class DefaultFileOperations imple
FileOperation resultOperation = null;
- for (FileOperationProvider provider : providers)
+ for (final FileOperationProvider provider : providers)
{
resultOperation = provider.getOperation(fileObject, operationClass);
@@ -127,15 +128,15 @@ public class DefaultFileOperations imple
* @throws FileSystemException if an error occurs.
*/
@Override
- public boolean hasOperation(Class<? extends FileOperation> operationClass) throws FileSystemException
+ public boolean hasOperation(final Class<? extends FileOperation> operationClass) throws FileSystemException
{
- Class<? extends FileOperation>[] operations = getOperations();
+ final Class<? extends FileOperation>[] operations = getOperations();
if (operations == null)
{
return false;
}
- for (Class<? extends FileOperation> operation : operations)
+ for (final Class<? extends FileOperation> operation : operations)
{
if (operationClass.isAssignableFrom(operation))
{
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/vcs/VcsStatus.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/vcs/VcsStatus.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/vcs/VcsStatus.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/operations/vcs/VcsStatus.java Mon Dec 3 13:37:12 2012
@@ -47,7 +47,7 @@ public enum VcsStatus
private int status;
- private VcsStatus(int status)
+ private VcsStatus(final int status)
{
this.status = status;
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java Mon Dec 3 13:37:12 2012
@@ -41,7 +41,7 @@ public abstract class AbstractFileName i
private String key = null;
- public AbstractFileName(final String scheme, final String absPath, FileType type)
+ public AbstractFileName(final String scheme, final String absPath, final FileType type)
{
this.rootUri = null;
this.scheme = scheme;
@@ -64,7 +64,7 @@ public abstract class AbstractFileName i
}
@Override
- public boolean equals(Object o)
+ public boolean equals(final Object o)
{
if (this == o)
{
@@ -75,7 +75,7 @@ public abstract class AbstractFileName i
return false;
}
- AbstractFileName that = (AbstractFileName) o;
+ final AbstractFileName that = (AbstractFileName) o;
return getKey().equals(that.getKey());
}
@@ -93,7 +93,7 @@ public abstract class AbstractFileName i
* @return negative number if less than, 0 if equal, positive if greater than.
*/
@Override
- public int compareTo(FileName obj)
+ public int compareTo(final FileName obj)
{
final AbstractFileName name = (AbstractFileName) obj;
return getKey().compareTo(name.getKey());
@@ -278,7 +278,7 @@ public abstract class AbstractFileName i
return createURI(false, false);
}
- private String createURI(boolean useAbsolutePath, boolean usePassword)
+ private String createURI(final boolean useAbsolutePath, final boolean usePassword)
{
final StringBuilder buffer = new StringBuilder();
appendRootUri(buffer, usePassword);
@@ -500,7 +500,7 @@ public abstract class AbstractFileName i
* @param type {@link FileType#FOLDER} or {@link FileType#FILE}
* @throws FileSystemException if an error occurs.
*/
- void setType(FileType type) throws FileSystemException
+ void setType(final FileType type) throws FileSystemException
{
if (type != FileType.FOLDER && type != FileType.FILE && type != FileType.FILE_OR_FOLDER)
{
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java Mon Dec 3 13:37:12 2012
@@ -22,7 +22,7 @@ package org.apache.commons.vfs2.provider
public abstract class AbstractFileNameParser implements FileNameParser
{
@Override
- public boolean encodeCharacter(char ch)
+ public boolean encodeCharacter(final char ch)
{
return ch == '%';
}
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=1416507&r1=1416506&r2=1416507&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 Mon Dec 3 13:37:12 2012
@@ -187,7 +187,7 @@ public abstract class AbstractFileObject
* @see #setReadable(boolean, boolean)
* @since 2.1
*/
- protected boolean doSetReadable(boolean readable, boolean ownerOnly) throws Exception
+ protected boolean doSetReadable(final boolean readable, final boolean ownerOnly) throws Exception
{
return false;
}
@@ -216,7 +216,7 @@ public abstract class AbstractFileObject
* @see #setWritable(boolean, boolean)
* @since 2.1
*/
- protected boolean doSetWritable(boolean writable, boolean ownerOnly) throws Exception
+ protected boolean doSetWritable(final boolean writable, final boolean ownerOnly) throws Exception
{
return false;
}
@@ -232,7 +232,7 @@ public abstract class AbstractFileObject
* @see #setExecutable(boolean, boolean)
* @since 2.1
*/
- protected boolean doSetExecutable(boolean writable, boolean ownerOnly) throws Exception
+ protected boolean doSetExecutable(final boolean writable, final boolean ownerOnly) throws Exception
{
return false;
}
@@ -288,7 +288,7 @@ public abstract class AbstractFileObject
* @param newFile A FileObject with the new file name.
* @throws Exception if an error occurs.
*/
- protected void doRename(FileObject newFile) throws Exception
+ protected void doRename(final FileObject newFile) throws Exception
{
throw new FileSystemException("vfs.provider/rename-not-supported.error");
}
@@ -318,7 +318,7 @@ public abstract class AbstractFileObject
* @param newType The type of the file.
* @throws Exception if an error occurs.
*/
- protected void onChildrenChanged(FileName child, FileType newType) throws Exception
+ protected void onChildrenChanged(final FileName child, final FileType newType) throws Exception
{
}
@@ -470,7 +470,7 @@ public abstract class AbstractFileObject
* @return An OutputStream to write to the file.
* @throws Exception if an error occurs.
*/
- protected OutputStream doGetOutputStream(boolean bAppend) throws Exception
+ protected OutputStream doGetOutputStream(final boolean bAppend) throws Exception
{
throw new FileSystemException("vfs.provider/write-not-supported.error");
}
@@ -577,7 +577,7 @@ public abstract class AbstractFileObject
setFileType(FileType.IMAGINARY);
}
}
- catch (Exception e)
+ catch (final Exception e)
{
throw new FileSystemException("vfs.provider/get-type.error", e, name);
}
@@ -672,7 +672,7 @@ public abstract class AbstractFileObject
}
@Override
- public boolean setReadable(boolean readable, boolean ownerOnly) throws FileSystemException
+ public boolean setReadable(final boolean readable, final boolean ownerOnly) throws FileSystemException
{
try
{
@@ -715,7 +715,7 @@ public abstract class AbstractFileObject
}
@Override
- public boolean setWritable(boolean readable, boolean ownerOnly) throws FileSystemException
+ public boolean setWritable(final boolean readable, final boolean ownerOnly) throws FileSystemException
{
try
{
@@ -728,7 +728,7 @@ public abstract class AbstractFileObject
}
@Override
- public boolean setExecutable(boolean readable, boolean ownerOnly) throws FileSystemException
+ public boolean setExecutable(final boolean readable, final boolean ownerOnly) throws FileSystemException
{
try
{
@@ -752,7 +752,7 @@ public abstract class AbstractFileObject
{
return listFiles(Selectors.SELECT_ALL).iterator();
}
- catch (FileSystemException e)
+ catch (final FileSystemException e)
{
throw new IllegalStateException(e);
}
@@ -849,12 +849,12 @@ public abstract class AbstractFileObject
childrenObjects = doListChildrenResolved();
children = extractNames(childrenObjects);
}
- catch (FileSystemException exc)
+ catch (final FileSystemException exc)
{
// VFS-210
throw exc;
}
- catch (Exception exc)
+ catch (final Exception exc)
{
throw new FileSystemException("vfs.provider/list-children.error", exc, name);
}
@@ -870,12 +870,12 @@ public abstract class AbstractFileObject
{
files = doListChildren();
}
- catch (FileSystemException exc)
+ catch (final FileSystemException exc)
{
// VFS-210
throw exc;
}
- catch (Exception exc)
+ catch (final Exception exc)
{
throw new FileSystemException("vfs.provider/list-children.error", exc, name);
}
@@ -910,14 +910,14 @@ public abstract class AbstractFileObject
}
}
- private FileName[] extractNames(FileObject[] objects)
+ private FileName[] extractNames(final FileObject[] objects)
{
if (objects == null)
{
return null;
}
- FileName[] names = new FileName[objects.length];
+ final FileName[] names = new FileName[objects.length];
for (int iterObjects = 0; iterObjects < objects.length; iterObjects++)
{
names[iterObjects] = objects[iterObjects].getName();
@@ -926,14 +926,14 @@ public abstract class AbstractFileObject
return names;
}
- private FileObject[] resolveFiles(FileName[] children) throws FileSystemException
+ private FileObject[] resolveFiles(final FileName[] children) throws FileSystemException
{
if (children == null)
{
return null;
}
- FileObject[] objects = new FileObject[children.length];
+ final FileObject[] objects = new FileObject[children.length];
for (int iterChildren = 0; iterChildren < children.length; iterChildren++)
{
objects[iterChildren] = resolveFile(children[iterChildren]);
@@ -942,7 +942,7 @@ public abstract class AbstractFileObject
return objects;
}
- private FileObject resolveFile(FileName child) throws FileSystemException
+ private FileObject resolveFile(final FileName child) throws FileSystemException
{
return fs.resolveFile(child);
}
@@ -958,7 +958,7 @@ public abstract class AbstractFileObject
{
// TODO - use a hashtable when there are a large number of children
final FileObject[] children = getChildren();
- for (FileObject element : children)
+ for (final FileObject element : children)
{
// final FileObject child = children[i];
final FileName child = element.getName();
@@ -1225,7 +1225,7 @@ public abstract class AbstractFileObject
* the given object.
*/
@Override
- public int compareTo(FileObject file)
+ public int compareTo(final FileObject file)
{
if (file == null)
{
@@ -1262,7 +1262,7 @@ public abstract class AbstractFileObject
file.findFiles(selector, false, files);
// Copy everything across
- for (FileObject srcFile : files)
+ for (final FileObject srcFile : files)
{
// Determine the destination file
final String relPath = file.getName().getRelativeName(srcFile.getName());
@@ -1302,7 +1302,7 @@ public abstract class AbstractFileObject
* @throws FileSystemException if an error occurs.
*/
@Override
- public void moveTo(FileObject destFile) throws FileSystemException
+ public void moveTo(final FileObject destFile) throws FileSystemException
{
if (canRenameTo(destFile))
{
@@ -1380,7 +1380,7 @@ public abstract class AbstractFileObject
* @return true if the FileObjects are the same.
* @throws FileSystemException if an error occurs.
*/
- protected boolean isSameFile(FileObject destFile) throws FileSystemException
+ protected boolean isSameFile(final FileObject destFile) throws FileSystemException
{
attach();
return doIsSameFile(destFile);
@@ -1394,7 +1394,7 @@ public abstract class AbstractFileObject
* @return true if the FileObjects are the same.
* @throws FileSystemException if an error occurs.
*/
- protected boolean doIsSameFile(FileObject destFile) throws FileSystemException
+ protected boolean doIsSameFile(final FileObject destFile) throws FileSystemException
{
return false;
}
@@ -1407,7 +1407,7 @@ public abstract class AbstractFileObject
* @return true if rename is possible
*/
@Override
- public boolean canRenameTo(FileObject newfile)
+ public boolean canRenameTo(final FileObject newfile)
{
return fs == newfile.getFileSystem();
}
@@ -1492,7 +1492,7 @@ public abstract class AbstractFileObject
content.close();
content = null;
}
- catch (FileSystemException e)
+ catch (final FileSystemException e)
{
exc = e;
}
@@ -1630,7 +1630,7 @@ public abstract class AbstractFileObject
* @throws FileSystemException if an error occurs; for example:<br>
* bAppend is true, and the unbderlying FileSystem does not support it
*/
- public OutputStream getOutputStream(boolean bAppend) throws FileSystemException
+ public OutputStream getOutputStream(final boolean bAppend) throws FileSystemException
{
/* VFS-210
if (getType() != FileType.IMAGINARY && !getType().hasContent())
@@ -1663,11 +1663,11 @@ public abstract class AbstractFileObject
{
return doGetOutputStream(bAppend);
}
- catch (RuntimeException re)
+ catch (final RuntimeException re)
{
throw re;
}
- catch (Exception exc)
+ catch (final Exception exc)
{
throw new FileSystemException("vfs.provider/write.error", exc, name);
}
@@ -1750,7 +1750,7 @@ public abstract class AbstractFileObject
}
*/
}
- catch (Exception exc)
+ catch (final Exception exc)
{
throw new FileSystemException("vfs.provider/get-type.error", exc, name);
}
@@ -1852,7 +1852,7 @@ public abstract class AbstractFileObject
* @param newType The type of the child.
* @throws Exception if an error occurs.
*/
- protected void childrenChanged(FileName childName, FileType newType) throws Exception
+ protected void childrenChanged(final FileName childName, final FileType newType) throws Exception
{
// TODO - this may be called when not attached
@@ -1886,11 +1886,11 @@ public abstract class AbstractFileObject
* @param newType The type of the child.
* @throws Exception if an error occurs.
*/
- private void notifyParent(FileName childName, FileType newType) throws Exception
+ private void notifyParent(final FileName childName, final FileType newType) throws Exception
{
if (parent == null)
{
- FileName parentName = name.getParent();
+ final FileName parentName = name.getParent();
if (parentName != null)
{
// Locate the parent, if it is cached
@@ -2018,12 +2018,12 @@ public abstract class AbstractFileObject
return fs.getFileSystemManager().getFileContentInfoFactory();
}
- protected void injectType(FileType fileType)
+ protected void injectType(final FileType fileType)
{
setFileType(fileType);
}
- private void setFileType(FileType type)
+ private void setFileType(final FileType type)
{
if (type != null && type != FileType.IMAGINARY)
{
@@ -2031,7 +2031,7 @@ public abstract class AbstractFileObject
{
name.setType(type);
}
- catch (FileSystemException e)
+ catch (final FileSystemException e)
{
throw new RuntimeException(e.getMessage());
}
@@ -2047,7 +2047,7 @@ public abstract class AbstractFileObject
* @param strongRef The Object to add.
*/
// TODO should this be a FileObject?
- public void holdObject(Object strongRef)
+ public void holdObject(final Object strongRef)
{
if (objects == null)
{
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileProvider.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileProvider.java Mon Dec 3 13:37:12 2012
@@ -54,7 +54,7 @@ public abstract class AbstractFileProvid
return parser;
}
- protected void setFileNameParser(FileNameParser parser)
+ protected void setFileNameParser(final FileNameParser parser)
{
this.parser = parser;
}
@@ -99,7 +99,7 @@ public abstract class AbstractFileProvid
// Add to the cache
addComponent(fs);
- FileSystemKey treeKey = new FileSystemKey(key, fs.getFileSystemOptions());
+ final FileSystemKey treeKey = new FileSystemKey(key, fs.getFileSystemOptions());
((AbstractFileSystem) fs).setCacheKey(treeKey);
synchronized (this)
@@ -115,7 +115,7 @@ public abstract class AbstractFileProvid
*/
protected FileSystem findFileSystem(final Comparable<?> key, final FileSystemOptions fileSystemProps)
{
- FileSystemKey treeKey = new FileSystemKey(key, fileSystemProps);
+ final FileSystemKey treeKey = new FileSystemKey(key, fileSystemProps);
synchronized (this)
{
@@ -143,9 +143,9 @@ public abstract class AbstractFileProvid
{
item = fileSystems.values().toArray();
}
- for (Object element : item)
+ for (final Object element : item)
{
- AbstractFileSystem fs = (AbstractFileSystem) element;
+ final AbstractFileSystem fs = (AbstractFileSystem) element;
if (fs.isReleaseable())
{
fs.closeCommunicationLink();
@@ -159,7 +159,7 @@ public abstract class AbstractFileProvid
*/
public void closeFileSystem(final FileSystem filesystem)
{
- AbstractFileSystem fs = (AbstractFileSystem) filesystem;
+ final AbstractFileSystem fs = (AbstractFileSystem) filesystem;
synchronized (this)
{
@@ -182,7 +182,7 @@ public abstract class AbstractFileProvid
* @throws FileSystemException if an error occurs.
*/
@Override
- public FileName parseUri(FileName base, String uri) throws FileSystemException
+ public FileName parseUri(final FileName base, final String uri) throws FileSystemException
{
if (getFileNameParser() != null)
{
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java Mon Dec 3 13:37:12 2012
@@ -110,7 +110,7 @@ public abstract class AbstractFileSystem
this.parentLayer = parentLayer;
this.rootName = rootName;
this.fileSystemOptions = fileSystemOptions;
- FileSystemConfigBuilder builder = DefaultFileSystemConfigBuilder.getInstance();
+ final FileSystemConfigBuilder builder = DefaultFileSystemConfigBuilder.getInstance();
String uri = builder.getRootURI(fileSystemOptions);
if (uri == null)
{
@@ -349,7 +349,7 @@ public abstract class AbstractFileSystem
{
file = createFile((AbstractFileName) name);
}
- catch (Exception e)
+ catch (final Exception e)
{
throw new FileSystemException("vfs.provider/resolve-file.error", name, e);
}
@@ -388,17 +388,17 @@ public abstract class AbstractFileSystem
file = (FileObject) getFileSystemManager().getFileObjectDecoratorConst().
newInstance(new Object[]{file});
}
- catch (InstantiationException e)
+ catch (final InstantiationException e)
{
throw new FileSystemException("vfs.impl/invalid-decorator.error",
getFileSystemManager().getFileObjectDecorator().getName(), e);
}
- catch (IllegalAccessException e)
+ catch (final IllegalAccessException e)
{
throw new FileSystemException("vfs.impl/invalid-decorator.error",
getFileSystemManager().getFileObjectDecorator().getName(), e);
}
- catch (InvocationTargetException e)
+ catch (final InvocationTargetException e)
{
throw new FileSystemException("vfs.impl/invalid-decorator.error",
getFileSystemManager().getFileObjectDecorator().getName(), e);
@@ -635,17 +635,17 @@ public abstract class AbstractFileSystem
}
*/
- void fileObjectHanded(FileObject fileObject)
+ void fileObjectHanded(final FileObject fileObject)
{
useCount.incrementAndGet();
}
- void fileObjectDestroyed(FileObject fileObject)
+ void fileObjectDestroyed(final FileObject fileObject)
{
useCount.decrementAndGet();
}
- void setCacheKey(FileSystemKey cacheKey)
+ void setCacheKey(final FileSystemKey cacheKey)
{
this.cacheKey = cacheKey;
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractOriginatingFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractOriginatingFileProvider.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractOriginatingFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractOriginatingFileProvider.java Mon Dec 3 13:37:12 2012
@@ -55,7 +55,7 @@ public abstract class AbstractOriginatin
{
name = parseUri(baseFile != null ? baseFile.getName() : null, uri);
}
- catch (FileSystemException exc)
+ catch (final FileSystemException exc)
{
throw new FileSystemException("vfs.provider/invalid-absolute-uri.error", uri, exc);
}
@@ -77,7 +77,7 @@ public abstract class AbstractOriginatin
// Check in the cache for the file system
final FileName rootName = getContext().getFileSystemManager().resolveName(name, FileName.ROOT_PATH);
- FileSystem fs = getFileSystem(rootName, fileSystemOptions);
+ final FileSystem fs = getFileSystem(rootName, fileSystemOptions);
// Locate the file
// return fs.resolveFile(name.getPath());
@@ -92,7 +92,7 @@ public abstract class AbstractOriginatin
* @throws FileSystemException if an error occurs.
* @since 2.0
*/
- protected synchronized FileSystem getFileSystem(FileName rootName, final FileSystemOptions fileSystemOptions)
+ protected synchronized FileSystem getFileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions)
throws FileSystemException
{
FileSystem fs = findFileSystem(rootName, fileSystemOptions);
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java Mon Dec 3 13:37:12 2012
@@ -51,85 +51,85 @@ public abstract class AbstractRandomAcce
}
@Override
- public void write(byte[] b) throws IOException
+ public void write(final byte[] b) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void write(byte[] b, int off, int len) throws IOException
+ public void write(final byte[] b, final int off, final int len) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void write(int b) throws IOException
+ public void write(final int b) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeBoolean(boolean v) throws IOException
+ public void writeBoolean(final boolean v) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeByte(int v) throws IOException
+ public void writeByte(final int v) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeBytes(String s) throws IOException
+ public void writeBytes(final String s) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeChar(int v) throws IOException
+ public void writeChar(final int v) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeChars(String s) throws IOException
+ public void writeChars(final String s) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeDouble(double v) throws IOException
+ public void writeDouble(final double v) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeFloat(float v) throws IOException
+ public void writeFloat(final float v) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeInt(int v) throws IOException
+ public void writeInt(final int v) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeLong(long v) throws IOException
+ public void writeLong(final long v) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeShort(int v) throws IOException
+ public void writeShort(final int v) throws IOException
{
throw new UnsupportedOperationException();
}
@Override
- public void writeUTF(String str) throws IOException
+ public void writeUTF(final String str) throws IOException
{
throw new UnsupportedOperationException();
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessStreamContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessStreamContent.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessStreamContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessStreamContent.java Mon Dec 3 13:37:12 2012
@@ -95,19 +95,19 @@ public abstract class AbstractRandomAcce
}
@Override
- public int skipBytes(int n) throws IOException
+ public int skipBytes(final int n) throws IOException
{
return getDataInputStream().skipBytes(n);
}
@Override
- public void readFully(byte[] b) throws IOException
+ public void readFully(final byte[] b) throws IOException
{
getDataInputStream().readFully(b);
}
@Override
- public void readFully(byte[] b, int off, int len) throws IOException
+ public void readFully(final byte[] b, final int off, final int len) throws IOException
{
getDataInputStream().readFully(b, off, len);
}
@@ -125,7 +125,7 @@ public abstract class AbstractRandomAcce
}
@Override
- public void setLength(long newLength) throws IOException
+ public void setLength(final long newLength) throws IOException
{
throw new UnsupportedOperationException();
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java Mon Dec 3 13:37:12 2012
@@ -44,7 +44,7 @@ public abstract class AbstractVfsContain
// Initialise
if (component instanceof VfsComponent)
{
- VfsComponent vfsComponent = (VfsComponent) component;
+ final VfsComponent vfsComponent = (VfsComponent) component;
vfsComponent.setLogger(getLogger());
vfsComponent.setContext(getContext());
vfsComponent.init();
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/CompositeFileProvider.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/CompositeFileProvider.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/CompositeFileProvider.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/CompositeFileProvider.java Mon Dec 3 13:37:12 2012
@@ -51,18 +51,18 @@ public abstract class CompositeFileProvi
final FileSystemOptions fileSystemOptions)
throws FileSystemException
{
- StringBuilder buf = new StringBuilder(INITIAL_BUFSZ);
+ final StringBuilder buf = new StringBuilder(INITIAL_BUFSZ);
UriParser.extractScheme(uri, buf);
- String[] schemes = getSchemes();
- for (String scheme : schemes)
+ final String[] schemes = getSchemes();
+ for (final String scheme : schemes)
{
buf.insert(0, ":");
buf.insert(0, scheme);
}
- FileObject fo = getContext().getFileSystemManager().resolveFile(buf.toString(), fileSystemOptions);
+ final FileObject fo = getContext().getFileSystemManager().resolveFile(buf.toString(), fileSystemOptions);
return fo;
}
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java Mon Dec 3 13:37:12 2012
@@ -439,7 +439,7 @@ public final class DefaultFileContent im
// Get the content
final RandomAccessContent rastr = fileObject.getRandomAccessContent(mode);
- FileRandomAccessContent rac = new FileRandomAccessContent(fileObject, rastr);
+ final FileRandomAccessContent rac = new FileRandomAccessContent(fileObject, rastr);
this.getThreadData().addRastr(rac);
streamOpened();
@@ -465,7 +465,7 @@ public final class DefaultFileContent im
* @throws FileSystemException if an error occurs.
*/
@Override
- public OutputStream getOutputStream(boolean bAppend) throws FileSystemException
+ public OutputStream getOutputStream(final boolean bAppend) throws FileSystemException
{
/*
if (getThreadData().getState() != STATE_NONE)
@@ -511,7 +511,7 @@ public final class DefaultFileContent im
{
ra.close();
}
- catch (IOException e)
+ catch (final IOException e)
{
throw new FileSystemException(e);
}
@@ -547,7 +547,7 @@ public final class DefaultFileContent im
/**
* Handles the end of random access.
*/
- private void endRandomAccess(RandomAccessContent rac)
+ private void endRandomAccess(final RandomAccessContent rac)
{
getThreadData().removeRastr(rac);
streamClosed();
@@ -731,7 +731,7 @@ public final class DefaultFileContent im
{
endOutput();
}
- catch (Exception e)
+ catch (final Exception e)
{
throw new FileSystemException("vfs.provider/close-outstr.error", file, e);
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultURLConnection.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultURLConnection.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultURLConnection.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultURLConnection.java Mon Dec 3 13:37:12 2012
@@ -68,7 +68,7 @@ public final class DefaultURLConnection
{
return content.getLastModifiedTime();
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
// Ignore the exception
}
@@ -83,7 +83,7 @@ public final class DefaultURLConnection
{
return (int) content.getSize();
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
// Ignore the exception
}
@@ -98,7 +98,7 @@ public final class DefaultURLConnection
{
return content.getContentInfo().getContentType();
}
- catch (FileSystemException e)
+ catch (final FileSystemException e)
{
throw new RuntimeException(e.getMessage());
}
@@ -111,7 +111,7 @@ public final class DefaultURLConnection
{
return content.getContentInfo().getContentEncoding();
}
- catch (FileSystemException e)
+ catch (final FileSystemException e)
{
throw new RuntimeException(e.getMessage());
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultURLStreamHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultURLStreamHandler.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultURLStreamHandler.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultURLStreamHandler.java Mon Dec 3 13:37:12 2012
@@ -61,7 +61,7 @@ public class DefaultURLStreamHandler
{
try
{
- FileObject old = context.resolveFile(u.toExternalForm(), fileSystemOptions);
+ final FileObject old = context.resolveFile(u.toExternalForm(), fileSystemOptions);
FileObject newURL;
if (start > 0 && spec.charAt(start - 1) == ':')
@@ -87,7 +87,7 @@ public class DefaultURLStreamHandler
setURL(u, protocolPart, "", -1, null, null, filePart.toString(), null, null);
}
- catch (FileSystemException fse)
+ catch (final FileSystemException fse)
{
// This is rethrown to MalformedURLException in URL anyway
throw new RuntimeException(fse.getMessage());
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DelegateFileObject.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DelegateFileObject.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DelegateFileObject.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DelegateFileObject.java Mon Dec 3 13:37:12 2012
@@ -222,7 +222,7 @@ public class DelegateFileObject<AFS exte
children = file.getChildren();
}
// VFS-210
- catch (FileNotFolderException e)
+ catch (final FileNotFolderException e)
{
throw new FileNotFolderException(getName(), e);
}
@@ -348,7 +348,7 @@ public class DelegateFileObject<AFS exte
* Creates an output stream to write the file content to.
*/
@Override
- protected OutputStream doGetOutputStream(boolean bAppend) throws Exception
+ protected OutputStream doGetOutputStream(final boolean bAppend) throws Exception
{
return file.getContent().getOutputStream(bAppend);
}
@@ -397,7 +397,7 @@ public class DelegateFileObject<AFS exte
* @throws Exception if an error occurs.
*/
@Override
- public void fileChanged(FileChangeEvent event) throws Exception
+ public void fileChanged(final FileChangeEvent event) throws Exception
{
if (event.getFile() != file)
{
@@ -450,7 +450,7 @@ public class DelegateFileObject<AFS exte
* @since 2.0
*/
@Override
- protected void doRename(FileObject newFile)
+ protected void doRename(final FileObject newFile)
throws Exception
{
file.moveTo(((DelegateFileObject) newFile).file);
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/FileContentThreadData.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/FileContentThreadData.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/FileContentThreadData.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/FileContentThreadData.java Mon Dec 3 13:37:12 2012
@@ -49,12 +49,12 @@ class FileContentThreadData
}
*/
- void addInstr(InputStream is)
+ void addInstr(final InputStream is)
{
this.instrs.add(is);
}
- void setOutstr(DefaultFileContent.FileContentOutputStream os)
+ void setOutstr(final DefaultFileContent.FileContentOutputStream os)
{
this.outstr = os;
}
@@ -64,7 +64,7 @@ class FileContentThreadData
return this.outstr;
}
- void addRastr(RandomAccessContent ras)
+ void addRastr(final RandomAccessContent ras)
{
this.rastrs.add(ras);
}
@@ -74,22 +74,22 @@ class FileContentThreadData
return this.instrs.size();
}
- public Object removeInstr(int pos)
+ public Object removeInstr(final int pos)
{
return this.instrs.remove(pos);
}
- public void removeInstr(InputStream instr)
+ public void removeInstr(final InputStream instr)
{
this.instrs.remove(instr);
}
- public Object removeRastr(int pos)
+ public Object removeRastr(final int pos)
{
return this.rastrs.remove(pos);
}
- public void removeRastr(RandomAccessContent ras)
+ public void removeRastr(final RandomAccessContent ras)
{
this.rastrs.remove(ras);
}
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/FileSystemKey.java
URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/FileSystemKey.java?rev=1416507&r1=1416506&r2=1416507&view=diff
==============================================================================
--- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/FileSystemKey.java (original)
+++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/FileSystemKey.java Mon Dec 3 13:37:12 2012
@@ -48,11 +48,12 @@ class FileSystemKey implements Comparabl
}
@Override
- public int compareTo(FileSystemKey o)
+ public int compareTo(final FileSystemKey o)
{
@SuppressWarnings("unchecked") // Keys must implement comparable, and be comparable to themselves
+ final
Comparable<Comparable<?>> comparable = (Comparable<Comparable<?>>) key;
- int ret = comparable.compareTo(o.key);
+ final int ret = comparable.compareTo(o.key);
if (ret != 0)
{
// other filesystem