Tag List Report

The following document contains the listing of user tags found in the code. Below is the summary of the occurrences per tag.

Tag Class Total number of occurrences Tag strings used by tag class
Deprecated Work 126 @deprecated
FIXME Work 5 fixme, @fixme
Todo Work 7 todo, @todo

Each tag is detailed below:

Deprecated Work

Number of occurrences found in the code: 126

org.apache.maven.shared.utils.PathTool Line
This is a utility class with only static methods. Don't create instances of it. 43
org.apache.maven.shared.utils.PropertyUtils Line
This is a utility class with only static methods. Don't create instances of it. 41
use {@link #loadOptionalProperties(java.net.URL)} instead. This method should not be used as it suppresses exceptions silently when loading properties fails and returns {@code null} instead of an empty {@code Properties} instance when the given {@code URL} is {@code null}. 51
use {@link #loadOptionalProperties(java.io.File)} instead. This method should not be used as it suppresses exceptions silently when loading properties fails and returns {@code null} instead of an empty {@code Properties} instance when the given {@code File} is {@code null}. 72
use {@link #loadOptionalProperties(java.io.InputStream)} instead. This method should not be used as it suppresses exceptions silently when loading properties fails. 97
org.apache.maven.shared.utils.ReaderFactory Line
use {@code java.nio.charset.StandardCharset.ISO_8859_1} 51
use {@code java.nio.charset.StandardCharset.US_ASCII} 60
use {@code java.nio.charset.StandardCharset.UTF_16} 70
use {@code java.nio.charset.StandardCharset.UTF_16BE} 79
use {@code java.nio.charset.StandardCharset.UTF_16LE} 88
use {@code java.nio.charset.StandardCharset.UTF_8} 97
use org.apache.commons.io.input.XmlStreamReader instead 113
use org.apache.commons.io.input.XmlStreamReader instead 128
use {@code org.apache.commons.io.input.XmlStreamReader} instead 143
always specify an encoding. Do not depend on the default platform character set. 159
org.apache.maven.shared.utils.StringUtils Line
use {@code java.lang.Objects.equals()} 222
use {@code java.lang.Objects.toString()} 1890
use {@code java.lang.Objects.toString()} 1908
this method produces platform dependent code and contributes to non-reproducible builds. In the context of Maven, this is almost never what's needed. Remove calls to this method and do not replace them. That is, change {@code Stringutils.unifyLineSeparators(s)} to simply {@code s}. 2403
org.apache.maven.shared.utils.WriterFactory Line
use {@code java.nio.charset.StandardCharset.ISO_8859_1} 50
use {@code java.nio.charset.StandardCharset.US_ASCII} 59
use {@code java.nio.charset.StandardCharset.UTF_16} 69
use {@code java.nio.charset.StandardCharset.UTF_16BE} 78
use {@code java.nio.charset.StandardCharset.UTF_16LE} 87
use {@code java.nio.charset.StandardCharset.UTF_8} 96
always specify an encoding. Do not depend on the default platform character set. 139
always specify an encoding. Do not depend on the default platform character set. 153
org.apache.maven.shared.utils.cli.CommandLineUtils Line
use System#getenv() 424
use System#getenv() 438
org.apache.maven.shared.utils.cli.StreamPumper Line
As of 3.2.0, removed without replacement. 127
As of 3.2.0, removed without replacement. 138
org.apache.maven.shared.utils.cli.shell.CommandShell Line
Windows ME is long dead. Update to Windows 10 and use {@link CmdShell}. 27
org.apache.maven.shared.utils.io.DirectoryScanResult Line
use {@code java.nio.file.DirectoryStream} and related classes 27
org.apache.maven.shared.utils.io.DirectoryScanner Line
use {@code java.nio.file.DirectoryStream} and related classes 119
this method does not work correctly on Windows. 802
this method is buggy. Do not depend on it. 848
org.apache.maven.shared.utils.io.DirectoryWalkListener Line
use {@code java.nio.file.FileVisitor} and related classes 27
org.apache.maven.shared.utils.io.FileUtils Line
use {@code Paths.get(path).getParent().getName()} 166
use {@code Paths.get(path).getName()} 180
use {@code org.apache.commons.io.FilenameUtils.getExtension} 195
use {@code java.io.File.exists()} 229
use {@code new String(java.nio.files.Files.readAllBytes(file))} 244
use {@code new String(java.nio.files.Files.readAllBytes(Paths.get(file)), encoding)} 258
use {@code new String(java.nio.files.Files.readAllBytes(file.toPath()))} 273
use {@code new String(java.nio.files.Files.readAllBytes(file.toPath()), encoding)} 287
use {@code java.nio.files.Files.readAllLines()} 316
use {@code java.nio.files.Files.write(filename, data.getBytes(), StandardOpenOption.APPEND, StandardOpenOption.CREATE)} 334
use {@code java.nio.files.Files.write(filename, data.getBytes(encoding), StandardOpenOption.APPEND, StandardOpenOption.CREATE)} 351
use {@code java.nio.files.Files.write(filename, data.getBytes(), StandardOpenOption.CREATE)} 373
use {@code java.nio.files.Files.write(Paths.get(filename), data.getBytes(encoding), StandardOpenOption.CREATE)} 390
use {@code java.nio.files.Files.write(file.toPath(), data.getBytes(encoding), StandardOpenOption.CREATE)} 408
use {@code java.nio.files.Files.write(file.toPath(), data.getBytes(encoding), StandardOpenOption.CREATE)} 430
use {@code java.nio.files.Files.write(file.toPath(), data.getBytes(encoding), StandardOpenOption.CREATE)} 447
use {@code Files.delete(Paths.get(fileName))} 473
use {@code java.nio.file.Files.createDirectories(Paths.get(dir))} 583
use {@code org.apache.commons.io.FilenameUtils.removeExtension()} 698
use {@code org.apache.commons.io.FilenameUtils.getExtension()} 725
use {@code org.apache.commons.io.FileUtils.copyFileToDirectory()} 745
use {@code java.nio.Files.copy(source.toPath(), destination.toPath(), LinkOption.NOFOLLOW_LINKS, StandardCopyOption.REPLACE_EXISTING)} 797
use {@code java.nio.Files.copy(source.openStream(), destination.toPath(), StandardCopyOption.REPLACE_EXISTING)} 907
use {@code java.nio.Files.copy(source, destination.toPath(), StandardCopyOption.REPLACE_EXISTING)} 931
use {@code org.apache.commons.io.FileNameUtils.normalize()} 976
use {@code org.apache.commons.io.FileUtils.deleteQuietly()} 1109
use {@code org.apache.commons.io.FileUtils.deleteQuietly()} 1123
use {@code java.nio.files.Files.delete(file.toPath())} 1153
use {@code java.nio.files.Files.delete(file.toPath())} 1165
use {@code org.apache.commons.io.FileUtils.deleteDirectory()} 1261
use {@code org.apache.commons.io.FileUtils.deleteDirectory()} 1275
use {@code org.apache.commons.io.FileUtils.cleanDirectory()} 1308
use {@code org.apache.commons.io.FileUtils.sizeOf()} 1358
use {@code org.apache.commons.io.FileUtils.sizeOf()} 1371
use {@code org.apache.commons.io.FileUtils.copyDirectory()} 1612
use {@code org.apache.commons.io.FileUtils.copyDirectory()} 1643
use {@code org.apache.commons.io.FileUtils.copyDirectory()} 1678
use {@code java.nio.Files.move()} 1777
use {@code java.nio.Files.createTempFile()} 1824
assumes the platform default character set 2035
use {@code java.nio.file.Files.isSymbolicLink(file.toPath())} 2112
use {@code java.nio.file.Files.isSymbolicLink(file.toPath())} 2128
org.apache.maven.shared.utils.io.IOUtil Line
use {@code org.apache.commons.io.IOUtils.copy()} or in Java 9 and later {@code InputStream.transferTo()}. 135
use {@code org.apache.commons.io.IOUtils.copy()} or in Java 9 and later {@code InputStream.transferTo()}. 154
use {@code org.apache.commons.io.IOUtils.copy()}. 175
use {@code org.apache.commons.io.IOUtils.copy()}. 191
use {@code org.apache.commons.io.IOUtils.copy()}. 223
use {@code org.apache.commons.io.IOUtils.copy()}. 241
use {@code org.apache.commons.io.IOUtils.copy()}. 261
use {@code org.apache.commons.io.IOUtils.copy()}. 283
always specify a character encoding 304
always specify a character encoding 321
use {@code org.apache.commons.io.IOUtils.toString()}. 341
use {@code org.apache.commons.io.IOUtils.toString()}. 360
use {@code org.apache.commons.io.IOUtils.readFully()}. 381
use {@code org.apache.commons.io.IOUtils.readFully()}. 397
always specify a character encoding 423
always specify a character encoding 440
use {@code org.apache.commons.io.IOUtils.toString()}. 461
use {@code org.apache.commons.io.IOUtils.toString()}. 477
always specify a character encoding 497
always specify a character encoding 513
always specify a character encoding 538
always specify a character encoding 555
use {@code org.apache.commons.io.IOUtils.write()}. 578
always specify a character encoding 596
always specify a character encoding 612
always specify a character encoding 639
always specify a character encoding 657
use {@code org.apache.commons.io.IOUtils.write()}. 677
use {@code org.apache.commons.io.IOUtils.write()}. 698
always specify a character encoding 718
always specify a character encoding 735
use {@code new String(input, encoding)} 755
use {@code new String(input, encoding)} 774
inline this method 795
use {@code org.apache.commons.io.IOUtils.contentEquals()} 811
use try-with-resources 927
use try-with-resources 1033
use try-with-resources 1139
use try-with-resources 1245
use try-with-resources 1351
org.apache.maven.shared.utils.io.Java7Support Line
no longer needed, prefer to use {@link java.nio.file.Files} methods directly. 32
org.apache.maven.shared.utils.io.MatchPattern Line
use {@code java.nio.filejava.nio.file.DirectoryStream.Filter<T>} and related classes 36
org.apache.maven.shared.utils.io.MatchPatterns Line
use {@code java.nio.filejava.nio.file.DirectoryStream.Filter<T>} and related classes 30
org.apache.maven.shared.utils.io.ScanConductor Line
use {@code java.nio.file.Files.walkFileTree()} and related classes 35
org.apache.maven.shared.utils.io.SelectorUtils Line
use {@code java.nio.file.Files.walkFileTree()} and related classes 42
org.apache.maven.shared.utils.io.WalkCollector Line
use {@code java.nio.file.FileVisitor} and related classes 27
org.apache.maven.shared.utils.xml.XmlStreamReader Line
use org.apache.commons.io.input.XmlStreamReader instead 32

FIXME Work

Number of occurrences found in the code: 5

org.apache.maven.shared.utils.io.DirectoryScannerTest Line
3 (Windows) and 5 (Linux) are both wrong. The correct answer is 4. This method is broken in different ways on different operating systems. 140
getIncludedFiles is broken on Windows; correct answer is 9 147
org.apache.maven.shared.utils.io.FileUtils Line
I'm almost certain this // removal is unnecessary, as getAbsoluteFile() strips them. However, I'm not sure about this UNC stuff. (JT) 1062
org.apache.maven.shared.utils.io.MatchPattern Line
ICK! But we can't do partial matches for regex, so we have to reserve judgment until we have a file to deal with, or we can definitely say this is an exclusion... 103
org.apache.maven.shared.utils.io.SelectorUtils Line
ICK! But we can't do partial matches for regex, so we have to reserve judgement until we have a file to deal with, or we can definitely say this is an exclusion... 115

Todo Work

Number of occurrences found in the code: 7

org.apache.maven.shared.utils.cli.CommandLineUtils Line
Find out if waitUntilDone needs to be called using a try-finally construct. The method may throw an InterruptedException so that calls to waitUntilDone may be skipped. try { if ( inputFeeder != null ) { inputFeeder.waitUntilDone(); } } finally { try { outputPumper.waitUntilDone(); } finally { errorPumper.waitUntilDone(); } } 317
org.apache.maven.shared.utils.introspection.ReflectionValueExtractorTest Line
assert exception message 246
assert exception message 259
org.apache.maven.shared.utils.io.FileUtilsTest Line
Maybe test copy to itself like for copyFile() 316
org.apache.maven.shared.utils.io.SymlinkTestSetup Line
set file attributes (not used here) 52
org.apache.maven.shared.utils.xml.pull.Xpp3DomTest Line
This does not work when loaded. Probably a bug related to null vs "" handling Xpp3Dom t1 = build( "<top combine.self='override' attr='value'></top>" ); 79
When we used xpp3dom, all methods using this assert used to return null 242