Apache Commons logo Commons VFS

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 2

Apache Commons VFS - org/apache/commons/vfs2/provider/UriParser.java

Rule Violation Line
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 403

Priority 3

Apache Commons VFS - org/apache/commons/vfs2/CacheStrategy.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'CacheStrategy(String)': enum constructors are implicitly private 4547

Apache Commons VFS - org/apache/commons/vfs2/FileContent.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'in': resource specifications are implicitly final 134

Apache Commons VFS - org/apache/commons/vfs2/FileType.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'FileType(String, boolean, boolean, boolean)': enum constructors are implicitly private 5661

Apache Commons VFS - org/apache/commons/vfs2/FileUtil.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 48

Apache Commons VFS - org/apache/commons/vfs2/NameScope.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'NameScope(String)': enum constructors are implicitly private 6264

Apache Commons VFS - org/apache/commons/vfs2/filter/AgeFileFilter.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 82

Apache Commons VFS - org/apache/commons/vfs2/filter/CanWriteFileFilter.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 93

Apache Commons VFS - org/apache/commons/vfs2/filter/EmptyFileFilter.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 89
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 97

Apache Commons VFS - org/apache/commons/vfs2/filter/SizeFileFilter.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 103
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 107

Apache Commons VFS - org/apache/commons/vfs2/impl/VFSClassLoader.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 315
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 334

Apache Commons VFS - org/apache/commons/vfs2/operations/vcs/VcsStatus.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'VcsStatus(int)': enum constructors are implicitly private 3133

Apache Commons VFS - org/apache/commons/vfs2/provider/AbstractFileName.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 281283

Apache Commons VFS - org/apache/commons/vfs2/provider/AbstractFileObject.java

Rule Violation Line
SimplifiedTernary Ternary operators that can be simplified with || or && 1491
SimplifiedTernary Ternary operators that can be simplified with || or && 1534
SimplifiedTernary Ternary operators that can be simplified with || or && 1549
SimplifiedTernary Ternary operators that can be simplified with || or && 1578
SimplifiedTernary Ternary operators that can be simplified with || or && 1819
SimplifiedTernary Ternary operators that can be simplified with || or && 1839
SimplifiedTernary Ternary operators that can be simplified with || or && 1850

Apache Commons VFS - org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'mode'. 31

Apache Commons VFS - org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 199202

Apache Commons VFS - org/apache/commons/vfs2/provider/ftp/FtpFileType.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'FtpFileType(int)': enum constructors are implicitly private 5860

Apache Commons VFS - org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 181183

Apache Commons VFS - org/apache/commons/vfs2/provider/http4/Http4FileContentInfoFactory.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'http4File': resource specifications are implicitly final 4344

Apache Commons VFS - org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'httpFile': resource specifications are implicitly final 4344

Apache Commons VFS - org/apache/commons/vfs2/provider/jar/JarFileSystem.java

Rule Violation Line
UselessOverridingMethod Overriding method merely calls super 158161

Apache Commons VFS - org/apache/commons/vfs2/provider/ram/RamFileRandomAccessContent.java

Rule Violation Line
UnusedFormalParameter Avoid unused constructor parameters such as 'mode'. 75

Apache Commons VFS - org/apache/commons/vfs2/provider/sftp/SftpFileObject.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'inRefresh'. 57
SimplifiedTernary Ternary operators that can be simplified with || or && 238
EmptyFinallyBlock Avoid empty finally blocks 457459

Apache Commons VFS - org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'stream': resource specifications are implicitly final 295
EmptyCatchBlock Avoid empty catch blocks 311313

Apache Commons VFS - org/apache/commons/vfs2/provider/tar/TarFileSystem.java

Rule Violation Line
EmptyWhileStmt Avoid empty while statements 126127

Apache Commons VFS - org/apache/commons/vfs2/provider/webdav/ExceptionConverter.java

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 5067

Apache Commons VFS - org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java

Rule Violation Line
EmptyCatchBlock Avoid empty catch blocks 143145
EmptyCatchBlock Avoid empty catch blocks 161163
EmptyCatchBlock Avoid empty catch blocks 172174
EmptyCatchBlock Avoid empty catch blocks 188190

Apache Commons VFS - org/apache/commons/vfs2/provider/webdav/WebdavFileSystem.java

Rule Violation Line
UselessOverridingMethod Overriding method merely calls super 4447

Apache Commons VFS - org/apache/commons/vfs2/tasks/ShowFileTask.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'instr': resource specifications are implicitly final 126
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'reader': resource specifications are implicitly final 127

Apache Commons VFS - org/apache/commons/vfs2/util/FileObjectUtils.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 81
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 96

Apache Commons VFS - org/apache/commons/vfs2/util/PosixPermissions.java

Rule Violation Line
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 37
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 42
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 47
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 52
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 57
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 62
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 67
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 72
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 77
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'Type(int)': enum constructors are implicitly private 8486

Apache Commons VFS - org/apache/commons/vfs2/util/RandomAccessMode.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'RandomAccessMode(boolean, boolean)': enum constructors are implicitly private 3740

Priority 4

Apache Commons VFS - org/apache/commons/vfs2/impl/DefaultFileSystemManager.java

Rule Violation Line
UselessParentheses Useless parentheses. 781

Apache Commons VFS - org/apache/commons/vfs2/impl/VFSClassLoader.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.FileUtil' 38

Apache Commons VFS - org/apache/commons/vfs2/provider/UriParser.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.Set' 19
UselessParentheses Useless parentheses. 391
UselessParentheses Useless parentheses. 391
UselessParentheses Useless parentheses. 395

Apache Commons VFS - org/apache/commons/vfs2/provider/http4/Http4FileSystem.java

Rule Violation Line
UselessParentheses Useless parentheses. 67

Apache Commons VFS - org/apache/commons/vfs2/provider/http/HttpFileProvider.java

Rule Violation Line
UselessParentheses Useless parentheses. 73

Apache Commons VFS - org/apache/commons/vfs2/provider/local/LocalFileNameParser.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.VFS' 22

Apache Commons VFS - org/apache/commons/vfs2/provider/ram/RamFileRandomAccessContent.java

Rule Violation Line
UselessParentheses Useless parentheses. 384386
UselessParentheses Useless parentheses. 432

Apache Commons VFS - org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.UserAuthenticationData' 28
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.util.UserAuthenticatorUtils' 32

Apache Commons VFS - org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java

Rule Violation Line
UselessParentheses Useless parentheses. 717718

Apache Commons VFS - org/apache/commons/vfs2/provider/zip/ZipFileProvider.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.provider.hdfs.HdfsFileSystemConfigBuilder' 34

Apache Commons VFS - org/apache/commons/vfs2/tasks/DeleteTask.java

Rule Violation Line
UselessParentheses Useless parentheses. 70
UselessParentheses Useless parentheses. 70

Apache Commons VFS - org/apache/commons/vfs2/util/FileObjectUtils.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.FileUtil' 27

Files

Apache Commons VFS - org/apache/commons/vfs2/CacheStrategy.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'CacheStrategy(String)': enum constructors are implicitly private 3 4547

Apache Commons VFS - org/apache/commons/vfs2/FileContent.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'in': resource specifications are implicitly final 3 134

Apache Commons VFS - org/apache/commons/vfs2/FileType.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'FileType(String, boolean, boolean, boolean)': enum constructors are implicitly private 3 5661

Apache Commons VFS - org/apache/commons/vfs2/FileUtil.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 3 48

Apache Commons VFS - org/apache/commons/vfs2/NameScope.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'NameScope(String)': enum constructors are implicitly private 3 6264

Apache Commons VFS - org/apache/commons/vfs2/filter/AgeFileFilter.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 3 82

Apache Commons VFS - org/apache/commons/vfs2/filter/CanWriteFileFilter.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 3 93

Apache Commons VFS - org/apache/commons/vfs2/filter/EmptyFileFilter.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 3 89
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 3 97

Apache Commons VFS - org/apache/commons/vfs2/filter/SizeFileFilter.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 3 103
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 3 107

Apache Commons VFS - org/apache/commons/vfs2/impl/DefaultFileSystemManager.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 781

Apache Commons VFS - org/apache/commons/vfs2/impl/VFSClassLoader.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.FileUtil' 4 38
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 3 315
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'file': resource specifications are implicitly final 3 334

Apache Commons VFS - org/apache/commons/vfs2/operations/vcs/VcsStatus.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'VcsStatus(int)': enum constructors are implicitly private 3 3133

Apache Commons VFS - org/apache/commons/vfs2/provider/AbstractFileName.java

Rule Violation Priority Line
EmptyCatchBlock Avoid empty catch blocks 3 281283

Apache Commons VFS - org/apache/commons/vfs2/provider/AbstractFileObject.java

Rule Violation Priority Line
SimplifiedTernary Ternary operators that can be simplified with || or && 3 1491
SimplifiedTernary Ternary operators that can be simplified with || or && 3 1534
SimplifiedTernary Ternary operators that can be simplified with || or && 3 1549
SimplifiedTernary Ternary operators that can be simplified with || or && 3 1578
SimplifiedTernary Ternary operators that can be simplified with || or && 3 1819
SimplifiedTernary Ternary operators that can be simplified with || or && 3 1839
SimplifiedTernary Ternary operators that can be simplified with || or && 3 1850

Apache Commons VFS - org/apache/commons/vfs2/provider/AbstractRandomAccessContent.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'mode'. 3 31

Apache Commons VFS - org/apache/commons/vfs2/provider/UriParser.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.Set' 4 19
UselessParentheses Useless parentheses. 4 391
UselessParentheses Useless parentheses. 4 391
UselessParentheses Useless parentheses. 4 395
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 403

Apache Commons VFS - org/apache/commons/vfs2/provider/ftp/FtpClientFactory.java

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 199202

Apache Commons VFS - org/apache/commons/vfs2/provider/ftp/FtpFileType.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'FtpFileType(int)': enum constructors are implicitly private 3 5860

Apache Commons VFS - org/apache/commons/vfs2/provider/hdfs/HdfsFileSystemConfigBuilder.java

Rule Violation Priority Line
EmptyCatchBlock Avoid empty catch blocks 3 181183

Apache Commons VFS - org/apache/commons/vfs2/provider/http4/Http4FileContentInfoFactory.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'http4File': resource specifications are implicitly final 3 4344

Apache Commons VFS - org/apache/commons/vfs2/provider/http4/Http4FileSystem.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 67

Apache Commons VFS - org/apache/commons/vfs2/provider/http/HttpFileContentInfoFactory.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'httpFile': resource specifications are implicitly final 3 4344

Apache Commons VFS - org/apache/commons/vfs2/provider/http/HttpFileProvider.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 73

Apache Commons VFS - org/apache/commons/vfs2/provider/jar/JarFileSystem.java

Rule Violation Priority Line
UselessOverridingMethod Overriding method merely calls super 3 158161

Apache Commons VFS - org/apache/commons/vfs2/provider/local/LocalFileNameParser.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.VFS' 4 22

Apache Commons VFS - org/apache/commons/vfs2/provider/ram/RamFileRandomAccessContent.java

Rule Violation Priority Line
UnusedFormalParameter Avoid unused constructor parameters such as 'mode'. 3 75
UselessParentheses Useless parentheses. 4 384386
UselessParentheses Useless parentheses. 4 432

Apache Commons VFS - org/apache/commons/vfs2/provider/sftp/SftpFileObject.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'inRefresh'. 3 57
SimplifiedTernary Ternary operators that can be simplified with || or && 3 238
EmptyFinallyBlock Avoid empty finally blocks 3 457459

Apache Commons VFS - org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.UserAuthenticationData' 4 28
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.util.UserAuthenticatorUtils' 4 32
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'stream': resource specifications are implicitly final 3 295
EmptyCatchBlock Avoid empty catch blocks 3 311313

Apache Commons VFS - org/apache/commons/vfs2/provider/sftp/SftpFileSystemConfigBuilder.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 717718

Apache Commons VFS - org/apache/commons/vfs2/provider/tar/TarFileSystem.java

Rule Violation Priority Line
EmptyWhileStmt Avoid empty while statements 3 126127

Apache Commons VFS - org/apache/commons/vfs2/provider/webdav/ExceptionConverter.java

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 5067

Apache Commons VFS - org/apache/commons/vfs2/provider/webdav/WebdavFileObject.java

Rule Violation Priority Line
EmptyCatchBlock Avoid empty catch blocks 3 143145
EmptyCatchBlock Avoid empty catch blocks 3 161163
EmptyCatchBlock Avoid empty catch blocks 3 172174
EmptyCatchBlock Avoid empty catch blocks 3 188190

Apache Commons VFS - org/apache/commons/vfs2/provider/webdav/WebdavFileSystem.java

Rule Violation Priority Line
UselessOverridingMethod Overriding method merely calls super 3 4447

Apache Commons VFS - org/apache/commons/vfs2/provider/zip/ZipFileProvider.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.provider.hdfs.HdfsFileSystemConfigBuilder' 4 34

Apache Commons VFS - org/apache/commons/vfs2/tasks/DeleteTask.java

Rule Violation Priority Line
UselessParentheses Useless parentheses. 4 70
UselessParentheses Useless parentheses. 4 70

Apache Commons VFS - org/apache/commons/vfs2/tasks/ShowFileTask.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'instr': resource specifications are implicitly final 3 126
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'reader': resource specifications are implicitly final 3 127

Apache Commons VFS - org/apache/commons/vfs2/util/FileObjectUtils.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'org.apache.commons.vfs2.FileUtil' 4 27
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 3 81
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'content': resource specifications are implicitly final 3 96

Apache Commons VFS - org/apache/commons/vfs2/util/PosixPermissions.java

Rule Violation Priority Line
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 37
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 42
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 47
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 52
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 57
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 62
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 67
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 72
AvoidUsingOctalValues Do not start a literal by 0 unless its an octal value 3 77
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'Type(int)': enum constructors are implicitly private 3 8486

Apache Commons VFS - org/apache/commons/vfs2/util/RandomAccessMode.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'RandomAccessMode(boolean, boolean)': enum constructors are implicitly private 3 3740