Author: ecki Date: Wed Dec 17 22:33:48 2014 New Revision: 1646351 URL: http://svn.apache.org/r1646351 Log: Style Police (make CheckStyle happy: line breaks, whitespace, imports, bracestyle)
Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfo.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfoFactory.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DecoratedFileObject.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/VFSClassLoader.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/DefaultFileContent.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileSystem.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FTPClientWrapper.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsDataChannelProtectionLevel.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystem.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsMode.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileProvider.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileSystem.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileAttributes.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileContentInfoFactory.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProvider.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsRandomAccessContent.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpClientFactory.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFile.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileName.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContent.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/IdentityInfo.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpStreamProxy.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileObject.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/PosixPermissions.java Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfo.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfo.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfo.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfo.java Wed Dec 17 22:33:48 2014 @@ -23,14 +23,14 @@ public interface FileContentInfo { /** * Gets the content encoding. - * + * * @return The file content encoding. */ String getContentEncoding(); /** * Gets the content type. - * + * * @return The file content type. */ String getContentType(); Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfoFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfoFactory.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfoFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileContentInfoFactory.java Wed Dec 17 22:33:48 2014 @@ -23,7 +23,7 @@ public interface FileContentInfoFactory { /** * Creates a FileContentInfo for a the given FileContent. - * + * * @param fileContent * Use this FileContent to create a matching FileContentInfo * @return a FileContentInfo for the given FileContent. Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileObject.java Wed Dec 17 22:33:48 2014 @@ -18,8 +18,6 @@ package org.apache.commons.vfs2; import java.io.Closeable; import java.net.URL; -import java.util.Arrays; -import java.util.Collections; import java.util.List; import org.apache.commons.vfs2.operations.FileOperations; @@ -74,7 +72,8 @@ import org.apache.commons.vfs2.operation * * <h2>Sorting Files</h2> * - * Files may be sorted using {@link Arrays#sort(Object[])} and {@link Collections#sort(List)}. + * Files may be sorted using {@link java.util.Arrays#sort(Object[]) Arrays.sort()} + * and {@link java.util.Collections#sort(List) Collections.sort()}. * * @see FileSystemManager * @see FileContent Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java Wed Dec 17 22:33:48 2014 @@ -227,7 +227,8 @@ public abstract class FileSystemConfigBu } /** @since 2.1 */ - protected <E extends Enum<E>> E getEnum(final Class<E> enumClass, final FileSystemOptions opts, final String name, final E defaultValue) + protected <E extends Enum<E>> E getEnum(final Class<E> enumClass, final FileSystemOptions opts, + final String name, final E defaultValue) { @SuppressWarnings("unchecked") E value = (E) getParam(opts, name); Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/FileSystemOptions.java Wed Dec 17 22:33:48 2014 @@ -28,7 +28,7 @@ import java.util.TreeMap; * To use the options, pass them to {@link FileSystemManager#resolveFile(String,FileSystemOptions)}. From there, the * options apply to all files that are resolved relative to that file. * </p> - * + * * @see org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder * @see org.apache.commons.vfs2.provider.ftp.FtpFileSystemConfigBuilder * @see org.apache.commons.vfs2.provider.ftps.FtpsFileSystemConfigBuilder Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/auth/StaticUserAuthenticator.java Wed Dec 17 22:33:48 2014 @@ -27,7 +27,7 @@ import org.apache.commons.vfs2.util.User */ public class StaticUserAuthenticator implements UserAuthenticator, Comparable<StaticUserAuthenticator> { - private final static Log LOG = LogFactory.getLog(StaticUserAuthenticator.class); + private static final Log LOG = LogFactory.getLog(StaticUserAuthenticator.class); /** The user name */ private final String username; @@ -49,7 +49,7 @@ public class StaticUserAuthenticator imp public UserAuthenticationData requestAuthentication(final UserAuthenticationData.Type[] types) { final UserAuthenticationData data = new UserAuthenticationData(); - for(final UserAuthenticationData.Type type : types) + for (final UserAuthenticationData.Type type : types) { if (type == UserAuthenticationData.DOMAIN) { Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DecoratedFileObject.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DecoratedFileObject.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DecoratedFileObject.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/impl/DecoratedFileObject.java Wed Dec 17 22:33:48 2014 @@ -152,7 +152,8 @@ public class DecoratedFileObject impleme } @Override - public String getPublicURIString() { + public String getPublicURIString() + { return decoratedFileObject.getPublicURIString(); } 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=1646351&r1=1646350&r2=1646351&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 Wed Dec 17 22:33:48 2014 @@ -609,7 +609,7 @@ public class DefaultFileSystemManager im // should not happen, but make debugging easier: if (!components.isEmpty()) { - log.warn("DefaultFilesystemManager.close: not all components are closed: " + components.toString()); + log.warn("DefaultFilesystemManager.close: not all components are closed: " + components.toString()); } components.clear(); 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=1646351&r1=1646350&r2=1646351&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 Wed Dec 17 22:33:48 2014 @@ -382,12 +382,15 @@ public class VFSClassLoader extends Secu * @throws FileSystemException */ @Override - protected Enumeration<URL> findResources(final String name) throws IOException { + protected Enumeration<URL> findResources(final String name) throws IOException + { final List<URL> result = new ArrayList<URL>(2); - for (FileObject baseFile : resources) { + for (FileObject baseFile : resources) + { final FileObject file = baseFile.resolveFile(name, NameScope.DESCENDENT_OR_SELF); - if (file.exists()) { + if (file.exists()) + { result.add(new Resource(name, baseFile, file).getURL()); } } 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=1646351&r1=1646350&r2=1646351&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 Dec 17 22:33:48 2014 @@ -72,6 +72,41 @@ public abstract class AbstractFileObject private static final int INITIAL_LIST_SIZE = 5; + private final AbstractFileName fileName; + private final AFS fs; + + private FileContent content; + // Cached info + private boolean attached; + private FileType type; + + private FileObject parent; + // Changed to hold only the name of the children and let the object + // go into the global files cache + // private FileObject[] children; + private FileName[] children; + + private List<Object> objects; + + /** + * FileServices instance. + */ + private FileOperations operations; + + /** + * + * @param name the file name - muse be an instance of {@link AbstractFileName} + * @param fs the file system + * @throws ClassCastException if {@code name} is not an instance of {@link AbstractFileName} + */ + protected AbstractFileObject(final AbstractFileName name, + final AFS fs) + { + this.fileName = name; + this.fs = fs; + fs.fileObjectHanded(this); + } + /** * Traverses a file. */ @@ -118,41 +153,6 @@ public abstract class AbstractFileObject } } } - private final AbstractFileName fileName; - - private final AFS fs; - - private FileContent content; - // Cached info - private boolean attached; - private FileType type; - - private FileObject parent; - // Changed to hold only the name of the children and let the object - // go into the global files cache - // private FileObject[] children; - private FileName[] children; - - private List<Object> objects; - - /** - * FileServices instance. - */ - private FileOperations operations; - - /** - * - * @param name the file name - muse be an instance of {@link AbstractFileName} - * @param fs the file system - * @throws ClassCastException if {@code name} is not an instance of {@link AbstractFileName} - */ - protected AbstractFileObject(final AbstractFileName name, - final AFS fs) - { - this.fileName = name; - this.fs = fs; - fs.fileObjectHanded(this); - } /** * Attaches to the file. 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=1646351&r1=1646350&r2=1646351&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 Wed Dec 17 22:33:48 2014 @@ -16,14 +16,13 @@ */ package org.apache.commons.vfs2.provider; -import java.io.DataOutput; import java.io.IOException; import org.apache.commons.vfs2.RandomAccessContent; import org.apache.commons.vfs2.util.RandomAccessMode; /** - * Implements the {@link DataOutput} part of the {@link RandomAccessContent} interface and throws + * Implements the {@link java.io.DataOutput} part of the {@link RandomAccessContent} interface and throws * {@link UnsupportedOperationException} when one of these methods are called. For read-only random access * implementations. */ 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=1646351&r1=1646350&r2=1646351&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 Wed Dec 17 22:33:48 2014 @@ -624,9 +624,11 @@ public final class DefaultFileContent im if (streams != null && streams.hasStreams()) { return true; - } else { + } + else + { // threadData.get() created empty entry - threadData.remove(); + threadData.remove(); return false; } } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileSystem.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileSystem.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileSystem.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/bzip2/Bzip2FileSystem.java Wed Dec 17 22:33:48 2014 @@ -31,7 +31,8 @@ import org.apache.commons.vfs2.provider. */ public class Bzip2FileSystem extends CompressedFileFileSystem { - protected Bzip2FileSystem(final FileName rootName, final FileObject parentLayer, final FileSystemOptions fileSystemOptions) + protected Bzip2FileSystem(final FileName rootName, final FileObject parentLayer, + final FileSystemOptions fileSystemOptions) { super(rootName, parentLayer, fileSystemOptions); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/compressed/CompressedFileFileObject.java Wed Dec 17 22:33:48 2014 @@ -50,7 +50,7 @@ public abstract class CompressedFileFile { basename = basename.substring(0, pos); } - children = new String[]{ basename }; + children = new String[]{basename}; } /** Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FTPClientWrapper.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FTPClientWrapper.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FTPClientWrapper.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FTPClientWrapper.java Wed Dec 17 22:33:48 2014 @@ -37,11 +37,12 @@ import org.apache.commons.vfs2.util.User */ public class FTPClientWrapper implements FtpClient { - private final GenericFileName root; protected final FileSystemOptions fileSystemOptions; + private final GenericFileName root; private FTPClient ftpClient; - protected FTPClientWrapper(final GenericFileName root, final FileSystemOptions fileSystemOptions) throws FileSystemException + protected FTPClientWrapper(final GenericFileName root, final FileSystemOptions fileSystemOptions) + throws FileSystemException { this.root = root; this.fileSystemOptions = fileSystemOptions; Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java Wed Dec 17 22:33:48 2014 @@ -54,7 +54,8 @@ public final class FtpClientFactory * @return An FTPClient. * @throws FileSystemException if an error occurs while connecting. */ - public static FTPClient createConnection(final String hostname, final int port, final char[] username, final char[] password, + public static FTPClient createConnection(final String hostname, final int port, + final char[] username, final char[] password, final String workingDirectory, final FileSystemOptions fileSystemOptions) throws FileSystemException { @@ -62,7 +63,8 @@ public final class FtpClientFactory return factory.createConnection(hostname, port, username, password, workingDirectory, fileSystemOptions); } - public static class FtpConnectionFactory extends ConnectionFactory<FTPClient, FtpFileSystemConfigBuilder> { + public static class FtpConnectionFactory extends ConnectionFactory<FTPClient, FtpFileSystemConfigBuilder> + { private FtpConnectionFactory(final FtpFileSystemConfigBuilder builder) { super(builder); @@ -81,7 +83,8 @@ public final class FtpClientFactory } } - public static abstract class ConnectionFactory<C extends FTPClient, B extends FtpFileSystemConfigBuilder> { + public abstract static class ConnectionFactory<C extends FTPClient, B extends FtpFileSystemConfigBuilder> + { private static final char[] ANON_CHAR_ARRAY = "anonymous".toCharArray(); private static final int BUFSZ = 40; @@ -111,14 +114,17 @@ public final class FtpClientFactory { final C client = createClient(fileSystemOptions); - if (log.isDebugEnabled()) { - final Writer writer = new StringWriter(1024){ + if (log.isDebugEnabled()) + { + final Writer writer = new StringWriter(1024) + { @Override public void flush() { final StringBuffer buffer = getBuffer(); String message = buffer.toString(); - if (message.toUpperCase().startsWith("PASS ") && message.length() > 5) { + if (message.toUpperCase().startsWith("PASS ") && message.length() > 5) + { message = "PASS ***"; } log.debug(message); @@ -138,10 +144,11 @@ public final class FtpClientFactory } Boolean remoteVerification = builder.getRemoteVerification(fileSystemOptions); - if (remoteVerification != null) { + if (remoteVerification != null) + { client.setRemoteVerificationEnabled(remoteVerification.booleanValue()); - } - + } + try { // Set connect timeout @@ -213,7 +220,8 @@ public final class FtpClientFactory { if (!client.changeWorkingDirectory(workingDirectory)) { - throw new FileSystemException("vfs.provider.ftp/change-work-directory.error", workingDirectory); + throw new FileSystemException("vfs.provider.ftp/change-work-directory.error", + workingDirectory); } } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftp/FtpFileSystemConfigBuilder.java Wed Dec 17 22:33:48 2014 @@ -46,7 +46,18 @@ public class FtpFileSystemConfigBuilder private static final String SERVER_TIME_ZONE_ID = _PREFIX + ".SERVER_TIME_ZONE_ID"; private static final String SHORT_MONTH_NAMES = _PREFIX + ".SHORT_MONTH_NAMES"; private static final String SO_TIMEOUT = _PREFIX + ".SO_TIMEOUT"; - private static final String USER_DIR_IS_ROOT = _PREFIX + ".USER_DIR_IS_ROOT"; + private static final String USER_DIR_IS_ROOT = _PREFIX + ".USER_DIR_IS_ROOT"; + + private FtpFileSystemConfigBuilder() + { + super("ftp."); + } + + /** @since 2.1 */ + protected FtpFileSystemConfigBuilder(final String prefix) + { + super(prefix); + } /** * Gets the singleton instance. @@ -58,16 +69,6 @@ public class FtpFileSystemConfigBuilder return BUILDER; } - private FtpFileSystemConfigBuilder() - { - super("ftp."); - } - - /** @since 2.1 */ - protected FtpFileSystemConfigBuilder(final String prefix) { - super(prefix); - } - @Override protected Class<? extends FileSystem> getConfigClass() { @@ -185,7 +186,7 @@ public class FtpFileSystemConfigBuilder /** * Gets whether to use remote verification. - * + * * @param opts */ public Boolean getRemoteVerification(FileSystemOptions opts) @@ -381,7 +382,7 @@ public class FtpFileSystemConfigBuilder } /** - * Sets whether to use remote verification. + * Sets whether to use remote verification. * * @param opts * @param remoteVerification Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsClientFactory.java Wed Dec 17 22:33:48 2014 @@ -50,14 +50,18 @@ public final class FtpsClientFactory * @return The FTPSClient. * @throws FileSystemException if an error occurs. */ - public static FTPSClient createConnection(final String hostname, final int port, final char[] username, final char[] password, - final String workingDirectory, final FileSystemOptions fileSystemOptions) throws FileSystemException + public static FTPSClient createConnection(final String hostname, final int port, final char[] username, + final char[] password, final String workingDirectory, + final FileSystemOptions fileSystemOptions) + throws FileSystemException { final FtpsConnectionFactory factory = new FtpsConnectionFactory(FtpsFileSystemConfigBuilder.getInstance()); return factory.createConnection(hostname, port, username, password, workingDirectory, fileSystemOptions); } - private static final class FtpsConnectionFactory extends FtpClientFactory.ConnectionFactory<FTPSClient, FtpsFileSystemConfigBuilder> { + private static final class FtpsConnectionFactory + extends FtpClientFactory.ConnectionFactory<FTPSClient, FtpsFileSystemConfigBuilder> + { private FtpsConnectionFactory(final FtpsFileSystemConfigBuilder builder) { @@ -96,12 +100,16 @@ public final class FtpsClientFactory throws IOException { final FtpsDataChannelProtectionLevel level = builder.getDataChannelProtectionLevel(fileSystemOptions); - if (level != null) { + if (level != null) + { // '0' means streaming, that's what we do! - try { + try + { client.execPBSZ(0); client.execPROT(level.name()); - } catch (final SSLException e) { + } + catch (final SSLException e) + { throw new FileSystemException("vfs.provider.ftps/data-channel.level", e, level.toString()); } } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsDataChannelProtectionLevel.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsDataChannelProtectionLevel.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsDataChannelProtectionLevel.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsDataChannelProtectionLevel.java Wed Dec 17 22:33:48 2014 @@ -22,6 +22,7 @@ package org.apache.commons.vfs2.provider * @see <a href="http://tools.ietf.org/html/rfc2228#section-3">RFC 2228, section 3</a> * @since 2.1 */ -public enum FtpsDataChannelProtectionLevel { +public enum FtpsDataChannelProtectionLevel +{ C, S, E, P } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystem.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystem.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystem.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystem.java Wed Dec 17 22:33:48 2014 @@ -25,14 +25,14 @@ import org.apache.commons.vfs2.provider. /** * A FTPS file system. - * + * * @since 2.1 */ public class FtpsFileSystem extends FtpFileSystem { /** * Create a new FtpsFileSystem. - * + * * @param rootName The root of the file system. * @param ftpClient The FtpClient. * @param fileSystemOptions The FileSystemOptions. Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsFileSystemConfigBuilder.java Wed Dec 17 22:33:48 2014 @@ -60,7 +60,7 @@ public final class FtpsFileSystemConfigB * <p>Note, that implicit mode is not standardized and considered as deprecated. Some unit tests for VFS fail with * implicit mode and it is not yet clear if its a problem with Commons VFS/Commons Net or our test server Apache * FTP/SSHD.</p> - * + * * @param opts The FileSystemOptions. * @param ftpsMode The mode to establish a FTPS connection. * @see <a href="http://en.wikipedia.org/wiki/FTPS#Implicit">Wikipedia: FTPS/Implicit</a> @@ -157,7 +157,7 @@ public final class FtpsFileSystemConfigB /** * Gets the KeyManager used to provide a client-side certificate if the FTPS server requests it. - * + * * @param opts The FileSystemOptions. * @return the key manager instance or {@code null} * @see org.apache.commons.net.ftp.FTPSClient#setKeyManager(KeyManager) @@ -170,7 +170,7 @@ public final class FtpsFileSystemConfigB /** * Sets the KeyManager used to provide a client-side certificate if the FTPS server requests it. - * + * * @param opts The FileSystemOptions. * @param keyManager The key manager instance. * @see org.apache.commons.net.ftp.FTPSClient#setKeyManager(KeyManager) @@ -187,7 +187,7 @@ public final class FtpsFileSystemConfigB * If the params do not contain the key for the trust manager, it will return a trust manger that simply checks this * certificate for validity. * </p> - * + * * @param opts The FileSystemOptions. * @return the trust manager instance or {@code null} * @see org.apache.commons.net.ftp.FTPSClient#setTrustManager(TrustManager) @@ -199,7 +199,8 @@ public final class FtpsFileSystemConfigB if (hasParam(opts, TRUST_MANAGER)) { trustManager = (TrustManager)getParam(opts, TRUST_MANAGER); - } else + } + else { trustManager = TrustManagerUtils.getValidateServerCertificateTrustManager(); } @@ -208,7 +209,7 @@ public final class FtpsFileSystemConfigB /** * Sets the TrustManager that validates the FTPS server's certificate. - * + * * @param opts The FileSystemOptions. * @param trustManager The trust manager instance. * @see org.apache.commons.net.ftp.FTPSClient#setTrustManager(TrustManager) Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsMode.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsMode.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsMode.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ftps/FtpsMode.java Wed Dec 17 22:33:48 2014 @@ -22,7 +22,7 @@ package org.apache.commons.vfs2.provider * <p>Note, that 'implicit' mode is not standardized and considered as deprecated. Some unit tests for VFS fail with * 'implicit' mode and it is not yet clear if its a problem with Commons VFS/Commons Net or our test server Apache * FTP/SSHD.</p> - * + * * @see <a href="http://en.wikipedia.org/wiki/FTPS#Implicit">Wikipedia: FTPS/Implicit</a> * @since 2.1 */ Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileProvider.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileProvider.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileProvider.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileProvider.java Wed Dec 17 22:33:48 2014 @@ -54,7 +54,8 @@ public class GzipFileProvider extends Co } @Override - protected FileSystem createFileSystem(final FileName name, final FileObject file, final FileSystemOptions fileSystemOptions) + protected FileSystem createFileSystem(final FileName name, final FileObject file, + final FileSystemOptions fileSystemOptions) throws FileSystemException { return new GzipFileSystem(name, file, fileSystemOptions); Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileSystem.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileSystem.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileSystem.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/gzip/GzipFileSystem.java Wed Dec 17 22:33:48 2014 @@ -31,7 +31,8 @@ import org.apache.commons.vfs2.provider. */ public class GzipFileSystem extends CompressedFileFileSystem { - protected GzipFileSystem(final FileName rootName, final FileObject parentLayer, final FileSystemOptions fileSystemOptions) + protected GzipFileSystem(final FileName rootName, final FileObject parentLayer, + final FileSystemOptions fileSystemOptions) { super(rootName, parentLayer, fileSystemOptions); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileAttributes.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileAttributes.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileAttributes.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileAttributes.java Wed Dec 17 22:33:48 2014 @@ -18,7 +18,7 @@ package org.apache.commons.vfs2.provider /** * HDFS file content attributes. - * + * * @since 2.1 */ public enum HdfsFileAttributes Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileContentInfoFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileContentInfoFactory.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileContentInfoFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileContentInfoFactory.java Wed Dec 17 22:33:48 2014 @@ -24,7 +24,7 @@ import org.apache.commons.vfs2.impl.Defa /** * Creates FileContentInfo instances for HDFS. - * + * * @since 2.1 */ public class HdfsFileContentInfoFactory implements FileContentInfoFactory @@ -34,7 +34,7 @@ public class HdfsFileContentInfoFactory /** * Creates a FileContentInfo for a the given FileContent. - * + * * @param fileContent * Use this FileContent to create a matching FileContentInfo * @return a FileContentInfo for the given FileContent with content set to "text/plain" and encoding set to "UTF-8" Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProvider.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProvider.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProvider.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileProvider.java Wed Dec 17 22:33:48 2014 @@ -31,7 +31,7 @@ import org.apache.commons.vfs2.provider. /** * FileProvider for HDFS files. - * + * * @since 2.1 */ public class HdfsFileProvider extends AbstractOriginatingFileProvider @@ -49,7 +49,7 @@ public class HdfsFileProvider extends Ab Capability.LIST_CHILDREN })); /** - * Constructs a new HdfsFileProvider + * Constructs a new HdfsFileProvider. */ public HdfsFileProvider() { @@ -58,8 +58,7 @@ public class HdfsFileProvider extends Ab } /** - * @see org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider#doCreateFileSystem(org.apache.commons.vfs2.FileName, - * org.apache.commons.vfs2.FileSystemOptions) + * @see AbstractOriginatingFileProvider#doCreateFileSystem(org.apache.commons.vfs2.FileName, FileSystemOptions) */ @Override protected FileSystem doCreateFileSystem(final FileName rootName, final FileSystemOptions fileSystemOptions) Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystem.java Wed Dec 17 22:33:48 2014 @@ -37,7 +37,7 @@ import org.apache.hadoop.fs.Path; /** * A VFS FileSystem that interacts with HDFS. - * + * * @since 2.1 */ public class HdfsFileSystem extends AbstractFileSystem @@ -47,7 +47,7 @@ public class HdfsFileSystem extends Abst private FileSystem fs; /** - * + * Construct file system. * @param rootName * @param fileSystemOptions */ @@ -86,7 +86,7 @@ public class HdfsFileSystem extends Abst } /** - * @see org.apache.commons.vfs2.provider.AbstractFileSystem#createFile(org.apache.commons.vfs2.provider.AbstractFileName) + * @see org.apache.commons.vfs2.provider.AbstractFileSystem#createFile(AbstractFileName) */ @Override protected FileObject createFile(final AbstractFileName name) throws Exception Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java Wed Dec 17 22:33:48 2014 @@ -21,7 +21,7 @@ import org.apache.commons.vfs2.FileSyste /** * Configuration settings for the HdfsFileSystem. - * + * * @since 2.1 */ public class HdfsFileSystemConfigBuilder extends FileSystemConfigBuilder Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsRandomAccessContent.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsRandomAccessContent.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsRandomAccessContent.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsRandomAccessContent.java Wed Dec 17 22:33:48 2014 @@ -28,7 +28,7 @@ import org.apache.hadoop.fs.Path; /** * Provides random access to content in an HdfsFileObject. Currently this only supports read operations. All write * operations throw an {@link UnsupportedOperationException}. - * + * * @since 2.1 */ public class HdfsRandomAccessContent extends AbstractRandomAccessContent @@ -38,13 +38,11 @@ public class HdfsRandomAccessContent ext private final Path path; /** - * - * @param path - * A Hadoop Path - * @param fs - * A Hadoop FileSystem - * @throws IOException - * when the path cannot be processed. + * Create random access content. + * + * @param path A Hadoop Path + * @param fs A Hadoop FileSystem + * @throws IOException when the path cannot be processed. */ public HdfsRandomAccessContent(final Path path, final FileSystem fs) throws IOException { Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpClientFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpClientFactory.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpClientFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpClientFactory.java Wed Dec 17 22:33:48 2014 @@ -41,8 +41,9 @@ public final class HttpClientFactory { } - public static HttpClient createConnection(final String scheme, final String hostname, final int port, final String username, - final String password, final FileSystemOptions fileSystemOptions) + public static HttpClient createConnection(final String scheme, final String hostname, final int port, + final String username, final String password, + final FileSystemOptions fileSystemOptions) throws FileSystemException { return createConnection(HttpFileSystemConfigBuilder.getInstance(), scheme, hostname, port, Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileObject.java Wed Dec 17 22:33:48 2014 @@ -82,7 +82,8 @@ public class HttpFileObject<FS extends H this(name, fileSystem, HttpFileSystemConfigBuilder.getInstance()); } - protected HttpFileObject(final AbstractFileName name, final FS fileSystem, final HttpFileSystemConfigBuilder builder) + protected HttpFileObject(final AbstractFileName name, final FS fileSystem, + final HttpFileSystemConfigBuilder builder) { super(name, fileSystem); final FileSystemOptions fileSystemOptions = fileSystem.getFileSystemOptions(); Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileSystemConfigBuilder.java Wed Dec 17 22:33:48 2014 @@ -35,7 +35,7 @@ public class HttpFileSystemConfigBuilder private static final int DEFAULT_MAX_HOST_CONNECTIONS = 5; private static final int DEFAULT_MAX_CONNECTIONS = 50; - + private static final int DEFAULT_CONNECTION_TIMEOUT = 0; private static final int DEFAULT_SO_TIMEOUT = 0; @@ -277,10 +277,10 @@ public class HttpFileSystemConfigBuilder { setParam(opts, KEY_PREEMPTIVE_AUTHENTICATION, Boolean.valueOf(preemptiveAuth)); } - + /** * The connection timeout. - * + * * @param opts The FileSystem options. * @param connectionTimeout The connection timeout. * @since 2.1 @@ -292,7 +292,7 @@ public class HttpFileSystemConfigBuilder /** * Retrieve the connection timeout. - * + * * @param opts The FileSystem options. * @return The connection timeout. * @since 2.1 @@ -304,7 +304,7 @@ public class HttpFileSystemConfigBuilder /** * The socket timeout. - * + * * @param opts The FileSystem options. * @param soTimeout socket timeout. * @since 2.1 @@ -316,7 +316,7 @@ public class HttpFileSystemConfigBuilder /** * Retrieve the socket timeout. - * + * * @param opts The FileSystemOptions. * @return The socket timeout. * @since 2.1 Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java Wed Dec 17 22:33:48 2014 @@ -64,7 +64,8 @@ public class GenericFileNameParser * so its of no value for the LocalFileName instance */ @Override - protected FileName createFileName(final String scheme, final String rootFile, final String path, final FileType type) + protected FileName createFileName(final String scheme, final String rootFile, + final String path, final FileType type) { return new LocalFileName(scheme, "", path, type); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFile.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFile.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFile.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFile.java Wed Dec 17 22:33:48 2014 @@ -55,7 +55,7 @@ public class LocalFile extends AbstractF /** * Returns the local file that this file object represents. - * + * * @return the local file that this file object represents. */ protected File getLocalFile() Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileName.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileName.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileName.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileName.java Wed Dec 17 22:33:48 2014 @@ -39,7 +39,7 @@ public class LocalFileName extends Abstr // Since : and / occur before the path, only chars after path are escaped (i.e., # and ?) // ? is a reserved filesystem character for Windows and Unix, so can't be part of a filename. // Therefore only # is a reserved char in a URI as part of the path that can be in the filename. - private static final char RESERVED_URI_CHARS[] = {'#'}; + private static final char[] RESERVED_URI_CHARS = {'#'}; private final String rootFile; Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContent.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContent.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContent.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileRandomAccessContent.java Wed Dec 17 22:33:48 2014 @@ -24,14 +24,11 @@ import java.io.InputStream; import java.io.RandomAccessFile; import org.apache.commons.vfs2.FileSystemException; -import org.apache.commons.vfs2.RandomAccessContent; import org.apache.commons.vfs2.provider.AbstractRandomAccessContent; import org.apache.commons.vfs2.util.RandomAccessMode; /** - * Implements {@link RandomAccessContent} for local files. - * - * @version $Id$ + * Implements {@link org.apache.commons.vfs2.RandomAccessContent RandomAccessContent} for local files. */ class LocalFileRandomAccessContent extends AbstractRandomAccessContent { Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java Wed Dec 17 22:33:48 2014 @@ -37,7 +37,8 @@ public class WindowsFileNameParser exten } @Override - protected FileName createFileName(final String scheme, final String rootFile, final String path, final FileType type) + protected FileName createFileName(final String scheme, final String rootFile, + final String path, final FileType type) { return new WindowsFileName(scheme, rootFile, path, type); } Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/ram/RamFileSystemConfigBuilder.java Wed Dec 17 22:33:48 2014 @@ -60,8 +60,8 @@ public final class RamFileSystemConfigBu } /** - * Defaults to {@link Integer#MAX_VALUE} - * + * Defaults to {@link Integer#MAX_VALUE}. + * * @param opts The FileSystem options. * @return The maximum size of the file. * @see #setMaxSize(FileSystemOptions, long) @@ -73,8 +73,8 @@ public final class RamFileSystemConfigBu } /** - * Defaults to {@link Integer#MAX_VALUE} - * + * Defaults to {@link Integer#MAX_VALUE}. + * * @param opts The FileSystem options. * @return The maximum size of the file. The next major version will change the return type to a long. * @see #setMaxSize(FileSystemOptions, int) Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/IdentityInfo.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/IdentityInfo.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/IdentityInfo.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/IdentityInfo.java Wed Dec 17 22:33:48 2014 @@ -21,7 +21,7 @@ import java.io.File; /** * Structure for an identity. - * + * * @since 2.1 */ public class IdentityInfo @@ -32,14 +32,11 @@ public class IdentityInfo /** * Constructs an identity info with private key. - * * <p> * The key is not passphrase protected. - * </p> * <p> * We use java.io.File because JSch cannot deal with VFS FileObjects. - * </p> - * + * * @param privateKey The file with the private key * @since 2.1 */ @@ -50,11 +47,9 @@ public class IdentityInfo /** * Constructs an identity info with private key and its passphrase. - * * <p> * We use java.io.File because JSch cannot deal with VFS FileObjects. - * </p> - * + * * @param privateKey The file with the private key * @param passPhrase The passphrase to decrypt the private key (can be {@code null} if no passphrase is used) * @since 2.1 @@ -66,11 +61,9 @@ public class IdentityInfo /** * Constructs an identity info with private and public key and passphrase for the private key. - * * <p> * We use java.io.File because JSch cannot deal with VFS FileObjects. - * </p> - * + * * @param privateKey The file with the private key * @param publicKey The public key part used for connections with exchange of certificates (can be {@code null}) * @param passPhrase The passphrase to decrypt the private key (can be {@code null} if no passphrase is used) @@ -85,7 +78,7 @@ public class IdentityInfo /** * Get the file with the private key. - * + * * @return the file * @since 2.1 */ @@ -96,7 +89,7 @@ public class IdentityInfo /** * Get the file with the public key. - * + * * @return the file * @since 2.1 */ @@ -107,7 +100,7 @@ public class IdentityInfo /** * Get the passphrase of the private key. - * + * * @return the passphrase * @since 2.1 */ Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpClientFactory.java Wed Dec 17 22:33:48 2014 @@ -63,8 +63,9 @@ public final class SftpClientFactory * @return A Session. * @throws FileSystemException if an error occurs. */ - public static Session createConnection(final String hostname, final int port, final char[] username, final char[] password, - final FileSystemOptions fileSystemOptions) throws FileSystemException + public static Session createConnection(final String hostname, final int port, final char[] username, + final char[] password, final FileSystemOptions fileSystemOptions) + throws FileSystemException { final JSch jsch = new JSch(); @@ -172,7 +173,8 @@ public final class SftpClientFactory return session; } - private static void addIdentities(final JSch jsch, final File sshDir, final IdentityInfo[] identities) throws FileSystemException + private static void addIdentities(final JSch jsch, final File sshDir, final IdentityInfo[] identities) + throws FileSystemException { if (identities != null) { @@ -192,7 +194,8 @@ public final class SftpClientFactory } } - private static void addIndentity(final JSch jsch, final IdentityInfo info) throws FileSystemException + private static void addIndentity(final JSch jsch, final IdentityInfo info) + throws FileSystemException { try { @@ -206,7 +209,8 @@ public final class SftpClientFactory } } - private static void setKnownHosts(final JSch jsch, final File sshDir, File knownHostsFile) throws FileSystemException + private static void setKnownHosts(final JSch jsch, final File sshDir, File knownHostsFile) + throws FileSystemException { try { @@ -231,8 +235,9 @@ public final class SftpClientFactory } - private static Proxy createStreamProxy(final String proxyHost, final int proxyPort, final FileSystemOptions fileSystemOptions, - final SftpFileSystemConfigBuilder builder) + private static Proxy createStreamProxy(final String proxyHost, final int proxyPort, + final FileSystemOptions fileSystemOptions, + final SftpFileSystemConfigBuilder builder) { Proxy proxy; // Use a stream proxy, i.e. it will use a remote host as a proxy Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java Wed Dec 17 22:33:48 2014 @@ -130,14 +130,18 @@ public class SftpFileSystem final String fileNameEncoding = SftpFileSystemConfigBuilder.getInstance().getFileNameEncoding( getFileSystemOptions()); - if (fileNameEncoding != null) { - try { + if (fileNameEncoding != null) + { + try + { channel.setFilenameEncoding(fileNameEncoding); - } catch (final SftpException e) { + } + catch (final SftpException e) + { throw new FileSystemException("vfs.provider.sftp/filename-encoding.error", fileNameEncoding); } } - return channel; + return channel; } catch (final JSchException e) { Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java Wed Dec 17 22:33:48 2014 @@ -87,19 +87,6 @@ public final class SftpFileSystemConfigB } } - private static final String _PREFIX = SftpFileSystemConfigBuilder.class.getName(); - - private static final SftpFileSystemConfigBuilder BUILDER = new SftpFileSystemConfigBuilder(); - - private static final String COMPRESSION = _PREFIX + "COMPRESSION"; - private static final String HOST_KEY_CHECK_ASK = "ask"; - private static final String HOST_KEY_CHECK_NO = "no"; - private static final String HOST_KEY_CHECK_YES = "yes"; - private static final String IDENTITIES = _PREFIX + ".IDENTITIES"; - private static final String IDENTITY_REPOSITORY_FACTORY = _PREFIX + "IDENTITY_REPOSITORY_FACTORY"; - private static final String KNOWN_HOSTS = _PREFIX + ".KNOWN_HOSTS"; - private static final String PREFERRED_AUTHENTICATIONS = _PREFIX + ".PREFERRED_AUTHENTICATIONS"; - /** HTTP Proxy. */ public static final ProxyType PROXY_HTTP = new ProxyType("http"); @@ -122,6 +109,17 @@ public final class SftpFileSystemConfigB */ public static final ProxyType PROXY_STREAM = new ProxyType("stream"); + private static final String _PREFIX = SftpFileSystemConfigBuilder.class.getName(); + private static final SftpFileSystemConfigBuilder BUILDER = new SftpFileSystemConfigBuilder(); + private static final String COMPRESSION = _PREFIX + "COMPRESSION"; + private static final String HOST_KEY_CHECK_ASK = "ask"; + private static final String HOST_KEY_CHECK_NO = "no"; + private static final String HOST_KEY_CHECK_YES = "yes"; + private static final String IDENTITIES = _PREFIX + ".IDENTITIES"; + private static final String IDENTITY_REPOSITORY_FACTORY = _PREFIX + "IDENTITY_REPOSITORY_FACTORY"; + private static final String KNOWN_HOSTS = _PREFIX + ".KNOWN_HOSTS"; + private static final String PREFERRED_AUTHENTICATIONS = _PREFIX + ".PREFERRED_AUTHENTICATIONS"; + private static final String PROXY_HOST = _PREFIX + ".PROXY_HOST"; private static final String PROXY_USER = _PREFIX + ".PROXY_USER"; private static final String PROXY_OPTIONS = _PREFIX + ".PROXY_OPTIONS"; @@ -135,6 +133,11 @@ public final class SftpFileSystemConfigB private static final String USER_DIR_IS_ROOT = _PREFIX + ".USER_DIR_IS_ROOT"; private static final String ENCODING = _PREFIX + ".ENCODING"; + private SftpFileSystemConfigBuilder() + { + super("sftp."); + } + /** * Gets the singleton builder. * @@ -145,11 +148,6 @@ public final class SftpFileSystemConfigB return BUILDER; } - private SftpFileSystemConfigBuilder() - { - super("sftp."); - } - /** * @param opts * The FileSystem options. @@ -241,7 +239,6 @@ public final class SftpFileSystemConfigB return (File) this.getParam(opts, KNOWN_HOSTS); } - /** * Gets authentication order. * @@ -448,7 +445,8 @@ public final class SftpFileSystemConfigB * @deprecated As of 2.1 use {@link #setIdentityInfo(FileSystemOptions, IdentityInfo...)} */ @Deprecated - public void setIdentities(final FileSystemOptions opts, final File... identityFiles) throws FileSystemException + public void setIdentities(final FileSystemOptions opts, final File... identityFiles) + throws FileSystemException { IdentityInfo[] info = null; if (identityFiles != null) @@ -473,7 +471,8 @@ public final class SftpFileSystemConfigB * if an error occurs. * @since 2.1 */ - public void setIdentityInfo(final FileSystemOptions opts, final IdentityInfo... identites) throws FileSystemException + public void setIdentityInfo(final FileSystemOptions opts, final IdentityInfo... identites) + throws FileSystemException { this.setParam(opts, IDENTITIES, identites); } @@ -559,7 +558,6 @@ public final class SftpFileSystemConfigB this.setParam(opts, PROXY_HOST, proxyHost); } - /** * Sets the proxy username to use for the SFTP connection. * @@ -575,8 +573,6 @@ public final class SftpFileSystemConfigB this.setParam(opts, PROXY_OPTIONS, proxyOptions); } - - /** * Sets the proxy password to use for the SFTP connection. * @@ -663,8 +659,8 @@ public final class SftpFileSystemConfigB throws FileSystemException { if (hostKeyChecking == null - || (!hostKeyChecking.equals(HOST_KEY_CHECK_ASK) && !hostKeyChecking.equals(HOST_KEY_CHECK_NO) && !hostKeyChecking - .equals(HOST_KEY_CHECK_YES))) + || (!hostKeyChecking.equals(HOST_KEY_CHECK_ASK) && !hostKeyChecking.equals(HOST_KEY_CHECK_NO) && + !hostKeyChecking.equals(HOST_KEY_CHECK_YES))) { throw new FileSystemException("vfs.provider.sftp/StrictHostKeyChecking-arg.error", hostKeyChecking); } @@ -685,7 +681,6 @@ public final class SftpFileSystemConfigB this.setParam(opts, TIMEOUT, timeout); } - /** * Sets the whether to use the user directory as root (do not change to file system root). * Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpStreamProxy.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpStreamProxy.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpStreamProxy.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpStreamProxy.java Wed Dec 17 22:33:48 2014 @@ -43,12 +43,12 @@ public class SftpStreamProxy implements /** * Command format using bash built-in TCP stream. */ - public final static String BASH_TCP_COMMAND = "/bin/bash -c 'exec 3<>/dev/tcp/%s/%d; cat <&3 & cat >&3; kill $!"; + public static final String BASH_TCP_COMMAND = "/bin/bash -c 'exec 3<>/dev/tcp/%s/%d; cat <&3 & cat >&3; kill $!"; /** * Command format using netcat command. */ - public final static String NETCAT_COMMAND = "nc -q 0 %s %d"; + public static final String NETCAT_COMMAND = "nc -q 0 %s %d"; private ChannelExec channel; @@ -115,8 +115,8 @@ public class SftpStreamProxy implements * @param proxyOptions * Options used when connecting to the proxy */ - public SftpStreamProxy(final String commandFormat, final String proxyUser, final String proxyHost, final int proxyPort, - final String proxyPassword, final FileSystemOptions proxyOptions) + public SftpStreamProxy(final String commandFormat, final String proxyUser, final String proxyHost, + final int proxyPort, final String proxyPassword, final FileSystemOptions proxyOptions) { this.proxyHost = proxyHost; this.proxyPort = proxyPort; @@ -140,7 +140,9 @@ public class SftpStreamProxy implements } @Override - public void connect(final SocketFactory socketFactory, final String targetHost, final int targetPort, final int timeout) throws Exception + public void connect(final SocketFactory socketFactory, final String targetHost, + final int targetPort, final int timeout) + throws Exception { session = SftpClientFactory.createConnection(proxyHost, proxyPort, proxyUser.toCharArray(), proxyPassword.toCharArray(), proxyOptions); Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileObject.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileObject.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileObject.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/url/UrlFileObject.java Wed Dec 17 22:33:48 2014 @@ -25,7 +25,6 @@ import java.net.URLConnection; import org.apache.commons.httpclient.URIException; import org.apache.commons.vfs2.FileName; -import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystemException; import org.apache.commons.vfs2.FileType; import org.apache.commons.vfs2.provider.AbstractFileName; @@ -33,7 +32,8 @@ import org.apache.commons.vfs2.provider. import org.apache.commons.vfs2.provider.URLFileName; /** - * A {@link FileObject} implementation backed by a {@link URL}. + * A {@link org.apache.commons.vfs2.FileObject FileObject} + * implementation backed by a {@link URL}. * <p> * TODO - Implement set lastModified and get/set attribute * <p> Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/provider/webdav/WebdavFileProvider.java Wed Dec 17 22:33:48 2014 @@ -23,11 +23,9 @@ import java.util.Collections; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.vfs2.Capability; import org.apache.commons.vfs2.FileName; -import org.apache.commons.vfs2.FileObject; import org.apache.commons.vfs2.FileSystem; import org.apache.commons.vfs2.FileSystemConfigBuilder; import org.apache.commons.vfs2.FileSystemException; -import org.apache.commons.vfs2.FileSystemManager; import org.apache.commons.vfs2.FileSystemOptions; import org.apache.commons.vfs2.UserAuthenticationData; import org.apache.commons.vfs2.provider.GenericFileName; @@ -68,10 +66,14 @@ public class WebdavFileProvider setFileNameParser(WebdavFileNameParser.getInstance()); } /** - * Creates a {@link FileSystem}. If you're looking at this method and wondering how to - * get a FileSystemOptions object bearing the proxy host and credentials configuration through - * to this method so it's used for resolving a {@link FileObject} in the FileSystem, then be sure - * to use correct signature of the {@link FileSystemManager} resolveFile method. + * Creates a {@link FileSystem}. + * <p> + * If you're looking at this method and wondering how to get a FileSystemOptions + * object bearing the proxy host and credentials configuration through + * to this method so it's used for resolving a + * {@link org.apache.commons.vfs2.FileObject FileObject} in the FileSystem, then be sure + * to use correct signature of the {@link org.apache.commons.vfs2.FileSystemManager FileSystemManager} + * resolveFile method. * @see org.apache.commons.vfs2.impl.DefaultFileSystemManager#resolveFile(FileObject, String, FileSystemOptions) */ @Override Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/PosixPermissions.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/PosixPermissions.java?rev=1646351&r1=1646350&r2=1646351&view=diff ============================================================================== --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/PosixPermissions.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs2/util/PosixPermissions.java Wed Dec 17 22:33:48 2014 @@ -31,7 +31,7 @@ public class PosixPermissions /** * Permission types. */ - static public enum Type + public static enum Type { /** * User right readable. @@ -78,7 +78,7 @@ public class PosixPermissions */ OtherExecutable(00001); - final private int mask; + private final int mask; /** * Initialize with the mask