diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml index 877541ca3d..8f162a2ae2 100644 --- a/checkstyle-suppressions.xml +++ b/checkstyle-suppressions.xml @@ -37,7 +37,7 @@ - + diff --git a/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java b/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java index 8a79ec26cf..f5296c112a 100644 --- a/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java +++ b/commons-vfs2-hdfs/src/main/java/org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java @@ -52,6 +52,9 @@ public static HdfsFileSystemConfigBuilder getInstance() { return BUILDER; } + /** + * Constructs a new instance. + */ private HdfsFileSystemConfigBuilder() { super("hdfs."); } diff --git a/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java b/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java index dd4a565be7..fcfef40ca7 100644 --- a/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java +++ b/commons-vfs2-sandbox/src/main/java/org/apache/commons/vfs2/provider/smb/SmbFileNameParser.java @@ -42,7 +42,7 @@ public static FileNameParser getInstance() { } /** - * Creates a new instance with the default port 139. + * Constructs a new instance with the default port 139. */ public SmbFileNameParser() { super(SMB_PORT); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java index e0eb7c8da5..cce3a0184b 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/AllFileSelector.java @@ -21,6 +21,13 @@ */ public class AllFileSelector implements FileSelector { + /** + * Constructs a new instance. + */ + public AllFileSelector() { + // empty + } + /** * Determines if a file or folder should be selected. * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java index c0855bd783..c090f9c2bf 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/FileSystemConfigBuilder.java @@ -478,20 +478,6 @@ protected T getParam(final FileSystemOptions fileSystemOptions, final String return fileSystemOptions == null ? null : fileSystemOptions.getOption(getConfigClass(), name); } - /** - * Gets a named parameter. - * - * @param The expected return type. - * @param fileSystemOptions file system options to query, may be null. - * @param name get option with this name - * @param defaultValue The default value if absent. - * @return the named option or {@code defaultValue}. - * @since 2.10.0 - */ - protected T getParamOrDefault(final FileSystemOptions fileSystemOptions, final String name, final T defaultValue) { - return fileSystemOptions == null ? defaultValue : fileSystemOptions.getOptionOrDefault(getConfigClass(), name, defaultValue); - } - /** * Gets a named parameter. * @@ -518,6 +504,20 @@ private T getParam(final FileSystemOptions fileSystemOptions, final String n return value; } + /** + * Gets a named parameter. + * + * @param The expected return type. + * @param fileSystemOptions file system options to query, may be null. + * @param name get option with this name + * @param defaultValue The default value if absent. + * @return the named option or {@code defaultValue}. + * @since 2.10.0 + */ + protected T getParamOrDefault(final FileSystemOptions fileSystemOptions, final String name, final T defaultValue) { + return fileSystemOptions == null ? defaultValue : fileSystemOptions.getOptionOrDefault(getConfigClass(), name, defaultValue); + } + /** * Gets the system property for the given name. * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/AbstractFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/AbstractFilesCache.java index 9c795fbba4..46b48fdadd 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/AbstractFilesCache.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/AbstractFilesCache.java @@ -25,6 +25,13 @@ */ public abstract class AbstractFilesCache extends AbstractVfsComponent implements FilesCache { + /** + * Constructs a new instance for subclasses. + */ + public AbstractFilesCache() { + // empty + } + /** * Default implementation is a NOOP. * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java index 00fe303a4b..65f8904050 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/DefaultFilesCache.java @@ -50,6 +50,13 @@ public class DefaultFilesCache extends AbstractFilesCache { /** The FileSystem cache. Keeps one Map for each FileSystem. */ private final ConcurrentMap> fileSystemCache = new ConcurrentHashMap<>(10); + /** + * Constructs a new instance. + */ + public DefaultFilesCache() { + // empty + } + @Override public void clear(final FileSystem filesystem) { // avoid keeping a reference to the FileSystem (key) object diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java index 075bf0d852..68980f11a6 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/NullFilesCache.java @@ -32,6 +32,13 @@ */ public class NullFilesCache extends AbstractFilesCache { + /** + * Constructs a new instance. + */ + public NullFilesCache() { + // empty + } + @Override public void clear(final FileSystem filesystem) { // empty diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java index b58c794000..9edd4ac9e2 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/SoftRefFilesCache.java @@ -115,7 +115,7 @@ private synchronized void close(final FileSystem fileSystem) { } /** - * Creates a new Reference. + * Constructs a new Reference. * * @param file a file object. * @param referenceQueue a ReferenceQueue. diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/WeakRefFilesCache.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/WeakRefFilesCache.java index 2d8cf5c63a..076d8b0dec 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/WeakRefFilesCache.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/cache/WeakRefFilesCache.java @@ -31,6 +31,13 @@ */ public class WeakRefFilesCache extends SoftRefFilesCache { + /** + * Constructs a new instance. + */ + public WeakRefFilesCache() { + // empty + } + @Override protected Reference createReference(final FileObject file, final ReferenceQueue refqueue) { return new WeakReference<>(file, refqueue); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/events/AbstractFileChangeEvent.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/events/AbstractFileChangeEvent.java index ef7a4398e9..15d3c8a1b3 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/events/AbstractFileChangeEvent.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/events/AbstractFileChangeEvent.java @@ -26,7 +26,7 @@ public abstract class AbstractFileChangeEvent extends FileChangeEvent { /** - * Constructs a new instance. + * Constructs a new instance for subclasses. * * @param fileObject the file object. */ diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java index 48c07ae524..d058d2a259 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileMonitor.java @@ -79,8 +79,6 @@ // TODO Add a Builder so we can construct and start. public class DefaultFileMonitor implements Runnable, FileMonitor, AutoCloseable { - private static final ThreadFactory THREAD_FACTORY = new BasicThreadFactory.Builder().daemon(true).priority(Thread.MIN_PRIORITY).build(); - /** * File monitor agent. */ @@ -266,6 +264,8 @@ private void resetChildrenList() { } + private static final ThreadFactory THREAD_FACTORY = new BasicThreadFactory.Builder().daemon(true).priority(Thread.MIN_PRIORITY).build(); + private static final Log LOG = LogFactory.getLog(DefaultFileMonitor.class); private static final Duration DEFAULT_DELAY = Duration.ofSeconds(1); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java index c3374ac7ca..5bd16c19c8 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemConfigBuilder.java @@ -25,6 +25,7 @@ * Default options usable for all file systems. */ public class DefaultFileSystemConfigBuilder extends FileSystemConfigBuilder { + /** * Dummy class that implements FileSystem. */ @@ -43,6 +44,13 @@ public static DefaultFileSystemConfigBuilder getInstance() { return BUILDER; } + /** + * Constructs a new instance. + */ + public DefaultFileSystemConfigBuilder() { + // empty + } + @Override protected Class getConfigClass() { return DefaultFileSystem.class; diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java index fa298145f4..633d927559 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultFileSystemManager.java @@ -174,6 +174,13 @@ public URLStreamHandler createURLStreamHandler(final String protocol) { */ private boolean init; + /** + * Constructs a new instance. + */ + public DefaultFileSystemManager() { + // empty + } + /** * Closes the given file system. *

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultProviderConfiguration.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultProviderConfiguration.java index 810ad137e2..cc82aff56b 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultProviderConfiguration.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/DefaultProviderConfiguration.java @@ -20,6 +20,14 @@ * Same as {@link ProviderConfiguration} but for the default provider. */ public class DefaultProviderConfiguration extends ProviderConfiguration { + + /** + * Constructs a new instance. + */ + public DefaultProviderConfiguration() { + // empty + } + @Override public boolean isDefault() { return true; diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java index fb674be47c..b943516b27 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/FileContentInfoFilenameFactory.java @@ -32,6 +32,13 @@ public class FileContentInfoFilenameFactory implements FileContentInfoFactory { private static final FileContentInfo NULL_INSTANCE = new DefaultFileContentInfo(null, null); + /** + * Constructs a new instance. + */ + public FileContentInfoFilenameFactory() { + // empty + } + @Override public FileContentInfo create(final FileContent fileContent) { String contentType = null; diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java index f9fab054e7..d018e3c2a1 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/StandardFileSystemManager.java @@ -53,6 +53,13 @@ public class StandardFileSystemManager extends DefaultFileSystemManager { private URL configUri; private ClassLoader classLoader; + /** + * Constructs a new instance. + */ + public StandardFileSystemManager() { + // empty + } + /** * Adds an extension map. * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/VirtualFileProvider.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/VirtualFileProvider.java index 9687d48652..1a3e3300e8 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/VirtualFileProvider.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/impl/VirtualFileProvider.java @@ -30,6 +30,13 @@ */ public class VirtualFileProvider extends AbstractVfsContainer { + /** + * Constructs a new instance. + */ + public VirtualFileProvider() { + // empty + } + /** * Close a VirtualFileSystem by removing it from the {@code #components} list of this provider. *

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperation.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperation.java index 1b6649d9ea..edabf00dce 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperation.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperation.java @@ -30,6 +30,8 @@ public abstract class AbstractFileOperation implements FileOperation { private final FileObject fileObject; /** + * Constructs a new instance for subclasses. + * * @param file The FileObject. */ public AbstractFileOperation(final FileObject file) { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java index 26258c8a2c..4cbdb0b3f6 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/operations/AbstractFileOperationProvider.java @@ -35,6 +35,13 @@ public abstract class AbstractFileOperationProvider implements FileOperationProv */ private final Collection> operations = new ArrayList<>(); + /** + * Constructs a new instance for subclasses. + */ + public AbstractFileOperationProvider() { + // empty + } + /** * Add new FileOperation to list of known operations. * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java index 1975a46c0b..52e8a5c439 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileName.java @@ -92,7 +92,7 @@ public static boolean checkName(final String basePath, final String path, final private String key; /** - * Constructs a new instance. + * Constructs a new instance for subclasses. * * @param scheme The scheme. * @param absolutePath the absolute path, maybe empty or null. diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java index 115ec51958..872f1b596f 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileNameParser.java @@ -21,6 +21,13 @@ */ public abstract class AbstractFileNameParser implements FileNameParser { + /** + * Constructs a new instance for subclasses. + */ + public AbstractFileNameParser() { + // empty + } + @Override public boolean encodeCharacter(final char ch) { return ch == '%'; diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java index a8da6c0430..6f65e63f62 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileObject.java @@ -137,7 +137,7 @@ private static void traverse(final DefaultFileSelectorInfo fileInfo, final FileS private FileOperations operations; /** - * Constructs a new instance. + * Constructs a new instance for subclasses. * * @param fileName the file name. * @param fileSystem the file system. diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileProvider.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileProvider.java index b1e1553b47..652701f3da 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileProvider.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileProvider.java @@ -46,7 +46,7 @@ public abstract class AbstractFileProvider extends AbstractVfsContainer implemen private FileNameParser fileNameParser; /** - * Constructs a new instance. + * Constructs a new instance for subclasses. */ public AbstractFileProvider() { fileNameParser = GenericFileNameParser.getInstance(); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java index bd9ba7e482..66069b9d2d 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractFileSystem.java @@ -97,7 +97,9 @@ public abstract class AbstractFileSystem extends AbstractVfsComponent implements */ private final AtomicInteger openStreams = new AtomicInteger(); - /** Only provided for Serializable subclasses. */ + /** + * Only provided for Serializable subclasses. + */ AbstractFileSystem() { this(null, null, null); } diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractLayeredFileProvider.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractLayeredFileProvider.java index 43beb7ef14..49d6dd639c 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractLayeredFileProvider.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractLayeredFileProvider.java @@ -28,7 +28,7 @@ public abstract class AbstractLayeredFileProvider extends AbstractFileProvider { /** - * Constructs a new instance. + * Constructs a new instance for subclasses. */ public AbstractLayeredFileProvider() { setFileNameParser(LayeredFileNameParser.getInstance()); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractOriginatingFileProvider.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractOriginatingFileProvider.java index d6c0321180..78a7c6beda 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractOriginatingFileProvider.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractOriginatingFileProvider.java @@ -29,7 +29,7 @@ public abstract class AbstractOriginatingFileProvider extends AbstractFileProvider { /** - * Constructs a new instance. + * Constructs a new instance for subclasses. */ public AbstractOriginatingFileProvider() { } diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java index 645fe9a811..8fb92c1919 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java @@ -32,7 +32,7 @@ public abstract class AbstractRandomAccessContent implements RandomAccessContent { /** - * Constructs a new instance. + * Constructs a new instance for subclasses. * * @param mode the RandomAccessMode. */ diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessStreamContent.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessStreamContent.java index b32621b6b5..7cdda068c6 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessStreamContent.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractRandomAccessStreamContent.java @@ -28,7 +28,7 @@ public abstract class AbstractRandomAccessStreamContent extends AbstractRandomAccessContent { /** - * Constructs a new instance. + * Constructs a new instance for subclasses. * * @param mode the RandomAccessMode. */ diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsComponent.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsComponent.java index 0b37dbaa90..a5953f4b95 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsComponent.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsComponent.java @@ -27,6 +27,13 @@ public abstract class AbstractVfsComponent implements VfsComponent { private VfsComponentContext context; private Log log; + /** + * Constructs a new instance for subclasses. + */ + public AbstractVfsComponent() { + // empty + } + /** * Closes the provider. This implementation does nothing. */ diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java index 8f3f1f74b0..cf38d03ef0 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/AbstractVfsContainer.java @@ -31,6 +31,13 @@ public abstract class AbstractVfsContainer extends AbstractVfsComponent { */ private final ArrayList components = new ArrayList<>(); // @GuardedBy("self") + /** + * Constructs a new instance for subclasses. + */ + public AbstractVfsContainer() { + // empty + } + /** * Adds a subcomponent to this component. *

diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java index ac275879f1..0e82092f93 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/HostFileNameParser.java @@ -45,6 +45,13 @@ protected static class Authority { private String scheme; private String userName; + /** + * Constructs a new instance. + */ + public Authority() { + // empty + } + /** * Gets the host name. * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/LayeredFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/LayeredFileNameParser.java index 4254337d65..d3fcda9f68 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/LayeredFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/LayeredFileNameParser.java @@ -39,6 +39,13 @@ public static LayeredFileNameParser getInstance() { return INSTANCE; } + /** + * Constructs a new instance. + */ + public LayeredFileNameParser() { + // empty + } + /** * Determines if a character should be encoded. * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java index d571d9a9cf..2b347c0d0d 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java @@ -37,6 +37,13 @@ @Deprecated public class HttpFileContentInfoFactory implements FileContentInfoFactory { + /** + * Constructs a new instance. + */ + public HttpFileContentInfoFactory() { + // empty + } + @Override public FileContentInfo create(final FileContent fileContent) throws FileSystemException { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java index 1a7880cbc0..31c465a19e 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http/HttpFileNameParser.java @@ -41,7 +41,7 @@ public static FileNameParser getInstance() { } /** - * Creates a new instance with the default port 80. + * Constructs a new instance with the default port 80. */ public HttpFileNameParser() { super(DEFAULT_PORT); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileContentInfoFactory.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileContentInfoFactory.java index 79e07bd713..e10b7b9870 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileContentInfoFactory.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileContentInfoFactory.java @@ -38,6 +38,13 @@ @Deprecated public class Http4FileContentInfoFactory implements FileContentInfoFactory { + /** + * Constructs a new instance. + */ + public Http4FileContentInfoFactory() { + // empty + } + @SuppressWarnings("unchecked") @Override public FileContentInfo create(final FileContent fileContent) throws FileSystemException { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileNameParser.java index 030c5e02ad..c2b8c6713d 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4/Http4FileNameParser.java @@ -42,7 +42,7 @@ public static FileNameParser getInstance() { } /** - * Creates a new instance with the default port 80. + * Constructs a new instance with the default port 80. */ public Http4FileNameParser() { super(DEFAULT_PORT); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4s/Http4sFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4s/Http4sFileNameParser.java index dc50925b07..fcb7208542 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4s/Http4sFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http4s/Http4sFileNameParser.java @@ -42,7 +42,7 @@ public static FileNameParser getInstance() { } /** - * Creates a new instance with the default port 443. + * Constructs a new instance with the default port 443. */ public Http4sFileNameParser() { super(DEFAULT_PORT); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileContentInfoFactory.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileContentInfoFactory.java index 1a9122b250..4cb6faee95 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileContentInfoFactory.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileContentInfoFactory.java @@ -36,6 +36,13 @@ */ public class Http5FileContentInfoFactory implements FileContentInfoFactory { + /** + * Constructs a new instance. + */ + public Http5FileContentInfoFactory() { + // empty + } + @SuppressWarnings("unchecked") @Override public FileContentInfo create(final FileContent fileContent) throws FileSystemException { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileNameParser.java index a6e31f5e6d..43acea0ced 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5/Http5FileNameParser.java @@ -40,7 +40,7 @@ public static FileNameParser getInstance() { } /** - * Creates a new instance with the default port 80. + * Constructs a new instance with the default port 80. */ public Http5FileNameParser() { super(DEFAULT_PORT); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5s/Http5sFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5s/Http5sFileNameParser.java index 8fdec7c4c5..1e838cefd4 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5s/Http5sFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/http5s/Http5sFileNameParser.java @@ -40,7 +40,7 @@ public static FileNameParser getInstance() { } /** - * Creates a new instance with the default port 443. + * Constructs a new instance with the default port 443. */ public Http5sFileNameParser() { super(DEFAULT_PORT); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java index 68f9b29fcb..a6982fc87f 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/https/HttpsFileNameParser.java @@ -41,7 +41,7 @@ public static FileNameParser getInstance() { } /** - * Creates a new instance with the default port 443. + * Constructs a new instance with the default port 443. */ public HttpsFileNameParser() { super(DEFAULT_PORT); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java index 7405a92565..d266346727 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/GenericFileNameParser.java @@ -37,6 +37,13 @@ public static GenericFileNameParser getInstance() { return INSTANCE; } + /** + * Constructs a new instance. + */ + public GenericFileNameParser() { + // empty + } + /* * ... this is why need this: here the rootFileName can only be "/" (see above) put this "/" is also in the * path name so its of no value for the LocalFileName instance diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileNameParser.java index 40fa9ff391..7c4ecf2a07 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/LocalFileNameParser.java @@ -30,6 +30,13 @@ */ public abstract class LocalFileNameParser extends AbstractFileNameParser { + /** + * Constructs a new instance. + */ + public LocalFileNameParser() { + // empty + } + /** * Creates a FileName. * diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java index fa406697c7..b947654120 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/local/WindowsFileNameParser.java @@ -25,6 +25,13 @@ */ public class WindowsFileNameParser extends LocalFileNameParser { + /** + * Constructs a new instance. + */ + public WindowsFileNameParser() { + // empty + } + @Override protected FileName createFileName(final String scheme, final String rootFile, final String path, final FileType type) { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileNameParser.java index 4d112001ee..364df2a7c8 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/res/ResourceFileNameParser.java @@ -30,14 +30,21 @@ public class ResourceFileNameParser extends GenericFileNameParser { private static final ResourceFileNameParser INSTANCE = new ResourceFileNameParser(); /** - * retrieve an instance to this parser. + * Gets the singleton instance. * - * @return the parser + * @return the singleton instance. */ public static GenericFileNameParser getInstance() { return INSTANCE; } + /** + * Constructs a new instance. + */ + public ResourceFileNameParser() { + // empty + } + @Override protected FileName createFileName(final String scheme, final String rootFile, final String path, final FileType type) { diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileNameParser.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileNameParser.java index a307b8b29f..348b0c2325 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileNameParser.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileNameParser.java @@ -38,7 +38,7 @@ public static FileNameParser getInstance() { } /** - * Creates a new instance with the default port 22. + * Constructs a new instance with the default port 22. */ public SftpFileNameParser() { super(DEFAULT_PORT); diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/TrustEveryoneUserInfo.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/TrustEveryoneUserInfo.java index 1790c319b6..683da82210 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/TrustEveryoneUserInfo.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/TrustEveryoneUserInfo.java @@ -27,6 +27,13 @@ public class TrustEveryoneUserInfo implements UserInfo { private static final Log log = LogFactory.getLog(TrustEveryoneUserInfo.class); + /** + * Constructs a new instance. + */ + public TrustEveryoneUserInfo() { + // empty + } + @Override public String getPassphrase() { return null; diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java index 6777a0f19b..b92712fdfa 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/util/DefaultCryptor.java @@ -41,6 +41,13 @@ public class DefaultCryptor implements Cryptor { private static final char MASK = 0x0f; + /** + * Constructs a new instance. + */ + public DefaultCryptor() { + // empty + } + /** Decodes Hex-Bytes. */ private byte[] decode(final String str) { final char[] chars = str.toCharArray();