Browse Source

whitespace

master
Stefan Bodewig 11 years ago
parent
commit
df33426bf2
92 changed files with 556 additions and 563 deletions
  1. +36
    -36
      src/etc/checkstyle/checkstyle-frames-sortby-check.xsl
  2. +32
    -32
      src/main/org/apache/tools/ant/AntClassLoader.java
  3. +19
    -19
      src/main/org/apache/tools/ant/DirectoryScanner.java
  4. +2
    -2
      src/main/org/apache/tools/ant/ExtensionPoint.java
  5. +21
    -22
      src/main/org/apache/tools/ant/IntrospectionHelper.java
  6. +6
    -8
      src/main/org/apache/tools/ant/Main.java
  7. +23
    -23
      src/main/org/apache/tools/ant/Project.java
  8. +2
    -2
      src/main/org/apache/tools/ant/filters/ConcatFilter.java
  9. +3
    -3
      src/main/org/apache/tools/ant/launch/Launcher.java
  10. +3
    -3
      src/main/org/apache/tools/ant/listener/AnsiColorLogger.java
  11. +6
    -6
      src/main/org/apache/tools/ant/listener/SilentLogger.java
  12. +6
    -6
      src/main/org/apache/tools/ant/taskdefs/AntStructure.java
  13. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/BindTargets.java
  14. +21
    -23
      src/main/org/apache/tools/ant/taskdefs/Copy.java
  15. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/EchoXML.java
  16. +16
    -16
      src/main/org/apache/tools/ant/taskdefs/Get.java
  17. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/Input.java
  18. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Javac.java
  19. +9
    -10
      src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  20. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/MakeUrl.java
  21. +8
    -8
      src/main/org/apache/tools/ant/taskdefs/Manifest.java
  22. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/PathConvert.java
  23. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/ProjectHelperTask.java
  24. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/Property.java
  25. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Redirector.java
  26. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Rmic.java
  27. +5
    -5
      src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  28. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Sleep.java
  29. +6
    -6
      src/main/org/apache/tools/ant/taskdefs/SubAnt.java
  30. +6
    -6
      src/main/org/apache/tools/ant/taskdefs/Sync.java
  31. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/War.java
  32. +7
    -7
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  33. +13
    -13
      src/main/org/apache/tools/ant/taskdefs/Zip.java
  34. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java
  35. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  36. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/condition/IsReachable.java
  37. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java
  38. +4
    -4
      src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java
  39. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java
  40. +11
    -11
      src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
  41. +0
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/Xalan2TraceSupport.java
  42. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodTypeCPInfo.java
  43. +7
    -7
      src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java
  44. +3
    -3
      src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionSet.java
  45. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/junit/Constants.java
  46. +5
    -5
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnit4TestMethodAdapter.java
  47. +15
    -15
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  48. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.java
  49. +27
    -27
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java
  50. +12
    -12
      src/main/org/apache/tools/ant/taskdefs/optional/junit/TearDownOnVmCrash.java
  51. +13
    -13
      src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
  52. +6
    -6
      src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.java
  53. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/Directory.java
  54. +9
    -9
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
  55. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
  56. +12
    -12
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHSession.java
  57. +5
    -5
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
  58. +2
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java
  59. +5
    -5
      src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java
  60. +2
    -2
      src/main/org/apache/tools/ant/types/FilterChain.java
  61. +2
    -2
      src/main/org/apache/tools/ant/types/FilterSet.java
  62. +3
    -3
      src/main/org/apache/tools/ant/types/Permissions.java
  63. +3
    -3
      src/main/org/apache/tools/ant/types/mappers/CutDirsMapper.java
  64. +7
    -7
      src/main/org/apache/tools/ant/types/resources/Archives.java
  65. +5
    -5
      src/main/org/apache/tools/ant/types/resources/ContentTransformingResource.java
  66. +8
    -8
      src/main/org/apache/tools/ant/types/resources/LazyResourceCollectionWrapper.java
  67. +6
    -6
      src/main/org/apache/tools/ant/types/resources/MappedResource.java
  68. +10
    -10
      src/main/org/apache/tools/ant/types/resources/MultiRootFileSet.java
  69. +2
    -2
      src/main/org/apache/tools/ant/types/resources/selectors/Type.java
  70. +2
    -2
      src/main/org/apache/tools/ant/types/selectors/MappingSelector.java
  71. +4
    -4
      src/main/org/apache/tools/ant/types/selectors/PresentSelector.java
  72. +3
    -3
      src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java
  73. +9
    -9
      src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java
  74. +4
    -4
      src/main/org/apache/tools/ant/util/LineOrientedOutputStream.java
  75. +4
    -4
      src/main/org/apache/tools/ant/util/LineOrientedOutputStreamRedirector.java
  76. +5
    -5
      src/main/org/apache/tools/ant/util/ProcessUtil.java
  77. +4
    -4
      src/main/org/apache/tools/ant/util/ResourceUtils.java
  78. +2
    -2
      src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java
  79. +18
    -18
      src/main/org/apache/tools/ant/util/UnicodeUtil.java
  80. +2
    -2
      src/main/org/apache/tools/ant/util/XmlConstants.java
  81. +1
    -1
      src/main/org/apache/tools/tar/TarEntry.java
  82. +1
    -1
      src/main/org/apache/tools/tar/TarOutputStream.java
  83. +3
    -3
      src/main/org/apache/tools/tar/TarUtils.java
  84. +5
    -5
      src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java
  85. +3
    -3
      src/main/org/apache/tools/zip/FallbackZipEncoding.java
  86. +3
    -3
      src/main/org/apache/tools/zip/NioZipEncoding.java
  87. +4
    -4
      src/main/org/apache/tools/zip/Simple8BitZipEncoding.java
  88. +1
    -1
      src/main/org/apache/tools/zip/UnicodeCommentExtraField.java
  89. +1
    -1
      src/main/org/apache/tools/zip/UnicodePathExtraField.java
  90. +1
    -1
      src/main/org/apache/tools/zip/ZipEntry.java
  91. +1
    -1
      src/main/org/apache/tools/zip/ZipFile.java
  92. +3
    -3
      src/main/org/apache/tools/zip/ZipOutputStream.java

+ 36
- 36
src/etc/checkstyle/checkstyle-frames-sortby-check.xsl View File

@@ -53,8 +53,8 @@

<!--
Generates the HTML page with the data.
-->
<xsl:template name="sorted.html">
-->
<xsl:template name="sorted.html">
<html>
<head>
<title>CheckStyle Audit</title>
@@ -71,17 +71,17 @@
<xsl:apply-templates select="." mode="data"/>
</body>
</html>
</xsl:template>
</xsl:template>



<!--
Key for detecting duplicate CheckModules
-->
-->
<xsl:key name="module" match="file/error" use="@source"/>
<!--
Generates the navagation bar.
-->
@@ -101,9 +101,9 @@
</xsl:for-each>
</ul>
</xsl:template>
<!--
Generates the data part.
-->
@@ -127,10 +127,10 @@
<!--
Generates the content table for the given check module.
@param filter full qualified module name
-->
-->
<xsl:template name="data">
<xsl:param name="filter"/>
<table>
<tr>
<th>file</th>
@@ -150,9 +150,9 @@
</xsl:for-each>
</table>
</xsl:template>
<!--
Generates the data rows for the current check module.
Ignores errors in the current file from other modules.
@@ -183,15 +183,15 @@
<!--
Generates the CSS with the layout instructions.
Generated so this XSL is the single source of the whole report.
-->
<xsl:template name="sorted.css">
-->
<xsl:template name="sorted.css">
body {
font:normal 80% arial,helvetica,sanserif;
color: black;
background-color: white;
margin: 0;
padding: 1em;
min-width: 41em;
min-width: 41em;
}
h1 {
font-weight:bold;
@@ -203,9 +203,9 @@
border: 2px ridge silver;
}
html<xsl:text disable-output-escaping="yes">&gt;</xsl:text>body h1 {
border-color: gray;
border-color: gray;
}
ul#navigation {
font-size: 0.83em;
float: left; width: 18em;
@@ -233,7 +233,7 @@
ul#navigation a:active {
color: white; background-color: gray;
}
div#content {
margin: 0 1em 1em 16em;
padding: 0 1em;
@@ -271,10 +271,10 @@
}
table tr:nth-child(odd) td {
background: #efefef;
}
}
table tr:nth-child(even) td {
background: #fff;
}
}
</xsl:template>


@@ -282,8 +282,8 @@
<!--
Generates the JavaScript for the dynamic style.
Generated so this XSL is the single source of the whole report.
-->
<xsl:template name="switch.js">
-->
<xsl:template name="switch.js">
/*
* Hides all "hideable" div-containers
*/
@@ -296,11 +296,11 @@
}
return;
}
/*
* Shows one div-container and hides the other.
* @param id id of the element to show
*/
* @param id id of the element to show
*/
function change(id) {
hideAll();
e = document.getElementById(id);
@@ -310,11 +310,11 @@
window.scrollTo(0, 0);
return;
}
/*
* Shows only the first data row.
* Used in body:onload so the user could directly see some messages.
*/
* Used in body:onload so the user could directly see some messages.
*/
function openFirst() {
hideAll();
for (i = 0; i <xsl:text disable-output-escaping="yes">&lt;</xsl:text> allElements.length; i++) {
@@ -325,7 +325,7 @@
}
return;
}
</xsl:template>
</xsl:template>



@@ -333,19 +333,19 @@
Calculates the index of the last occurence of a substring in a string.
@param txt the whole string in which to search
@delimiter the substring to search
-->
-->
<xsl:template name="last-index-of">
<xsl:param name="txt"/>
<xsl:param name="remainder" select="$txt"/>
<xsl:param name="delimiter" select="' '"/>
<xsl:choose>
<xsl:when test="contains($remainder, $delimiter)">
<xsl:call-template name="last-index-of">
<xsl:with-param name="txt" select="$txt"/>
<xsl:with-param name="remainder" select="substring-after($remainder, $delimiter)"/>
<xsl:with-param name="delimiter" select="$delimiter"/>
</xsl:call-template>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="lastIndex" select="string-length(substring($txt, 1, string-length($txt)-string-length($remainder)))+1"/>
@@ -364,4 +364,4 @@
</xsl:choose>
</xsl:template>

</xsl:stylesheet>
</xsl:stylesheet>

+ 32
- 32
src/main/org/apache/tools/ant/AntClassLoader.java View File

@@ -119,7 +119,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @return <code>true</code> if there are more elements in the
* enumeration; <code>false</code> otherwise.
*/
public boolean hasMoreElements() {
public boolean hasMoreElements() {
return (this.nextResource != null);
}

@@ -128,7 +128,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @return the next resource in the enumeration
*/
public URL nextElement() {
public URL nextElement() {
final URL ret = this.nextResource;
if (ret == null) {
throw new NoSuchElementException();
@@ -220,7 +220,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {

/** Static map of jar file/time to manifest class-path entries */
private static Map<String, String> pathMap =
Collections.synchronizedMap(new HashMap<String, String>());
Collections.synchronizedMap(new HashMap<String, String>());

/**
* The context loader saved when setting the thread's current
@@ -289,7 +289,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* load the a class through this loader.
*/
public AntClassLoader(
final ClassLoader parent, final Project project, final Path classpath, final boolean parentFirst) {
final ClassLoader parent, final Project project, final Path classpath, final boolean parentFirst) {
this(project, classpath);
if (parent != null) {
setParent(parent);
@@ -576,7 +576,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* Use Class.forName with initialize=true instead.
*/
@Deprecated
public static void initializeClass(final Class<?> theClass) {
public static void initializeClass(final Class<?> theClass) {
// ***HACK*** We ask the VM to create an instance
// by voluntarily providing illegal arguments to force
// the VM to run the class' static initializer, while
@@ -698,7 +698,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* resource cannot be found on the loader's classpath.
*/
@Override
public InputStream getResourceAsStream(final String name) {
public InputStream getResourceAsStream(final String name) {
InputStream resourceStream = null;
if (isParentFirst(name)) {
resourceStream = loadBaseResource(name);
@@ -716,8 +716,8 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
if (resourceStream == null && !isParentFirst(name)) {
if (ignoreBase) {
resourceStream = getRootLoader() == null
? null
: getRootLoader().getResourceAsStream(name);
? null
: getRootLoader().getResourceAsStream(name);
} else {
resourceStream = loadBaseResource(name);
}
@@ -877,7 +877,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* adequate privileges to get the resource.
*/
@Override
public URL getResource(final String name) {
public URL getResource(final String name) {
// we need to search the components of the path to see if
// we can find the class we want.
URL url = null;
@@ -944,7 +944,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @exception IOException if I/O errors occurs (can't happen)
*/
@Override
protected Enumeration<URL> findResources(final String name) throws IOException {
protected Enumeration<URL> findResources(final String name) throws IOException {
return findResources(name, true);
}

@@ -961,7 +961,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @exception IOException if I/O errors occurs (can't happen)
*/
protected Enumeration<URL> findResources(final String name,
final boolean parentHasBeenSearched)
final boolean parentHasBeenSearched)
throws IOException {
final Enumeration<URL> mine = new ResourceEnumeration(name);
Enumeration<URL> base;
@@ -1070,8 +1070,8 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* classpath.
*/
@Override
protected synchronized Class<?> loadClass(final String classname, final boolean resolve)
throws ClassNotFoundException {
protected synchronized Class<?> loadClass(final String classname, final boolean resolve)
throws ClassNotFoundException {
// 'sync' is needed - otherwise 2 threads can load the same class
// twice, resulting in LinkageError: duplicated class definition.
// findLoadedClass avoids that, but without sync it won't work.
@@ -1084,11 +1084,11 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
try {
theClass = findBaseClass(classname);
log("Class " + classname + " loaded from parent loader " + "(parentFirst)",
Project.MSG_DEBUG);
Project.MSG_DEBUG);
} catch (final ClassNotFoundException cnfe) {
theClass = findClass(classname);
log("Class " + classname + " loaded from ant loader " + "(parentFirst)",
Project.MSG_DEBUG);
Project.MSG_DEBUG);
}
} else {
try {
@@ -1135,13 +1135,13 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @throws IOException if the class data cannot be read.
*/
protected Class<?> defineClassFromData(final File container, final byte[] classData, final String classname)
throws IOException {
throws IOException {
definePackage(container, classname);
final ProtectionDomain currentPd = Project.class.getProtectionDomain();
final String classResource = getClassFilename(classname);
final CodeSource src = new CodeSource(FILE_UTILS.getFileURL(container),
getCertificates(container,
classResource));
getCertificates(container,
classResource));
final ProtectionDomain classesPd =
new ProtectionDomain(src, currentPd.getPermissions(),
this,
@@ -1288,7 +1288,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
}
}
definePackage(packageName, specificationTitle, specificationVersion, specificationVendor,
implementationTitle, implementationVersion, implementationVendor, sealBase);
implementationTitle, implementationVersion, implementationVendor, sealBase);
}

/**
@@ -1308,7 +1308,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* reading the class from the stream.
*/
private Class<?> getClassFromStream(final InputStream stream, final String classname, final File container)
throws IOException, SecurityException {
throws IOException, SecurityException {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
int bytesRead = -1;
final byte[] buffer = new byte[BUFFER_SIZE];
@@ -1332,7 +1332,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* on this loader's classpath.
*/
@Override
public Class<?> findClass(final String name) throws ClassNotFoundException {
public Class<?> findClass(final String name) throws ClassNotFoundException {
log("Finding class " + name, Project.MSG_DEBUG);
return findClassInComponents(name);
}
@@ -1380,7 +1380,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
} catch (final IOException ioe) {
// ioe.printStackTrace();
log("Exception reading component " + pathComponent + " (reason: "
+ ioe.getMessage() + ")", Project.MSG_VERBOSE);
+ ioe.getMessage() + ")", Project.MSG_VERBOSE);
} finally {
FileUtils.close(stream);
}
@@ -1443,7 +1443,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @param event the buildStarted event
*/
public void buildStarted(final BuildEvent event) {
public void buildStarted(final BuildEvent event) {
// Not significant for the class loader.
}

@@ -1453,7 +1453,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @param event the buildFinished event
*/
public void buildFinished(final BuildEvent event) {
public void buildFinished(final BuildEvent event) {
cleanup();
}

@@ -1466,7 +1466,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @since Ant 1.6.2
*/
public void subBuildFinished(final BuildEvent event) {
public void subBuildFinished(final BuildEvent event) {
if (event.getProject() == project) {
cleanup();
}
@@ -1479,7 +1479,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @since Ant 1.6.2
*/
public void subBuildStarted(final BuildEvent event) {
public void subBuildStarted(final BuildEvent event) {
// Not significant for the class loader.
}

@@ -1488,7 +1488,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @param event the targetStarted event
*/
public void targetStarted(final BuildEvent event) {
public void targetStarted(final BuildEvent event) {
// Not significant for the class loader.
}

@@ -1497,7 +1497,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @param event the targetFinished event
*/
public void targetFinished(final BuildEvent event) {
public void targetFinished(final BuildEvent event) {
// Not significant for the class loader.
}

@@ -1506,7 +1506,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @param event the taskStarted event
*/
public void taskStarted(final BuildEvent event) {
public void taskStarted(final BuildEvent event) {
// Not significant for the class loader.
}

@@ -1515,7 +1515,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @param event the taskFinished event
*/
public void taskFinished(final BuildEvent event) {
public void taskFinished(final BuildEvent event) {
// Not significant for the class loader.
}

@@ -1524,7 +1524,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
*
* @param event the messageLogged event
*/
public void messageLogged(final BuildEvent event) {
public void messageLogged(final BuildEvent event) {
// Not significant for the class loader.
}

@@ -1546,7 +1546,7 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
* @return the path that this classloader has.
*/
@Override
public String toString() {
public String toString() {
return "AntClassLoader[" + getClasspath() + "]";
}



+ 19
- 19
src/main/org/apache/tools/ant/DirectoryScanner.java View File

@@ -146,7 +146,7 @@ public class DirectoryScanner
* method instead.
*/
@Deprecated
protected static final String[] DEFAULTEXCLUDES = {
protected static final String[] DEFAULTEXCLUDES = {
// Miscellaneous typical temporary files
SelectorUtils.DEEP_TREE_MATCH + "/*~",
SelectorUtils.DEEP_TREE_MATCH + "/#*#",
@@ -619,7 +619,7 @@ public class DirectoryScanner
*
* @param basedir The base directory to scan.
*/
public void setBasedir(final String basedir) {
public void setBasedir(final String basedir) {
setBasedir(basedir == null ? (File) null
: new File(basedir.replace('/', File.separatorChar).replace(
'\\', File.separatorChar)));
@@ -631,7 +631,7 @@ public class DirectoryScanner
*
* @param basedir The base directory for scanning.
*/
public synchronized void setBasedir(final File basedir) {
public synchronized void setBasedir(final File basedir) {
this.basedir = basedir;
}

@@ -641,7 +641,7 @@ public class DirectoryScanner
*
* @return the base directory to be scanned.
*/
public synchronized File getBasedir() {
public synchronized File getBasedir() {
return basedir;
}

@@ -662,7 +662,7 @@ public class DirectoryScanner
* @param isCaseSensitive whether or not the file system should be
* regarded as a case sensitive one.
*/
public synchronized void setCaseSensitive(final boolean isCaseSensitive) {
public synchronized void setCaseSensitive(final boolean isCaseSensitive) {
this.isCaseSensitive = isCaseSensitive;
}

@@ -720,7 +720,7 @@ public class DirectoryScanner
* list is given, all elements must be
* non-<code>null</code>.
*/
public synchronized void setIncludes(final String[] includes) {
public synchronized void setIncludes(final String[] includes) {
if (includes == null) {
this.includes = null;
} else {
@@ -743,7 +743,7 @@ public class DirectoryScanner
* should be excluded. If a non-<code>null</code> list is
* given, all elements must be non-<code>null</code>.
*/
public synchronized void setExcludes(final String[] excludes) {
public synchronized void setExcludes(final String[] excludes) {
if (excludes == null) {
this.excludes = null;
} else {
@@ -808,7 +808,7 @@ public class DirectoryScanner
*
* @param selectors specifies the selectors to be invoked on a scan.
*/
public synchronized void setSelectors(final FileSelector[] selectors) {
public synchronized void setSelectors(final FileSelector[] selectors) {
this.selectors = selectors;
}

@@ -833,7 +833,7 @@ public class DirectoryScanner
* @exception IllegalStateException if the base directory was set
* incorrectly (i.e. if it doesn't exist or isn't a directory).
*/
public void scan() throws IllegalStateException {
public void scan() throws IllegalStateException {
synchronized (scanLock) {
if (scanning) {
while (scanning) {
@@ -1568,7 +1568,7 @@ public class DirectoryScanner
* @return the names of the files which matched at least one of the
* include patterns and none of the exclude patterns.
*/
public String[] getIncludedFiles() {
public String[] getIncludedFiles() {
String[] files;
synchronized (this) {
if (filesIncluded == null) {
@@ -1603,7 +1603,7 @@ public class DirectoryScanner
*
* @see #slowScan
*/
public synchronized String[] getNotIncludedFiles() {
public synchronized String[] getNotIncludedFiles() {
slowScan();
final String[] files = new String[filesNotIncluded.size()];
filesNotIncluded.copyInto(files);
@@ -1621,7 +1621,7 @@ public class DirectoryScanner
*
* @see #slowScan
*/
public synchronized String[] getExcludedFiles() {
public synchronized String[] getExcludedFiles() {
slowScan();
final String[] files = new String[filesExcluded.size()];
filesExcluded.copyInto(files);
@@ -1639,7 +1639,7 @@ public class DirectoryScanner
*
* @see #slowScan
*/
public synchronized String[] getDeselectedFiles() {
public synchronized String[] getDeselectedFiles() {
slowScan();
final String[] files = new String[filesDeselected.size()];
filesDeselected.copyInto(files);
@@ -1654,7 +1654,7 @@ public class DirectoryScanner
* @return the names of the directories which matched at least one of the
* include patterns and none of the exclude patterns.
*/
public String[] getIncludedDirectories() {
public String[] getIncludedDirectories() {
String[] directories;
synchronized (this) {
if (dirsIncluded == null) {
@@ -1689,7 +1689,7 @@ public class DirectoryScanner
*
* @see #slowScan
*/
public synchronized String[] getNotIncludedDirectories() {
public synchronized String[] getNotIncludedDirectories() {
slowScan();
final String[] directories = new String[dirsNotIncluded.size()];
dirsNotIncluded.copyInto(directories);
@@ -1707,7 +1707,7 @@ public class DirectoryScanner
*
* @see #slowScan
*/
public synchronized String[] getExcludedDirectories() {
public synchronized String[] getExcludedDirectories() {
slowScan();
final String[] directories = new String[dirsExcluded.size()];
dirsExcluded.copyInto(directories);
@@ -1725,7 +1725,7 @@ public class DirectoryScanner
*
* @see #slowScan
*/
public synchronized String[] getDeselectedDirectories() {
public synchronized String[] getDeselectedDirectories() {
slowScan();
final String[] directories = new String[dirsDeselected.size()];
dirsDeselected.copyInto(directories);
@@ -1754,7 +1754,7 @@ public class DirectoryScanner
/**
* Add default exclusions to the current exclusions set.
*/
public synchronized void addDefaultExcludes() {
public synchronized void addDefaultExcludes() {
final int excludesLength = excludes == null ? 0 : excludes.length;
String[] newExcludes;
final String[] defaultExcludesTemp = getDefaultExcludes();
@@ -1777,7 +1777,7 @@ public class DirectoryScanner
* @return the resource with the given name.
* @since Ant 1.5.2
*/
public synchronized Resource getResource(final String name) {
public synchronized Resource getResource(final String name) {
return new FileResource(basedir, name);
}



+ 2
- 2
src/main/org/apache/tools/ant/ExtensionPoint.java View File

@@ -45,7 +45,7 @@ public class ExtensionPoint extends Target {
* Throws an exception.
*/
@Override
public final void addTask(Task task) {
public final void addTask(Task task) {
throw new BuildException(NO_CHILDREN_ALLOWED);
}

@@ -53,7 +53,7 @@ public class ExtensionPoint extends Target {
* Throws an exception.
*/
@Override
public final void addDataType(RuntimeConfigurable r) {
public final void addDataType(RuntimeConfigurable r) {
throw new BuildException(NO_CHILDREN_ALLOWED);
}



+ 21
- 22
src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -552,7 +552,7 @@ public final class IntrospectionHelper {
if (nestedElement != null) {
nc = new NestedCreator(null) {
@Override
Object create(final Project project, final Object parent, final Object ignore) {
Object create(final Project project, final Object parent, final Object ignore) {
return nestedElement;
}
};
@@ -608,7 +608,7 @@ public final class IntrospectionHelper {
* element instance, or if the creating method fails.
*/
@Deprecated
public Object createElement(final Project project, final Object parent, final String elementName)
public Object createElement(final Project project, final Object parent, final String elementName)
throws BuildException {
final NestedCreator nc = getNestedCreator(project, "", parent, elementName, null);
try {
@@ -1049,7 +1049,7 @@ public final class IntrospectionHelper {
if (java.lang.Object.class == reflectedArg) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException,
IllegalAccessException {
throw new BuildException(
@@ -1061,7 +1061,7 @@ public final class IntrospectionHelper {
if (java.lang.String.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException {
m.invoke(parent, (Object[]) new String[] {value});
}
@@ -1071,7 +1071,7 @@ public final class IntrospectionHelper {
if (java.lang.Character.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException {
if (value.length() == 0) {
throw new BuildException("The value \"\" is not a "
@@ -1085,7 +1085,7 @@ public final class IntrospectionHelper {
if (java.lang.Boolean.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException {
m.invoke(parent, (Object[]) new Boolean[] {
Project.toBoolean(value) ? Boolean.TRUE : Boolean.FALSE });
@@ -1096,7 +1096,7 @@ public final class IntrospectionHelper {
if (java.lang.Class.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException, BuildException {
try {
m.invoke(parent, new Object[] {Class.forName(value)});
@@ -1110,7 +1110,7 @@ public final class IntrospectionHelper {
if (java.io.File.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException {
m.invoke(parent, new Object[] {p.resolveFile(value)});
}
@@ -1120,7 +1120,7 @@ public final class IntrospectionHelper {
if (Resource.class.equals(reflectedArg) || FileProvider.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
void set(final Project p, final Object parent, final String value) throws InvocationTargetException,
void set(final Project p, final Object parent, final String value) throws InvocationTargetException,
IllegalAccessException, BuildException {
m.invoke(parent, new Object[] {new FileResource(p, p.resolveFile(value))});
};
@@ -1130,7 +1130,7 @@ public final class IntrospectionHelper {
if (EnumeratedAttribute.class.isAssignableFrom(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException, BuildException {
try {
final EnumeratedAttribute ea = (EnumeratedAttribute) reflectedArg.newInstance();
@@ -1151,7 +1151,7 @@ public final class IntrospectionHelper {
if (java.lang.Long.class.equals(reflectedArg)) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException, BuildException {
try {
m.invoke(parent, new Object[] {
@@ -1195,7 +1195,7 @@ public final class IntrospectionHelper {

return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException, BuildException {
try {
final Object[] args = finalIncludeProject
@@ -1229,14 +1229,13 @@ public final class IntrospectionHelper {
if (reflectedArg.isEnum()) {
return new AttributeSetter(m, arg) {
@Override
public void set(final Project p, final Object parent, final String value)
public void set(final Project p, final Object parent, final String value)
throws InvocationTargetException, IllegalAccessException,
BuildException {
Enum<?> setValue;
try {
@SuppressWarnings({ "unchecked", "rawtypes" })
final
Enum<?> enumValue = Enum.valueOf((Class<? extends Enum>) reflectedArg,
final Enum<?> enumValue = Enum.valueOf((Class<? extends Enum>) reflectedArg,
value);
setValue = enumValue;
} catch (final IllegalArgumentException e) {
@@ -1422,7 +1421,7 @@ public final class IntrospectionHelper {
}

@Override
Object create(final Project project, final Object parent, final Object ignore)
Object create(final Project project, final Object parent, final Object ignore)
throws InvocationTargetException, IllegalAccessException {
return getMethod().invoke(parent, new Object[] {});
}
@@ -1444,12 +1443,12 @@ public final class IntrospectionHelper {
}

@Override
boolean isPolyMorphic() {
boolean isPolyMorphic() {
return true;
}

@Override
Object create(final Project project, final Object parent, Object child)
Object create(final Project project, final Object parent, Object child)
throws InvocationTargetException, IllegalAccessException, InstantiationException {
if (child == null) {
child = constructor.newInstance(
@@ -1466,7 +1465,7 @@ public final class IntrospectionHelper {
}

@Override
void store(final Object parent, final Object child)
void store(final Object parent, final Object child)
throws InvocationTargetException, IllegalAccessException, InstantiationException {
if (behavior == ADD_CONFIGURED) {
istore(parent, child);
@@ -1565,7 +1564,7 @@ public final class IntrospectionHelper {

return new NestedCreator(methodAndObject.method) {
@Override
Object create(final Project project, final Object parent, final Object ignore)
Object create(final Project project, final Object parent, final Object ignore)
throws InvocationTargetException, IllegalAccessException {
if (!getMethod().getName().endsWith("Configured")) {
getMethod().invoke(parent, new Object[] {realObject});
@@ -1574,12 +1573,12 @@ public final class IntrospectionHelper {
}

@Override
Object getRealObject() {
Object getRealObject() {
return realObject;
}

@Override
void store(final Object parent, final Object child) throws InvocationTargetException,
void store(final Object parent, final Object child) throws InvocationTargetException,
IllegalAccessException, InstantiationException {
if (getMethod().getName().endsWith("Configured")) {
getMethod().invoke(parent, new Object[] {realObject});


+ 6
- 8
src/main/org/apache/tools/ant/Main.java View File

@@ -157,7 +157,7 @@ public class Main implements AntMain {
private final Map<Class<?>, List<String>> extraArguments = new HashMap<Class<?>, List<String>>();

private static final GetProperty NOPROPERTIES = new GetProperty() {
public Object getProperty(final String aName) {
public Object getProperty(final String aName) {
// No existing property takes precedence
return null;
}
@@ -207,7 +207,7 @@ public class Main implements AntMain {
*
* @since Ant 1.6
*/
public void startAnt(final String[] args, final Properties additionalUserProperties,
public void startAnt(final String[] args, final Properties additionalUserProperties,
final ClassLoader coreLoader) {

try {
@@ -305,7 +305,7 @@ public class Main implements AntMain {
* @deprecated since 1.6.x
*/
@Deprecated
protected Main(final String[] args) throws BuildException {
protected Main(final String[] args) throws BuildException {
processArgs(args);
}

@@ -684,7 +684,7 @@ public class Main implements AntMain {
* @return Parent file or null if none
*/
@Deprecated
private File getParentFile(final File file) {
private File getParentFile(final File file) {
final File parent = file.getParentFile();

if (parent != null && msgOutputLevel >= Project.MSG_VERBOSE) {
@@ -898,11 +898,9 @@ public class Main implements AntMain {
// resolve properties
final PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(project);
@SuppressWarnings({ "rawtypes", "unchecked" })
final
Map raw = new HashMap(definedProps);
final Map raw = new HashMap(definedProps);
@SuppressWarnings("unchecked")
final
Map<String, Object> props = raw;
final Map<String, Object> props = raw;

final ResolvePropertyMap resolver = new ResolvePropertyMap(project,
NOPROPERTIES, propertyHelper.getExpanders());


+ 23
- 23
src/main/org/apache/tools/ant/Project.java View File

@@ -92,7 +92,7 @@ public class Project implements ResourceFactory {
* Use {@link JavaEnvUtils#JAVA_1_0} instead.
*/
@Deprecated
public static final String JAVA_1_0 = JavaEnvUtils.JAVA_1_0;
public static final String JAVA_1_0 = JavaEnvUtils.JAVA_1_0;
/**
* Version constant for Java 1.1 .
*
@@ -100,7 +100,7 @@ public class Project implements ResourceFactory {
* Use {@link JavaEnvUtils#JAVA_1_1} instead.
*/
@Deprecated
public static final String JAVA_1_1 = JavaEnvUtils.JAVA_1_1;
public static final String JAVA_1_1 = JavaEnvUtils.JAVA_1_1;
/**
* Version constant for Java 1.2 .
*
@@ -108,7 +108,7 @@ public class Project implements ResourceFactory {
* Use {@link JavaEnvUtils#JAVA_1_2} instead.
*/
@Deprecated
public static final String JAVA_1_2 = JavaEnvUtils.JAVA_1_2;
public static final String JAVA_1_2 = JavaEnvUtils.JAVA_1_2;
/**
* Version constant for Java 1.3 .
*
@@ -116,7 +116,7 @@ public class Project implements ResourceFactory {
* Use {@link JavaEnvUtils#JAVA_1_3} instead.
*/
@Deprecated
public static final String JAVA_1_3 = JavaEnvUtils.JAVA_1_3;
public static final String JAVA_1_3 = JavaEnvUtils.JAVA_1_3;
/**
* Version constant for Java 1.4 .
*
@@ -124,7 +124,7 @@ public class Project implements ResourceFactory {
* Use {@link JavaEnvUtils#JAVA_1_4} instead.
*/
@Deprecated
public static final String JAVA_1_4 = JavaEnvUtils.JAVA_1_4;
public static final String JAVA_1_4 = JavaEnvUtils.JAVA_1_4;

/** Default filter start token. */
public static final String TOKEN_START = FilterSet.DEFAULT_TOKEN_START;
@@ -179,7 +179,7 @@ public class Project implements ResourceFactory {
messageLogged */
private final ThreadLocal<Boolean> isLoggingMessage = new ThreadLocal<Boolean>() {
@Override
protected Boolean initialValue() {
protected Boolean initialValue() {
return Boolean.FALSE;
}
};
@@ -713,7 +713,7 @@ public class Project implements ResourceFactory {
* @see #setDefault(String)
*/
@Deprecated
public void setDefaultTarget(final String defaultTarget) {
public void setDefaultTarget(final String defaultTarget) {
setDefault(defaultTarget);
}

@@ -798,7 +798,7 @@ public class Project implements ResourceFactory {
* @see FilterSet#addFilter(String,String)
*/
@Deprecated
public void addFilter(final String token, final String value) {
public void addFilter(final String token, final String value) {
if (token == null) {
return;
}
@@ -818,7 +818,7 @@ public class Project implements ResourceFactory {
* @see FilterSet#getFilterHash()
*/
@Deprecated
public Hashtable<String, String> getFilters() {
public Hashtable<String, String> getFilters() {
// we need to build the hashtable dynamically
return globalFilterSet.getFilterHash();
}
@@ -910,7 +910,7 @@ public class Project implements ResourceFactory {
* Use org.apache.tools.ant.util.JavaEnvUtils instead.
*/
@Deprecated
public static String getJavaVersion() {
public static String getJavaVersion() {
return JavaEnvUtils.getJavaVersion();
}

@@ -1461,7 +1461,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public File resolveFile(final String fileName, final File rootDir) {
public File resolveFile(final String fileName, final File rootDir) {
return FILE_UTILS.resolveFile(rootDir, fileName);
}

@@ -1501,7 +1501,7 @@ public class Project implements ResourceFactory {
* @see PathTokenizer
*/
@Deprecated
public static String translatePath(final String toProcess) {
public static String translatePath(final String toProcess) {
return FileUtils.translatePath(toProcess);
}

@@ -1519,7 +1519,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public void copyFile(final String sourceFile, final String destFile)
public void copyFile(final String sourceFile, final String destFile)
throws IOException {
FILE_UTILS.copyFile(sourceFile, destFile);
}
@@ -1540,7 +1540,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public void copyFile(final String sourceFile, final String destFile, final boolean filtering)
public void copyFile(final String sourceFile, final String destFile, final boolean filtering)
throws IOException {
FILE_UTILS.copyFile(sourceFile, destFile,
filtering ? globalFilters : null);
@@ -1565,7 +1565,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public void copyFile(final String sourceFile, final String destFile, final boolean filtering,
public void copyFile(final String sourceFile, final String destFile, final boolean filtering,
final boolean overwrite) throws IOException {
FILE_UTILS.copyFile(sourceFile, destFile,
filtering ? globalFilters : null, overwrite);
@@ -1595,7 +1595,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public void copyFile(final String sourceFile, final String destFile, final boolean filtering,
public void copyFile(final String sourceFile, final String destFile, final boolean filtering,
final boolean overwrite, final boolean preserveLastModified)
throws IOException {
FILE_UTILS.copyFile(sourceFile, destFile,
@@ -1616,7 +1616,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public void copyFile(final File sourceFile, final File destFile) throws IOException {
public void copyFile(final File sourceFile, final File destFile) throws IOException {
FILE_UTILS.copyFile(sourceFile, destFile);
}

@@ -1636,7 +1636,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public void copyFile(final File sourceFile, final File destFile, final boolean filtering)
public void copyFile(final File sourceFile, final File destFile, final boolean filtering)
throws IOException {
FILE_UTILS.copyFile(sourceFile, destFile,
filtering ? globalFilters : null);
@@ -1661,7 +1661,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public void copyFile(final File sourceFile, final File destFile, final boolean filtering,
public void copyFile(final File sourceFile, final File destFile, final boolean filtering,
final boolean overwrite) throws IOException {
FILE_UTILS.copyFile(sourceFile, destFile,
filtering ? globalFilters : null, overwrite);
@@ -1691,7 +1691,7 @@ public class Project implements ResourceFactory {
* @deprecated since 1.4.x
*/
@Deprecated
public void copyFile(final File sourceFile, final File destFile, final boolean filtering,
public void copyFile(final File sourceFile, final File destFile, final boolean filtering,
final boolean overwrite, final boolean preserveLastModified)
throws IOException {
FILE_UTILS.copyFile(sourceFile, destFile,
@@ -1714,7 +1714,7 @@ public class Project implements ResourceFactory {
* above 1.1.
*/
@Deprecated
public void setFileLastModified(final File file, final long time)
public void setFileLastModified(final File file, final long time)
throws BuildException {
FILE_UTILS.setFileLastModified(file, time);
log("Setting modification time for " + file, MSG_VERBOSE);
@@ -2443,7 +2443,7 @@ public class Project implements ResourceFactory {
* @return mapped value.
*/
@Override
public Object get(final Object key) {
public Object get(final Object key) {
Object o = getReal(key);
if (o instanceof UnknownElement) {
// Make sure that
@@ -2487,7 +2487,7 @@ public class Project implements ResourceFactory {
* @return the file resource.
* @since Ant 1.7
*/
public Resource getResource(final String name) {
public Resource getResource(final String name) {
return new FileResource(getBaseDir(), name);
}
}

+ 2
- 2
src/main/org/apache/tools/ant/filters/ConcatFilter.java View File

@@ -91,7 +91,7 @@ public final class ConcatFilter extends BaseParamFilterReader
* during reading
*/
@Override
public int read() throws IOException {
public int read() throws IOException {
// do the "singleton" initialization
if (!getInitialized()) {
initialize();
@@ -171,7 +171,7 @@ public final class ConcatFilter extends BaseParamFilterReader
* @return a new filter based on this configuration, but filtering
* the specified reader
*/
public Reader chain(final Reader rdr) {
public Reader chain(final Reader rdr) {
final ConcatFilter newFilter = new ConcatFilter(rdr);
newFilter.setPrepend(getPrepend());
newFilter.setAppend(getAppend());


+ 3
- 3
src/main/org/apache/tools/ant/launch/Launcher.java View File

@@ -35,8 +35,8 @@ import java.util.StringTokenizer;
*/
public class Launcher {

private Launcher() {
}
private Launcher() {
}

/**
* The Ant Home (installation) Directory property.
@@ -156,7 +156,7 @@ public class Launcher {

final URL url = Locator.fileToURL(element);
if (launchDiag) {
System.out.println("adding library URL: " + url);
System.out.println("adding library URL: " + url);
}
libPathURLs.add(url);
}


+ 3
- 3
src/main/org/apache/tools/ant/listener/AnsiColorLogger.java View File

@@ -208,9 +208,9 @@ public class AnsiColorLogger extends DefaultLogger {
*/
/** {@inheritDoc}. */
@Override
protected void printMessage(final String message,
final PrintStream stream,
final int priority) {
protected void printMessage(final String message,
final PrintStream stream,
final int priority) {
if (message != null && stream != null) {
if (!colorsSet) {
setColors();


+ 6
- 6
src/main/org/apache/tools/ant/listener/SilentLogger.java View File

@@ -28,34 +28,34 @@ import org.apache.tools.ant.DefaultLogger;
public class SilentLogger extends DefaultLogger {

@Override
public void buildStarted(BuildEvent event) {
public void buildStarted(BuildEvent event) {
// log nothing
}

@Override
public void buildFinished(BuildEvent event) {
public void buildFinished(BuildEvent event) {
if (event.getException() != null) {
super.buildFinished(event);
}
}

@Override
public void targetStarted(BuildEvent event) {
public void targetStarted(BuildEvent event) {
// log nothing
}

@Override
public void targetFinished(BuildEvent event) {
public void targetFinished(BuildEvent event) {
// log nothing
}

@Override
public void taskStarted(BuildEvent event) {
public void taskStarted(BuildEvent event) {
// log nothing
}

@Override
public void taskFinished(BuildEvent event) {
public void taskFinished(BuildEvent event) {
// log nothing
}



+ 6
- 6
src/main/org/apache/tools/ant/taskdefs/AntStructure.java View File

@@ -76,7 +76,7 @@ public class AntStructure extends Task {
* @exception BuildException if the DTD cannot be written.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {

if (output == null) {
throw new BuildException("output attribute is required", getLocation());
@@ -182,12 +182,12 @@ public class AntStructure extends Task {

private final Hashtable<String, String> visited = new Hashtable<String, String>();

public void printTail(final PrintWriter out) {
public void printTail(final PrintWriter out) {
visited.clear();
}

public void printHead(final PrintWriter out, final Project p, final Hashtable<String, Class<?>> tasks,
final Hashtable<String, Class<?>> types) {
public void printHead(final PrintWriter out, final Project p, final Hashtable<String, Class<?>> tasks,
final Hashtable<String, Class<?>> types) {
printHead(out, tasks.keys(), types.keys());
}

@@ -244,7 +244,7 @@ public class AntStructure extends Task {
/**
* Prints the definition for the target element.
*/
public void printTargetDecl(final PrintWriter out) {
public void printTargetDecl(final PrintWriter out) {
out.print("<!ELEMENT target (");
out.print(TASKS);
out.print(" | ");
@@ -277,7 +277,7 @@ public class AntStructure extends Task {
/**
* Print the definition for a given element.
*/
public void printElementDecl(final PrintWriter out, final Project p,
public void printElementDecl(final PrintWriter out, final Project p,
final String name, final Class<?> element) {

if (visited.containsKey(name)) {


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/BindTargets.java View File

@@ -64,7 +64,7 @@ public class BindTargets extends Task {
}

@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
if (extensionPoint == null) {
throw new BuildException("extensionPoint required", getLocation());
}


+ 21
- 23
src/main/org/apache/tools/ant/taskdefs/Copy.java View File

@@ -176,7 +176,7 @@ public class Copy extends Task {
* consistently let the Introspection mechanism work.
*/
@Deprecated
public void setPreserveLastModified(final String preserve) {
public void setPreserveLastModified(final String preserve) {
setPreserveLastModified(Project.toBoolean(preserve));
}

@@ -285,17 +285,17 @@ public class Copy extends Task {
this.includeEmpty = includeEmpty;
}

/**
* Set quiet mode. Used to hide messages when a file or directory to be
* copied does not exist.
*
* @param quiet
* whether or not to display error messages when a file or
* directory does not exist. Default is false.
*/
public void setQuiet(final boolean quiet) {
this.quiet = quiet;
}
/**
* Set quiet mode. Used to hide messages when a file or directory to be
* copied does not exist.
*
* @param quiet
* whether or not to display error messages when a file or
* directory does not exist. Default is false.
*/
public void setQuiet(final boolean quiet) {
this.quiet = quiet;
}

/**
* Set method of handling mappers that return multiple
@@ -429,7 +429,7 @@ public class Copy extends Task {
* @exception BuildException if an error occurs.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
final File savedFile = file; // may be altered in validateAttributes
final File savedDestFile = destFile;
final File savedDestDir = destDir;
@@ -823,16 +823,14 @@ public class Copy extends Task {
toCopy = new Resource[v.size()];
v.copyInto(toCopy);
} else {
toCopy = ResourceUtils.selectOutOfDateSources(
this,
fromResources,
mapper,
new ResourceFactory() {
public Resource getResource(final String name) {
return new FileResource(toDir, name);
}
},
granularity);
toCopy = ResourceUtils.selectOutOfDateSources(this, fromResources,
mapper,
new ResourceFactory() {
public Resource getResource(final String name) {
return new FileResource(toDir, name);
}
},
granularity);
}
for (int i = 0; i < toCopy.length; i++) {
final String[] mappedFiles = mapper.mapFileName(toCopy[i].getName());


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/EchoXML.java View File

@@ -116,7 +116,7 @@ public class EchoXML extends XMLFragment {
}
/** {@inheritDoc}. */
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {IGNORE, ELEMENTS, ALL};
}



+ 16
- 16
src/main/org/apache/tools/ant/taskdefs/Get.java View File

@@ -95,7 +95,7 @@ public class Get extends Task {
* @exception BuildException Thrown in unrecoverable error.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
checkAttributes();

for (final Resource r : sources) {
@@ -168,7 +168,7 @@ public class Get extends Task {
* @deprecated only gets the first configured resource
*/
@Deprecated
public boolean doGet(final int logLevel, final DownloadProgress progress)
public boolean doGet(final int logLevel, final DownloadProgress progress)
throws IOException {
checkAttributes();
for (final Resource r : sources) {
@@ -520,20 +520,20 @@ public class Get extends Task {
/**
* begin a download
*/
public void beginDownload() {
public void beginDownload() {
}

/**
* tick handler
*
*/
public void onTick() {
public void onTick() {
}

/**
* end a download
*/
public void endDownload() {
public void endDownload() {
}
}

@@ -557,7 +557,7 @@ public class Get extends Task {
/**
* begin a download
*/
public void beginDownload() {
public void beginDownload() {
dots = 0;
}

@@ -565,7 +565,7 @@ public class Get extends Task {
* tick handler
*
*/
public void onTick() {
public void onTick() {
out.print(".");
if (dots++ > DOTS_PER_LINE) {
out.flush();
@@ -576,7 +576,7 @@ public class Get extends Task {
/**
* end a download
*/
public void endDownload() {
public void endDownload() {
out.println();
out.flush();
}
@@ -612,7 +612,7 @@ public class Get extends Task {
}

@Override
public void run() {
public void run() {
try {
success = get();
} catch (final IOException ioex) {
@@ -762,12 +762,12 @@ public class Get extends Task {
return connection;
}

private boolean isMoved(final int responseCode) {
return responseCode == HttpURLConnection.HTTP_MOVED_PERM ||
responseCode == HttpURLConnection.HTTP_MOVED_TEMP ||
responseCode == HttpURLConnection.HTTP_SEE_OTHER ||
responseCode == HTTP_MOVED_TEMP;
}
private boolean isMoved(final int responseCode) {
return responseCode == HttpURLConnection.HTTP_MOVED_PERM ||
responseCode == HttpURLConnection.HTTP_MOVED_TEMP ||
responseCode == HttpURLConnection.HTTP_SEE_OTHER ||
responseCode == HTTP_MOVED_TEMP;
}

private boolean downloadFile()
throws FileNotFoundException, IOException {
@@ -792,7 +792,7 @@ public class Get extends Task {
}

if (GZIP_CONTENT_ENCODING.equals(connection.getContentEncoding())) {
is = new GZIPInputStream(is);
is = new GZIPInputStream(is);
}

os = new FileOutputStream(dest);


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/Input.java View File

@@ -130,7 +130,7 @@ public class Input extends Task {

/** {@inheritDoc} */
@Override
public String[] getValues() {
public String[] getValues() {
return VALUES;
}
private InputHandler getInputHandler() {
@@ -210,7 +210,7 @@ public class Input extends Task {
* @throws BuildException on error
*/
@Override
public void execute () throws BuildException {
public void execute () throws BuildException {
if (addproperty != null
&& getProject().getProperty(addproperty) != null) {
log("skipping " + getTaskName() + " as property " + addproperty


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Javac.java View File

@@ -912,7 +912,7 @@ public class Javac extends MatchingTask {
* @exception BuildException if an error occurs
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
checkParameters();
resetFileLists();



+ 9
- 10
src/main/org/apache/tools/ant/taskdefs/Javadoc.java View File

@@ -279,7 +279,7 @@ public class Javadoc extends Task {
* @return the package name.
*/
@Override
public String toString() {
public String toString() {
return getName();
}
}
@@ -364,7 +364,7 @@ public class Javadoc extends Task {
* @return the allowed values for the access type.
*/
@Override
public String[] getValues() {
public String[] getValues() {
// Protected first so if any GUI tool offers a default
// based on enum #0, it will be right.
return new String[] {"protected", "public", "package", "private"};
@@ -865,7 +865,7 @@ public class Javadoc extends Task {
* Use the {@link #setExtdirs(Path)} version.
*/
@Deprecated
public void setExtdirs(final String path) {
public void setExtdirs(final String path) {
cmd.createArgument().setValue("-extdirs");
cmd.createArgument().setValue(path);
}
@@ -1702,7 +1702,7 @@ public class Javadoc extends Task {
* @throws BuildException on error
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
checkTaskName();

final Vector<String> packagesToDoc = new Vector<String>();
@@ -1718,8 +1718,7 @@ public class Javadoc extends Task {
checkPackages(packagesToDoc, sourceDirs);

@SuppressWarnings("unchecked")
final
Vector<SourceFile> sourceFilesToDoc = (Vector<SourceFile>) sourceFiles.clone();
final Vector<SourceFile> sourceFilesToDoc = (Vector<SourceFile>) sourceFiles.clone();
addSourceFiles(sourceFilesToDoc);

checkPackagesToDoc(packagesToDoc, sourceFilesToDoc);
@@ -2370,8 +2369,7 @@ public class Javadoc extends Task {
private void parsePackages(final Vector<String> pn, final Path sp) {
final HashSet<String> addedPackages = new HashSet<String>();
@SuppressWarnings("unchecked")
final
Vector<DirSet> dirSets = (Vector<DirSet>) packageSets.clone();
final Vector<DirSet> dirSets = (Vector<DirSet>) packageSets.clone();

// for each sourcePath entry, add a directoryset with includes
// taken from packagenames attribute and nested package
@@ -2434,7 +2432,7 @@ public class Javadoc extends Task {
// are there any java files in this directory?
final File pd = new File(baseDir, dirs[i]);
final String[] files = pd.list(new FilenameFilter () {
public boolean accept(final File dir1, final String name) {
public boolean accept(final File dir1, final String name) {
return name.endsWith(".java")
|| (includeNoSourcePackages
&& name.equals("package.html"));
@@ -2576,8 +2574,9 @@ public class Javadoc extends Task {
//
private String queuedLine = null;
private boolean sawWarnings = false;

@Override
protected void processLine(final String line, final int messageLevel) {
protected void processLine(final String line, final int messageLevel) {
if (line.contains("warning")) {
sawWarnings = true;
}


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/MakeUrl.java View File

@@ -235,7 +235,7 @@ public class MakeUrl extends Task {
* if something goes wrong with the build
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
validate();
//now exit here if the property is already set
if (getProject().getProperty(property) != null) {


+ 8
- 8
src/main/org/apache/tools/ant/taskdefs/Manifest.java View File

@@ -167,7 +167,7 @@ public class Manifest {
* @return a hashcode based on the key and values.
*/
@Override
public int hashCode() {
public int hashCode() {
int hashCode = 0;

if (name != null) {
@@ -184,7 +184,7 @@ public class Manifest {
* @return true if the key and values are the same.
*/
@Override
public boolean equals(Object rhs) {
public boolean equals(Object rhs) {
if (rhs == null || rhs.getClass() != getClass()) {
return false;
}
@@ -721,7 +721,7 @@ public class Manifest {
* @since Ant 1.5.2
*/
@Override
public Object clone() {
public Object clone() {
Section cloned = new Section();
cloned.setName(name);
Enumeration<String> e = getAttributeKeys();
@@ -761,7 +761,7 @@ public class Manifest {
* @return a hash value based on the attributes.
*/
@Override
public int hashCode() {
public int hashCode() {
return attributes.hashCode();
}

@@ -771,7 +771,7 @@ public class Manifest {
* @return true if the attributes are the same.
*/
@Override
public boolean equals(Object rhs) {
public boolean equals(Object rhs) {
if (rhs == null || rhs.getClass() != getClass()) {
return false;
}
@@ -1061,7 +1061,7 @@ public class Manifest {
* appears in a Manifest file.
*/
@Override
public String toString() {
public String toString() {
StringWriter sw = new StringWriter();
try {
write(new PrintWriter(sw));
@@ -1100,7 +1100,7 @@ public class Manifest {
* @return a hashcode based on the version, main and sections.
*/
@Override
public int hashCode() {
public int hashCode() {
int hashCode = 0;

if (manifestVersion != null) {
@@ -1118,7 +1118,7 @@ public class Manifest {
* @return true if the version, main and sections are the same.
*/
@Override
public boolean equals(Object rhs) {
public boolean equals(Object rhs) {
if (rhs == null || rhs.getClass() != getClass()) {
return false;
}


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/PathConvert.java View File

@@ -169,7 +169,7 @@ public class PathConvert extends Task {
* @return the list of values for this enumerated attribute.
*/
@Override
public String[] getValues() {
public String[] getValues() {
return new String[]{"windows", "unix", "netware", "os/2", "tandem"};
}
}
@@ -227,7 +227,7 @@ public class PathConvert extends Task {
* @see #setTargetos(PathConvert.TargetOs)
*/
@Deprecated
public void setTargetos(String target) {
public void setTargetos(String target) {
TargetOs to = new TargetOs();
to.setValue(target);
setTargetos(to);
@@ -334,7 +334,7 @@ public class PathConvert extends Task {
* @throws BuildException if something is invalid.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
Resources savedPath = path;
String savedPathSep = pathSep; // may be altered in validateSetup
String savedDirSep = dirSep; // may be altered in validateSetup


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/ProjectHelperTask.java View File

@@ -40,7 +40,7 @@ public class ProjectHelperTask extends Task {
}

@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
ProjectHelperRepository repo = ProjectHelperRepository.getInstance();
for (Iterator it = projectHelpers.iterator(); it.hasNext();) {
ProjectHelper helper = (ProjectHelper) it.next();


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/Property.java View File

@@ -432,7 +432,7 @@ public class Property extends Task {
* @ant.attribute ignore="true"
*/
@Deprecated
public void setUserProperty(boolean userProperty) {
public void setUserProperty(boolean userProperty) {
log("DEPRECATED: Ignoring request to set user property in Property"
+ " task.", Project.MSG_WARN);
}
@@ -442,7 +442,7 @@ public class Property extends Task {
* @return the current value or the empty string
*/
@Override
public String toString() {
public String toString() {
return value == null ? "" : value;
}

@@ -453,7 +453,7 @@ public class Property extends Task {
* @throws BuildException on error
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
if (getProject() == null) {
throw new IllegalStateException("project has not been set");
}


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Redirector.java View File

@@ -71,7 +71,7 @@ public class Redirector {
}

@Override
public void close() throws IOException {
public void close() throws IOException {
synchronized (outMutex) {
if (!closed && !(appendOut && appendProperties)) {
setPropertyFromBAOS(this, property);


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Rmic.java View File

@@ -588,7 +588,7 @@ public class Rmic extends MatchingTask {
* if there's a problem with baseDir or RMIC
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
try {
compileList.clear();



+ 5
- 5
src/main/org/apache/tools/ant/taskdefs/SQLExec.java View File

@@ -91,7 +91,7 @@ public class SQLExec extends JDBCTask {
public static final String NORMAL = "normal", ROW = "row";
/** @return the enumerated strings */
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {NORMAL, ROW};
}
}
@@ -591,7 +591,7 @@ public class SQLExec extends JDBCTask {
* @throws BuildException on error.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
Vector savedTransaction = (Vector) transactions.clone();
String savedSqlCommand = sqlCommand;

@@ -853,7 +853,7 @@ public class SQLExec extends JDBCTask {
* @throws SQLException on SQL problems.
*/
@Deprecated
protected void printResults(PrintStream out) throws SQLException {
protected void printResults(PrintStream out) throws SQLException {
ResultSet rs = getStatement().getResultSet();
try {
printResults(rs, out);
@@ -958,7 +958,7 @@ public class SQLExec extends JDBCTask {
* expected RDBMS.</p>
*/
@Override
protected Connection getConnection() {
protected Connection getConnection() {
if (conn == null) {
conn = super.getConnection();
if (!isValidRdbms(conn)) {
@@ -993,7 +993,7 @@ public class SQLExec extends JDBCTask {
public static class OnError extends EnumeratedAttribute {
/** @return the enumerated values */
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {"continue", "stop", "abort"};
}
}


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Sleep.java View File

@@ -172,7 +172,7 @@ public class Sleep extends Task {
* @exception BuildException Description of Exception
*/
@Override
public void execute()
public void execute()
throws BuildException {
try {
validate();


+ 6
- 6
src/main/org/apache/tools/ant/taskdefs/SubAnt.java View File

@@ -99,7 +99,7 @@ public class SubAnt extends Task {
* @since Ant 1.6.2
*/
@Override
public void handleOutput(String output) {
public void handleOutput(String output) {
if (ant != null) {
ant.handleOutput(output);
} else {
@@ -123,7 +123,7 @@ public class SubAnt extends Task {
* @since Ant 1.6.2
*/
@Override
public int handleInput(byte[] buffer, int offset, int length)
public int handleInput(byte[] buffer, int offset, int length)
throws IOException {
if (ant != null) {
return ant.handleInput(buffer, offset, length);
@@ -140,7 +140,7 @@ public class SubAnt extends Task {
* @since Ant 1.6.2
*/
@Override
public void handleFlush(String output) {
public void handleFlush(String output) {
if (ant != null) {
ant.handleFlush(output);
} else {
@@ -156,7 +156,7 @@ public class SubAnt extends Task {
* @since Ant 1.6.2
*/
@Override
public void handleErrorOutput(String output) {
public void handleErrorOutput(String output) {
if (ant != null) {
ant.handleErrorOutput(output);
} else {
@@ -172,7 +172,7 @@ public class SubAnt extends Task {
* @since Ant 1.6.2
*/
@Override
public void handleErrorFlush(String output) {
public void handleErrorFlush(String output) {
if (ant != null) {
ant.handleErrorFlush(output);
} else {
@@ -184,7 +184,7 @@ public class SubAnt extends Task {
* Runs the various sub-builds.
*/
@Override
public void execute() {
public void execute() {
if (buildpath == null) {
throw new BuildException("No buildpath specified");
}


+ 6
- 6
src/main/org/apache/tools/ant/taskdefs/Sync.java View File

@@ -73,7 +73,7 @@ public class Sync extends Task {
* @see Task#init()
*/
@Override
public void init()
public void init()
throws BuildException {
// Instantiate it
myCopy = new MyCopy();
@@ -99,7 +99,7 @@ public class Sync extends Task {
* @see Task#execute()
*/
@Override
public void execute()
public void execute()
throws BuildException {
// The destination of the files to copy
File toDir = myCopy.getToDir();
@@ -467,7 +467,7 @@ public class Sync extends Task {
*/
/** {@inheritDoc} */
@Override
protected void scan(File fromDir, File toDir, String[] files,
protected void scan(File fromDir, File toDir, String[] files,
String[] dirs) {
assertTrue("No mapper", mapperElement == null);

@@ -486,7 +486,7 @@ public class Sync extends Task {
*/
/** {@inheritDoc} */
@Override
protected Map scan(Resource[] resources, File toDir) {
protected Map scan(Resource[] resources, File toDir) {
assertTrue("No mapper", mapperElement == null);

for (int i = 0; i < resources.length; i++) {
@@ -517,7 +517,7 @@ public class Sync extends Task {
* @since Ant 1.7
*/
@Override
protected boolean supportsNonFileResources() {
protected boolean supportsNonFileResources() {
return true;
}
}
@@ -549,7 +549,7 @@ public class Sync extends Task {
* @throws BuildException always
*/
@Override
public void setDir(File dir) throws BuildException {
public void setDir(File dir) throws BuildException {
throw new BuildException("preserveintarget doesn't support the dir "
+ "attribute");
}


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/War.java View File

@@ -152,7 +152,7 @@ public class War extends Jar {
* @throws BuildException if invalid configuration
*/
@Override
protected void initZipOutputStream(ZipOutputStream zOut)
protected void initZipOutputStream(ZipOutputStream zOut)
throws IOException, BuildException {
super.initZipOutputStream(zOut);
}
@@ -173,7 +173,7 @@ public class War extends Jar {
* @throws IOException on output error
*/
@Override
protected void zipFile(File file, ZipOutputStream zOut, String vPath,
protected void zipFile(File file, ZipOutputStream zOut, String vPath,
int mode)
throws IOException {
// If the file being added is WEB-INF/web.xml, we warn if it's
@@ -218,7 +218,7 @@ public class War extends Jar {
* gets executed.
*/
@Override
protected void cleanUp() {
protected void cleanUp() {
if (addedWebXmlFile == null
&& deploymentDescriptor == null
&& needxmlfile


+ 7
- 7
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -1234,7 +1234,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
xpathFactory = XPathFactory.newInstance();
xpath = xpathFactory.newXPath();
xpath.setXPathVariableResolver(new XPathVariableResolver() {
public Object resolveVariable(final QName variableName) {
public Object resolveVariable(final QName variableName) {
return getProject().getProperty(variableName.toString());
}
});
@@ -1248,7 +1248,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
* @deprecated since Ant 1.7
*/
@Deprecated
protected void configureLiaison(final File stylesheet) throws BuildException {
protected void configureLiaison(final File stylesheet) throws BuildException {
final FileResource fr = new FileResource();
fr.setProject(getProject());
fr.setFile(stylesheet);
@@ -1531,7 +1531,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
* @return null
* @throws BuildException never
*/
public Object createDynamicElement(final String name) throws BuildException {
public Object createDynamicElement(final String name) throws BuildException {
return null;
}

@@ -1542,7 +1542,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
* @param value the value of the attribute
* @throws BuildException on error
*/
public void setDynamicAttribute(final String name, final String value) throws BuildException {
public void setDynamicAttribute(final String name, final String value) throws BuildException {
// only 'name' and 'value' exist.
if ("name".equalsIgnoreCase(name)) {
this.name = value;
@@ -1577,11 +1577,11 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
* @since Ant 1.6.2
*/
private class StyleMapper implements FileNameMapper {
public void setFrom(final String from) {
public void setFrom(final String from) {
}
public void setTo(final String to) {
public void setTo(final String to) {
}
public String[] mapFileName(String xmlFile) {
public String[] mapFileName(String xmlFile) {
final int dotPos = xmlFile.lastIndexOf('.');
if (dotPos > 0) {
xmlFile = xmlFile.substring(0, dotPos);


+ 13
- 13
src/main/org/apache/tools/ant/taskdefs/Zip.java View File

@@ -105,14 +105,14 @@ public class Zip extends MatchingTask {

private static final ResourceSelector MISSING_SELECTOR =
new ResourceSelector() {
public boolean isSelected(final Resource target) {
public boolean isSelected(final Resource target) {
return !target.isExists();
}
};

private static final ResourceUtils.ResourceSelectorProvider
MISSING_DIR_PROVIDER = new ResourceUtils.ResourceSelectorProvider() {
public ResourceSelector
public ResourceSelector
getTargetSelectorForSource(final Resource sr) {
return MISSING_SELECTOR;
}
@@ -238,7 +238,7 @@ public class Zip extends MatchingTask {
* @ant.attribute ignore="true"
*/
@Deprecated
public void setZipfile(final File zipFile) {
public void setZipfile(final File zipFile) {
setDestFile(zipFile);
}

@@ -252,7 +252,7 @@ public class Zip extends MatchingTask {
* @ant.attribute ignore="true"
*/
@Deprecated
public void setFile(final File file) {
public void setFile(final File file) {
setDestFile(file);
}

@@ -386,7 +386,7 @@ public class Zip extends MatchingTask {
* @return the values
*/
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {"fail", "skip", "create"};
}
}
@@ -585,7 +585,7 @@ public class Zip extends MatchingTask {
* @throws BuildException on error
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {

if (doubleFilePass) {
skipWriting = true;
@@ -1290,7 +1290,7 @@ public class Zip extends MatchingTask {
*/
private static final ThreadLocal<Boolean> HAVE_NON_FILE_SET_RESOURCES_TO_ADD = new ThreadLocal<Boolean>() {
@Override
protected Boolean initialValue() {
protected Boolean initialValue() {
return Boolean.FALSE;
}
};
@@ -1635,7 +1635,7 @@ public class Zip extends MatchingTask {
// make sure directories are in alpha-order - this also
// ensures parents come before their children
Collections.sort(dirs, new Comparator<Resource>() {
public int compare(final Resource r1, final Resource r2) {
public int compare(final Resource r1, final Resource r2) {
return r1.getName().compareTo(r2.getName());
}
});
@@ -2037,7 +2037,7 @@ public class Zip extends MatchingTask {
protected Resource[] selectFileResources(final Resource[] orig) {
return selectResources(orig,
new ResourceSelector() {
public boolean isSelected(final Resource r) {
public boolean isSelected(final Resource r) {
if (!r.isDirectory()) {
return true;
} else if (doFilesonly) {
@@ -2061,7 +2061,7 @@ public class Zip extends MatchingTask {
protected Resource[] selectDirectoryResources(final Resource[] orig) {
return selectResources(orig,
new ResourceSelector() {
public boolean isSelected(final Resource r) {
public boolean isSelected(final Resource r) {
return r.isDirectory();
}
});
@@ -2114,7 +2114,7 @@ public class Zip extends MatchingTask {
*/
/** {@inheritDoc} */
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {"add", "preserve", "fail"};
}
}
@@ -2191,7 +2191,7 @@ public class Zip extends MatchingTask {
}

@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {NEVER_KEY, ALWAYS_KEY, N_E_KEY};
}

@@ -2250,7 +2250,7 @@ public class Zip extends MatchingTask {
}

@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {NEVER_KEY, ALWAYS_KEY, A_N_KEY};
}



+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/compilers/AptCompilerAdapter.java View File

@@ -157,7 +157,7 @@ public class AptCompilerAdapter extends DefaultCompilerAdapter {
* @return true on success.
* @throws BuildException if the compilation has problems.
*/
public boolean execute() throws BuildException {
public boolean execute() throws BuildException {
attributes.log("Using apt compiler", Project.MSG_VERBOSE);
//set up the javac options
final Commandline cmd = setupModernJavacCommand();


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java View File

@@ -97,7 +97,7 @@ public abstract class DefaultCompilerAdapter
*
* @param attributes a configured Javac task.
*/
public void setJavac(final Javac attributes) {
public void setJavac(final Javac attributes) {
this.attributes = attributes;
src = attributes.getSrcdir();
destDir = attributes.getDestdir();
@@ -135,7 +135,7 @@ public abstract class DefaultCompilerAdapter
* but specialized compilers can recognize multiple kinds
* of files.
*/
public String[] getSupportedFileExtensions() {
public String[] getSupportedFileExtensions() {
return new String[] {"java"};
}

@@ -523,7 +523,7 @@ public abstract class DefaultCompilerAdapter
* Use org.apache.tools.ant.types.Path#addExtdirs instead.
*/
@Deprecated
protected void addExtdirsToClasspath(final Path classpath) {
protected void addExtdirsToClasspath(final Path classpath) {
classpath.addExtdirs(extdirs);
}



+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/condition/IsReachable.java View File

@@ -139,7 +139,7 @@ public class IsReachable extends ProjectComponent implements Condition {
* @throws org.apache.tools.ant.BuildException
* if an error occurs
*/
public boolean eval() throws BuildException {
public boolean eval() throws BuildException {
if (empty(host) && empty(url)) {
throw new BuildException(ERROR_NO_HOSTNAME);
}


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/cvslib/CvsTagDiff.java View File

@@ -168,7 +168,7 @@ public class CvsTagDiff extends AbstractCvsTask {
* @param p the name of the package to analyse
*/
@Override
public void setPackage(String p) {
public void setPackage(String p) {
mypackage = p;
}

@@ -235,7 +235,7 @@ public class CvsTagDiff extends AbstractCvsTask {
* @exception BuildException if an error occurs
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
// validate the input parameters
validate();



+ 4
- 4
src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java View File

@@ -156,7 +156,7 @@ public class PropertyFile extends Task {
* @throws BuildException on error.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
checkParameters();
readFile();
executeOperation();
@@ -616,7 +616,7 @@ public class PropertyFile extends Task {

/** {@inheritDoc}. */
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {"+", "-", "=", "del"};
}

@@ -652,7 +652,7 @@ public class PropertyFile extends Task {

/** {@inheritDoc} */
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {"int", "date", "string"};
}

@@ -719,7 +719,7 @@ public class PropertyFile extends Task {

/** {@inheritDoc}. */
@Override
public String[] getValues() {
public String[] getValues() {
return UNITS;
}
}


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java View File

@@ -466,7 +466,7 @@ public class ReplaceRegExp extends Task {
* @throws BuildException is there is a problem in the task execution.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
if (regex == null) {
throw new BuildException("No expression to match.");
}


+ 11
- 11
src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java View File

@@ -143,7 +143,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* @param stylesheet a <code>File</code> value
* @throws Exception on error
*/
public void setStylesheet(final File stylesheet) throws Exception {
public void setStylesheet(final File stylesheet) throws Exception {
final FileResource fr = new FileResource();
fr.setProject(project);
fr.setFile(stylesheet);
@@ -155,7 +155,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* @param stylesheet a {@link org.apache.tools.ant.types.Resource} value
* @throws Exception on error
*/
public void setStylesheet(final Resource stylesheet) throws Exception {
public void setStylesheet(final Resource stylesheet) throws Exception {
if (this.stylesheet != null) {
// resetting the stylesheet - reset transformer
transformer = null;
@@ -175,7 +175,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* @param outfile the result file
* @throws Exception on error
*/
public void transform(final File infile, final File outfile) throws Exception {
public void transform(final File infile, final File outfile) throws Exception {
if (transformer == null) {
createTransformer();
}
@@ -504,7 +504,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* @param name the name of the parameter
* @param value the value of the parameter
*/
public void addParam(final String name, final String value) {
public void addParam(final String name, final String value) {
params.put(name, value);
}

@@ -514,7 +514,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* @param value the value of the parameter
* @since Ant 1.9.3
*/
public void addParam(final String name, final Object value) {
public void addParam(final String name, final Object value) {
params.put(name, value);
}

@@ -522,7 +522,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* Set a logger.
* @param l a logger.
*/
public void setLogger(final XSLTLogger l) {
public void setLogger(final XSLTLogger l) {
logger = l;
}

@@ -530,7 +530,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* Log an error.
* @param e the exception to log.
*/
public void error(final TransformerException e) {
public void error(final TransformerException e) {
logError(e, "Error");
}

@@ -538,7 +538,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* Log a fatal error.
* @param e the exception to log.
*/
public void fatalError(final TransformerException e) {
public void fatalError(final TransformerException e) {
logError(e, "Fatal Error");
throw new BuildException("Fatal error during transformation using " + stylesheet + ": " + e.getMessageAndLocation(), e);
}
@@ -547,7 +547,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* Log a warning.
* @param e the exception to log.
*/
public void warning(final TransformerException e) {
public void warning(final TransformerException e) {
if (!suppressWarnings) {
logError(e, "Warning");
}
@@ -602,7 +602,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* Use org.apache.tools.ant.util.JAXPUtils#getSystemId instead.
*/
@Deprecated
protected String getSystemId(final File file) {
protected String getSystemId(final File file) {
return JAXPUtils.getSystemId(file);
}

@@ -612,7 +612,7 @@ public class TraXLiaison implements XSLTLiaison4, ErrorListener, XSLTLoggerAware
* @param xsltTask the XSLTProcess task instance from which this liasion
* is to be configured.
*/
public void configure(final XSLTProcess xsltTask) {
public void configure(final XSLTProcess xsltTask) {
project = xsltTask.getProject();
final XSLTProcess.Factory factory = xsltTask.getFactory();
if (factory != null) {


+ 0
- 1
src/main/org/apache/tools/ant/taskdefs/optional/Xalan2TraceSupport.java View File

@@ -28,7 +28,6 @@ import org.apache.tools.ant.taskdefs.XSLTProcess;
import org.apache.xalan.trace.PrintTraceListener;
import org.apache.xalan.transformer.TransformerImpl;


/**
* Sets up trace support for a given transformer.
*


+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodTypeCPInfo.java View File

@@ -44,7 +44,7 @@ public class MethodTypeCPInfo extends ConstantCPInfo {
* the stream.
*/
@Override
public void read(final DataInputStream cpStream) throws IOException {
public void read(final DataInputStream cpStream) throws IOException {
methodDescriptorIndex = cpStream.readUnsignedShort();
}

@@ -56,7 +56,7 @@ public class MethodTypeCPInfo extends ConstantCPInfo {
* and against which this entry is to be resolved.
*/
@Override
public void resolve(final ConstantPool constantPool) {
public void resolve(final ConstantPool constantPool) {
final Utf8CPInfo methodClass
= (Utf8CPInfo) constantPool.getEntry(methodDescriptorIndex);
methodClass.resolve(constantPool);
@@ -69,7 +69,7 @@ public class MethodTypeCPInfo extends ConstantCPInfo {
* @return the string representation of this constant pool entry.
*/
@Override
public String toString() {
public String toString() {
if (!isResolved()) {
return "MethodDescriptorIndex: " + methodDescriptorIndex;
} else {


+ 7
- 7
src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetDeploymentTool.java View File

@@ -167,7 +167,7 @@ public class IPlanetDeploymentTool extends GenericDeploymentTool {
* ignored.
*/
@Override
public void setGenericJarSuffix(String inString) {
public void setGenericJarSuffix(String inString) {
log("Since a generic JAR file is not created during processing, the "
+ "iPlanet Deployment Tool does not support the "
+ "\"genericjarsuffix\" attribute. It will be ignored.",
@@ -176,7 +176,7 @@ public class IPlanetDeploymentTool extends GenericDeploymentTool {

/** {@inheritDoc}. */
@Override
public void processDescriptor(String descriptorName, SAXParser saxParser) {
public void processDescriptor(String descriptorName, SAXParser saxParser) {
this.descriptorName = descriptorName;
this.iasDescriptorName = null;

@@ -196,7 +196,7 @@ public class IPlanetDeploymentTool extends GenericDeploymentTool {
* @throws BuildException If the user selections are invalid.
*/
@Override
protected void checkConfiguration(String descriptorFileName,
protected void checkConfiguration(String descriptorFileName,
SAXParser saxParser) throws BuildException {

int startOfName = descriptorFileName.lastIndexOf(File.separatorChar) + 1;
@@ -240,7 +240,7 @@ public class IPlanetDeploymentTool extends GenericDeploymentTool {
* exception
*/
@Override
protected Hashtable parseEjbFiles(String descriptorFileName,
protected Hashtable parseEjbFiles(String descriptorFileName,
SAXParser saxParser) throws IOException, SAXException {

Hashtable files;
@@ -313,7 +313,7 @@ public class IPlanetDeploymentTool extends GenericDeploymentTool {
* @param ddPrefix not used
*/
@Override
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) {
protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) {
ejbFiles.put(META_DIR + IAS_DD, new File(getConfig().descriptorDir,
getIasDescriptorName()));
}
@@ -328,7 +328,7 @@ public class IPlanetDeploymentTool extends GenericDeploymentTool {
* @return File representing the JAR file which will be written.
*/
@Override
File getVendorOutputJarFile(String baseName) {
File getVendorOutputJarFile(String baseName) {
File jarFile = new File(getDestDir(), baseName + jarSuffix);
log("JAR file name: " + jarFile.toString(), Project.MSG_VERBOSE);
return jarFile;
@@ -342,7 +342,7 @@ public class IPlanetDeploymentTool extends GenericDeploymentTool {
* @return <code>null</code>.
*/
@Override
protected String getPublicId() {
protected String getPublicId() {
return null;
}



+ 3
- 3
src/main/org/apache/tools/ant/taskdefs/optional/extension/ExtensionSet.java View File

@@ -114,7 +114,7 @@ public class ExtensionSet
* @exception BuildException if this instance already has been configured.
*/
@Override
public void setRefid(final Reference reference)
public void setRefid(final Reference reference)
throws BuildException {
if (!extensions.isEmpty() || !extensionsFilesets.isEmpty()) {
throw tooManyAttributes();
@@ -123,7 +123,7 @@ public class ExtensionSet
}

@Override
protected synchronized void dieOnCircularReference(Stack stk, Project p)
protected synchronized void dieOnCircularReference(Stack stk, Project p)
throws BuildException {
if (isChecked()) {
return;
@@ -147,7 +147,7 @@ public class ExtensionSet
* @return the extensions in a string.
*/
@Override
public String toString() {
public String toString() {
return "ExtensionSet" + Arrays.asList(toExtensions(getProject()));
}
}

+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/optional/junit/Constants.java View File

@@ -23,8 +23,8 @@ package org.apache.tools.ant.taskdefs.optional.junit;
*/
public class Constants {

private Constants() {
}
private Constants() {
}

static final String METHOD_NAMES = "methods=";
static final String HALT_ON_ERROR = "haltOnError=";


+ 5
- 5
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnit4TestMethodAdapter.java View File

@@ -87,7 +87,7 @@ public class JUnit4TestMethodAdapter implements Test {
runner = request.getRunner();
}

public int countTestCases() {
public int countTestCases() {
return runner.testCount();
}

@@ -103,12 +103,12 @@ public class JUnit4TestMethodAdapter implements Test {
return testClass;
}

public void run(final TestResult result) {
public void run(final TestResult result) {
runner.run(cache.getNotifier(result));
}

@Override
public String toString() {
public String toString() {
String testClassName = testClass.getName();
StringBuilder buf = new StringBuilder(testClassName.length()
+ 12 * methodNames.length)
@@ -146,7 +146,7 @@ public class JUnit4TestMethodAdapter implements Test {
}

@Override
public boolean shouldRun(Description description) {
public boolean shouldRun(Description description) {
if (methodNames.length == 0) {
return false;
}
@@ -171,7 +171,7 @@ public class JUnit4TestMethodAdapter implements Test {
}

@Override
public String describe() {
public String describe() {
StringBuilder buf = new StringBuilder(40);
if (methodNames.length == 0) {
buf.append("No methods");


+ 15
- 15
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java View File

@@ -365,7 +365,7 @@ public class JUnitTask extends Task {
* @return array of allowed values
*/
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {"true", "yes", "false", "no",
"on", "off", "withOutAndErr"};
}
@@ -457,7 +457,7 @@ public class JUnitTask extends Task {
* @param sysp environment variable to add
*/
@Deprecated
public void addSysproperty(final Environment.Variable sysp) {
public void addSysproperty(final Environment.Variable sysp) {

getCommandline().addSysproperty(sysp);
}
@@ -735,7 +735,7 @@ public class JUnitTask extends Task {
* @since Ant 1.4
*/
@Override
public void init() {
public void init() {
antRuntimeClasses = new Path(getProject());
splitJUnit = !addClasspathResource("/junit/framework/TestCase.class");
addClasspathEntry("/org/apache/tools/ant/launch/AntMain.class");
@@ -782,7 +782,7 @@ public class JUnitTask extends Task {
path.add(extra);
}
mirrorLoader = (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
public Object run() {
return new SplitClassLoader(myLoader, path, getProject(),
new String[] {
"BriefJUnitResultFormatter",
@@ -816,7 +816,7 @@ public class JUnitTask extends Task {
* @since Ant 1.2
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
checkMethodLists();

setupJUnitDelegate();
@@ -870,7 +870,7 @@ public class JUnitTask extends Task {
this.id = id;
}

public void run() {
public void run() {
try {
masterTask.oneJunitThread(iterator, id);
} catch (final BuildException b) {
@@ -1441,7 +1441,7 @@ public class JUnitTask extends Task {
* @since Ant 1.5
*/
@Override
protected void handleOutput(final String output) {
protected void handleOutput(final String output) {
if (output.startsWith(TESTLISTENER_PREFIX)) {
log(output, Project.MSG_VERBOSE);
} else if (runner != null) {
@@ -1471,7 +1471,7 @@ public class JUnitTask extends Task {
* @since Ant 1.6
*/
@Override
protected int handleInput(final byte[] buffer, final int offset, final int length)
protected int handleInput(final byte[] buffer, final int offset, final int length)
throws IOException {
if (runner != null) {
return runner.handleInput(buffer, offset, length);
@@ -1489,7 +1489,7 @@ public class JUnitTask extends Task {
* @since Ant 1.5.2
*/
@Override
protected void handleFlush(final String output) {
protected void handleFlush(final String output) {
if (runner != null) {
runner.handleFlush(output);
if (showOutput) {
@@ -1508,7 +1508,7 @@ public class JUnitTask extends Task {
* @since Ant 1.5
*/
@Override
public void handleErrorOutput(final String output) {
public void handleErrorOutput(final String output) {
if (runner != null) {
runner.handleErrorOutput(output);
if (showOutput) {
@@ -1528,7 +1528,7 @@ public class JUnitTask extends Task {
* @since Ant 1.5.2
*/
@Override
public void handleErrorFlush(final String output) {
public void handleErrorFlush(final String output) {
if (runner != null) {
runner.handleErrorFlush(output);
if (showOutput) {
@@ -2009,7 +2009,7 @@ public class JUnitTask extends Task {
* @return true if everything is equal
*/
@Override
public boolean equals(final Object other) {
public boolean equals(final Object other) {
if (other == null
|| other.getClass() != ForkedTestConfiguration.class) {
return false;
@@ -2034,7 +2034,7 @@ public class JUnitTask extends Task {
* @return hash code value
*/
@Override
public int hashCode() {
public int hashCode() {
// CheckStyle:MagicNumber OFF
return (filterTrace ? 1 : 0)
+ (haltOnError ? 2 : 0)
@@ -2078,7 +2078,7 @@ public class JUnitTask extends Task {

/** {@inheritDoc}. */
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {ONCE, PER_TEST, PER_BATCH};
}
}
@@ -2216,7 +2216,7 @@ public class JUnitTask extends Task {
* @param level the logging level to use.
*/
@Override
protected void processLine(final String line, final int level) {
protected void processLine(final String line, final int level) {
if (line.startsWith(TESTLISTENER_PREFIX)) {
task.log(line, Project.MSG_VERBOSE);
} else {


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTest.java View File

@@ -170,7 +170,7 @@ public class JUnitTest extends BaseTest implements Cloneable {
/**
* Set the thread id
* @param thread the Ant id of the thread running this test
* (this is not the system process or thread id)
* (this is not the system process or thread id)
* (this will be 0 in single-threaded mode).
* @since Ant 1.9.4
*/
@@ -528,7 +528,7 @@ public class JUnitTest extends BaseTest implements Cloneable {
* @return a clone of this test.
*/
@Override
public Object clone() {
public Object clone() {
try {
JUnitTest t = (JUnitTest) super.clone();
t.props = props == null ? null : (Properties) props.clone();


+ 27
- 27
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java View File

@@ -311,7 +311,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
return new PrintStream(
new OutputStream() {
@Override
public void write(final int b) {
public void write(final int b) {
}
});
}
@@ -355,7 +355,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
/**
* Run the test.
*/
public void run() {
public void run() {
res = new IgnoredTestResult();
res.addListener(wrapListener(this));
final int size = formatters.size();
@@ -677,7 +677,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
*
* @return 2 if errors occurred, 1 if tests failed else 0.
*/
public int getRetCode() {
public int getRetCode() {
return retCode;
}

@@ -687,7 +687,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
* <p>A new Test is started.
* @param t the test.
*/
public void startTest(final Test t) {
public void startTest(final Test t) {
final String testName = JUnitVersionHelper.getTestCaseName(t);
logTestListenerEvent("startTest(" + testName + ")");
}
@@ -698,7 +698,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
* <p>A Test is finished.
* @param test the test.
*/
public void endTest(final Test test) {
public void endTest(final Test test) {
final String testName = JUnitVersionHelper.getTestCaseName(test);
logTestListenerEvent("endTest(" + testName + ")");
}
@@ -741,7 +741,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
* @param test the test.
* @param t the assertion thrown by the test.
*/
public void addFailure(final Test test, final AssertionFailedError t) {
public void addFailure(final Test test, final AssertionFailedError t) {
addFailure(test, (Throwable) t);
}

@@ -752,7 +752,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
* @param test the test.
* @param t the error thrown by the test.
*/
public void addError(final Test test, final Throwable t) {
public void addError(final Test test, final Throwable t) {
final String testName = JUnitVersionHelper.getTestCaseName(test);
logTestListenerEvent("addError(" + testName + ", " + t.getMessage() + ")");
if (haltOnError) {
@@ -765,7 +765,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
* @since Ant 1.6
* @param permissions the permissions to use.
*/
public void setPermissions(final Permissions permissions) {
public void setPermissions(final Permissions permissions) {
perm = permissions;
}

@@ -773,7 +773,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
* Handle a string destined for standard output.
* @param output the string to output
*/
public void handleOutput(final String output) {
public void handleOutput(final String output) {
if (!logTestListenerEvents && output.startsWith(JUnitTask.TESTLISTENER_PREFIX)) {
// ignore
} else if (systemOut != null) {
@@ -792,27 +792,27 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
*
* @since Ant 1.6
*/
public int handleInput(final byte[] buffer, final int offset, final int length)
public int handleInput(final byte[] buffer, final int offset, final int length)
throws IOException {
return -1;
}

/** {@inheritDoc}. */
public void handleErrorOutput(final String output) {
public void handleErrorOutput(final String output) {
if (systemError != null) {
systemError.print(output);
}
}

/** {@inheritDoc}. */
public void handleFlush(final String output) {
public void handleFlush(final String output) {
if (systemOut != null) {
systemOut.print(output);
}
}

/** {@inheritDoc}. */
public void handleErrorFlush(final String output) {
public void handleErrorFlush(final String output) {
if (systemError != null) {
systemError.print(output);
}
@@ -854,7 +854,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
}

/** {@inheritDoc}. */
public void addFormatter(final JUnitTaskMirror.JUnitResultFormatterMirror f) {
public void addFormatter(final JUnitTaskMirror.JUnitResultFormatterMirror f) {
formatters.addElement(f);
}

@@ -1045,31 +1045,31 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
final JUnitTest test) {
runner.addFormatter(new JUnitResultFormatter() {

public void startTestSuite(final JUnitTest suite) throws BuildException {
public void startTestSuite(final JUnitTest suite) throws BuildException {
}

public void endTestSuite(final JUnitTest suite) throws BuildException {
public void endTestSuite(final JUnitTest suite) throws BuildException {
}

public void setOutput(final OutputStream out) {
public void setOutput(final OutputStream out) {
}

public void setSystemOutput(final String out) {
public void setSystemOutput(final String out) {
}

public void setSystemError(final String err) {
public void setSystemError(final String err) {
}

public void addError(final Test arg0, final Throwable arg1) {
public void addError(final Test arg0, final Throwable arg1) {
}

public void addFailure(final Test arg0, final AssertionFailedError arg1) {
public void addFailure(final Test arg0, final AssertionFailedError arg1) {
}

public void endTest(final Test arg0) {
public void endTest(final Test arg0) {
}

public void startTest(final Test arg0) {
public void startTest(final Test arg0) {
registerTestCase(JUnitVersionHelper.getTestCaseName(arg0));
}
});
@@ -1226,7 +1226,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
private TestListenerWrapper wrapListener(final TestListener testListener) {
return new TestListenerWrapper(testListener) {
@Override
public void addError(final Test test, final Throwable t) {
public void addError(final Test test, final Throwable t) {
if (junit4 && t instanceof AssertionFailedError) {
// JUnit 4 does not distinguish between errors and failures
// even in the JUnit 3 adapter.
@@ -1247,7 +1247,7 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
}
}
@Override
public void addFailure(final Test test, final AssertionFailedError t) {
public void addFailure(final Test test, final AssertionFailedError t) {
testListener.addFailure(test, t);
}
public void addFailure(final Test test, final Throwable t) { // pre-3.4
@@ -1258,11 +1258,11 @@ public class JUnitTestRunner implements TestListener, JUnitTaskMirror.JUnitTestR
}
}
@Override
public void endTest(final Test test) {
public void endTest(final Test test) {
testListener.endTest(test);
}
@Override
public void startTest(final Test test) {
public void startTest(final Test test) {
testListener.startTest(test);
}
};


+ 12
- 12
src/main/org/apache/tools/ant/taskdefs/optional/junit/TearDownOnVmCrash.java View File

@@ -43,7 +43,7 @@ public class TearDownOnVmCrash implements JUnitResultFormatter {
* Records the suite's name to later determine the class to invoke
* tearDown on.
*/
public void startTestSuite(final JUnitTest suite) {
public void startTestSuite(final JUnitTest suite) {
suiteName = suite.getName();
if (suiteName != null &&
suiteName.endsWith(JUnitTask.NAME_OF_DUMMY_TEST)) {
@@ -57,7 +57,7 @@ public class TearDownOnVmCrash implements JUnitResultFormatter {
* test we get when a Batch fails and the error is an actual
* error generated by Ant.
*/
public void addError(final Test fakeTest, final Throwable t) {
public void addError(final Test fakeTest, final Throwable t) {
if (suiteName != null
&& fakeTest instanceof JUnitTaskMirrorImpl.VmExitErrorTest) {
tearDown();
@@ -67,19 +67,19 @@ public class TearDownOnVmCrash implements JUnitResultFormatter {
// no need to implement the rest
public void addFailure(Test test, Throwable t) {}

public void addFailure(Test test, AssertionFailedError t) {}
public void addFailure(Test test, AssertionFailedError t) {}

public void startTest(Test test) {}
public void startTest(Test test) {}

public void endTest(Test test) {}
public void endTest(Test test) {}

public void endTestSuite(JUnitTest suite) {}
public void endTestSuite(JUnitTest suite) {}

public void setOutput(OutputStream out) {}
public void setOutput(OutputStream out) {}

public void setSystemOutput(String out) {}
public void setSystemOutput(String out) {}

public void setSystemError(String err) {}
public void setSystemError(String err) {}

private void tearDown() {
try {
@@ -91,7 +91,7 @@ public class TearDownOnVmCrash implements JUnitResultFormatter {
testClass = Thread.currentThread().getContextClassLoader()
.loadClass(suiteName);
} catch (ClassNotFoundException cnfe) {
// ignore
// ignore
}
}
if (testClass == null && getClass().getClassLoader() != null) {
@@ -99,7 +99,7 @@ public class TearDownOnVmCrash implements JUnitResultFormatter {
testClass =
getClass().getClassLoader().loadClass(suiteName);
} catch (ClassNotFoundException cnfe) {
// ignore
// ignore
}
}
if (testClass == null) {
@@ -141,4 +141,4 @@ public class TearDownOnVmCrash implements JUnitResultFormatter {
+ " tearDown: " + t.getMessage());
}
}
}
}

+ 13
- 13
src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java View File

@@ -113,17 +113,17 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
}

/** {@inheritDoc}. */
public void setOutput(final OutputStream out) {
public void setOutput(final OutputStream out) {
this.out = out;
}

/** {@inheritDoc}. */
public void setSystemOutput(final String out) {
public void setSystemOutput(final String out) {
formatOutput(SYSTEM_OUT, out);
}

/** {@inheritDoc}. */
public void setSystemError(final String out) {
public void setSystemError(final String out) {
formatOutput(SYSTEM_ERR, out);
}

@@ -131,7 +131,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
* The whole testsuite started.
* @param suite the testsuite.
*/
public void startTestSuite(final JUnitTest suite) {
public void startTestSuite(final JUnitTest suite) {
doc = getDocumentBuilder().newDocument();
rootElement = doc.createElement(TESTSUITE);
final String n = suite.getName();
@@ -172,7 +172,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
hostname = localHost.getHostName();
}
} catch (final UnknownHostException e) {
// fall back to default 'localhost'
// fall back to default 'localhost'
}
return hostname;
}
@@ -182,7 +182,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
* @param suite the testsuite.
* @throws BuildException on error.
*/
public void endTestSuite(final JUnitTest suite) throws BuildException {
public void endTestSuite(final JUnitTest suite) throws BuildException {
rootElement.setAttribute(ATTR_TESTS, "" + suite.runCount());
rootElement.setAttribute(ATTR_FAILURES, "" + suite.failureCount());
rootElement.setAttribute(ATTR_ERRORS, "" + suite.errorCount());
@@ -218,13 +218,13 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
* <p>A new Test is started.
* @param t the test.
*/
public void startTest(final Test t) {
public void startTest(final Test t) {
testStarts.put(createDescription(t), System.currentTimeMillis());
}

private static String createDescription(final Test test) throws BuildException {
return JUnitVersionHelper.getTestCaseName(test) + "(" + JUnitVersionHelper.getTestCaseClassName(test) + ")";
}
}

/**
* Interface TestListener.
@@ -232,7 +232,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
* <p>A Test is finished.
* @param test the test.
*/
public void endTest(final Test test) {
public void endTest(final Test test) {
final String testDescription = createDescription(test);

// Fix for bug #5637 - if a junit.extensions.TestSetup is
@@ -280,7 +280,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
* @param test the test.
* @param t the assertion.
*/
public void addFailure(final Test test, final AssertionFailedError t) {
public void addFailure(final Test test, final AssertionFailedError t) {
addFailure(test, (Throwable) t);
}

@@ -291,7 +291,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
* @param test the test.
* @param t the error.
*/
public void addError(final Test test, final Throwable t) {
public void addError(final Test test, final Throwable t) {
formatError(ERROR, test, t);
}

@@ -328,7 +328,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan
nested.appendChild(doc.createCDATASection(output));
}

public void testIgnored(final Test test) {
public void testIgnored(final Test test) {
formatSkip(test, JUnitVersionHelper.getIgnoreMessage(test));
if (test != null) {
ignoredTests.put(createDescription(test), test);
@@ -358,7 +358,7 @@ public class XMLJUnitResultFormatter implements JUnitResultFormatter, XMLConstan

}

public void testAssumptionFailure(final Test test, final Throwable failure) {
public void testAssumptionFailure(final Test test, final Throwable failure) {
formatSkip(test, failure.getMessage());
skippedTests.put(createDescription(test), test);



+ 6
- 6
src/main/org/apache/tools/ant/taskdefs/optional/splash/SplashTask.java View File

@@ -72,7 +72,7 @@ public class SplashTask extends Task {
* Use org.apache.tools.ant.taskdefs.optional.net.SetProxy
*/
@Deprecated
public void setUseproxy(boolean useProxy) {
public void setUseproxy(boolean useProxy) {
this.useProxy = useProxy;
}

@@ -83,7 +83,7 @@ public class SplashTask extends Task {
* Use org.apache.tools.ant.taskdefs.optional.net.SetProxy
*/
@Deprecated
public void setProxy(String proxy) {
public void setProxy(String proxy) {
this.proxy = proxy;
}

@@ -94,7 +94,7 @@ public class SplashTask extends Task {
* Use org.apache.tools.ant.taskdefs.optional.net.SetProxy
*/
@Deprecated
public void setPort(String port) {
public void setPort(String port) {
this.port = port;
}

@@ -105,7 +105,7 @@ public class SplashTask extends Task {
* Use org.apache.tools.ant.taskdefs.optional.net.SetProxy
*/
@Deprecated
public void setUser(String user) {
public void setUser(String user) {
this.user = user;
}

@@ -116,7 +116,7 @@ public class SplashTask extends Task {
* Use org.apache.tools.ant.taskdefs.optional.net.SetProxy
*/
@Deprecated
public void setPassword(String password) {
public void setPassword(String password) {
this.password = password;
}

@@ -158,7 +158,7 @@ public class SplashTask extends Task {
* @throws BuildException on error
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
if (splash != null) {
splash.setVisible(false);
getProject().removeBuildListener(splash);


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Directory.java View File

@@ -135,7 +135,7 @@ public class Directory {
* @return true if this object has an equal directory field as the other object
*/
@Override
public boolean equals(Object obj) {
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
@@ -154,7 +154,7 @@ public class Directory {
* @return the hash code of the directory field
*/
@Override
public int hashCode() {
public int hashCode() {
return directory.hashCode();
}



+ 9
- 9
src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java View File

@@ -198,15 +198,15 @@ public abstract class SSHBase extends Task implements LogListener {
protected Session openSession() throws JSchException {
final JSch jsch = new JSch();
final SSHBase base = this;
if(verbose) {
JSch.setLogger(new com.jcraft.jsch.Logger(){
public boolean isEnabled(final int level){
return true;
}
public void log(final int level, final String message){
base.log(message, Project.MSG_INFO);
}
});
if (verbose) {
JSch.setLogger(new com.jcraft.jsch.Logger(){
public boolean isEnabled(final int level){
return true;
}
public void log(final int level, final String message){
base.log(message, Project.MSG_INFO);
}
});
}
if (null != userInfo.getKeyfile()) {
jsch.addIdentity(userInfo.getKeyfile());


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java View File

@@ -275,7 +275,7 @@ public class SSHExec extends SSHBase {
* @exception BuildException Most likely a network error or bad parameter.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {

if (getHost() == null) {
throw new BuildException("Host is required.");
@@ -401,7 +401,7 @@ public class SSHExec extends SSHBase {
thread =
new Thread() {
@Override
public void run() {
public void run() {
while (!channel.isClosed()) {
if (thread == null) {
return;


+ 12
- 12
src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHSession.java View File

@@ -133,7 +133,7 @@ public class SSHSession extends SSHBase {
* network error or bad parameter.
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
if (getHost() == null) {
throw new BuildException("Host is required.");
}
@@ -238,19 +238,19 @@ public class SSHSession extends SSHBase {
public void setRPort(final int rport) { this.rport = rport; }
public int getLPort() {
if (lport == 0) {
throw new BuildException("lport is required for LocalTunnel.");
throw new BuildException("lport is required for LocalTunnel.");
}
return lport;
}
public String getRHost() {
if (rhost == null) {
throw new BuildException("rhost is required for LocalTunnel.");
throw new BuildException("rhost is required for LocalTunnel.");
}
return rhost;
}
public int getRPort() {
if (rport == 0) {
throw new BuildException("rport is required for LocalTunnel.");
throw new BuildException("rport is required for LocalTunnel.");
}
return rport;
}
@@ -266,28 +266,28 @@ public class SSHSession extends SSHBase {
public void setLHost(final String lhost) { this.lhost = lhost; }
public void setRPort(final int rport) {
final Integer portKey = new Integer(rport);
if (remotePortsUsed.contains(portKey)) {
throw new BuildException("Multiple remote tunnels defined to"
+ " use same remote port " + rport);
}
if (remotePortsUsed.contains(portKey)) {
throw new BuildException("Multiple remote tunnels defined to"
+ " use same remote port " + rport);
}
remotePortsUsed.add(portKey);
this.rport = rport;
}
public int getLPort() {
if (lport == 0) {
throw new BuildException("lport is required for RemoteTunnel.");
throw new BuildException("lport is required for RemoteTunnel.");
}
return lport;
}
public String getLHost() {
if (lhost == null) {
throw new BuildException("lhost is required for RemoteTunnel.");
throw new BuildException("lhost is required for RemoteTunnel.");
}
return lhost;
}
public int getRPort() {
if (rport == 0) {
throw new BuildException("rport is required for RemoteTunnel.");
throw new BuildException("rport is required for RemoteTunnel.");
}
return rport;
}
@@ -318,7 +318,7 @@ public class SSHSession extends SSHBase {
*
* @param task an unknown element.
*/
public void addTask(final Task task) {
public void addTask(final Task task) {
nested.add(task);
}



+ 5
- 5
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java View File

@@ -123,7 +123,7 @@ public class Scp extends SSHBase {
* @since Ant 1.8.0
*/
public void setPreservelastmodified(final boolean yesOrNo) {
this.preserveLastModified = yesOrNo;
this.preserveLastModified = yesOrNo;
}

/**
@@ -139,13 +139,13 @@ public class Scp extends SSHBase {
}

private static void validateRemoteUri(final String type, final String aToUri) {
if (!isRemoteUri(aToUri)) {
if (!isRemoteUri(aToUri)) {
throw new BuildException(type + " '" + aToUri + "' is invalid. "
+ "The 'remoteToDir' attribute must "
+ "have syntax like the "
+ "following: user:password@host:/path"
+ " - the :password part is optional");
}
}
}

/**
@@ -198,7 +198,7 @@ public class Scp extends SSHBase {
* @throws BuildException on error
*/
@Override
public void init() throws BuildException {
public void init() throws BuildException {
super.init();
this.toUri = null;
this.fromUri = null;
@@ -210,7 +210,7 @@ public class Scp extends SSHBase {
* @throws BuildException on error
*/
@Override
public void execute() throws BuildException {
public void execute() throws BuildException {
if (toUri == null) {
throw exactlyOne(TO_ATTRS);
}


+ 2
- 2
src/main/org/apache/tools/ant/taskdefs/optional/ssh/ScpFromMessage.java View File

@@ -229,8 +229,8 @@ public class ScpFromMessage extends AbstractSshMessage {
}

private void fetchFile(final File localFile,
long filesize,
final OutputStream out,
long filesize,
final OutputStream out,
final InputStream in)
throws IOException, JSchException {
final byte[] buf = new byte[BUFFER_SIZE];


+ 5
- 5
src/main/org/apache/tools/ant/taskdefs/optional/unix/Symlink.java View File

@@ -130,7 +130,7 @@ public class Symlink extends DispatchTask {
* @throws BuildException on error.
*/
@Override
public void init() throws BuildException {
public void init() throws BuildException {
super.init();
setDefaults();
}
@@ -140,7 +140,7 @@ public class Symlink extends DispatchTask {
* @throws BuildException on error.
*/
@Override
public synchronized void execute() throws BuildException {
public synchronized void execute() throws BuildException {
if (executing) {
throw new BuildException(
"Infinite recursion detected in Symlink.execute()");
@@ -328,7 +328,7 @@ public class Symlink extends DispatchTask {
* @param action The action to perform.
*/
@Override
public void setAction(String action) {
public void setAction(String action) {
super.setAction(action);
}

@@ -387,7 +387,7 @@ public class Symlink extends DispatchTask {
* instead
*/
@Deprecated
public static void deleteSymlink(String path)
public static void deleteSymlink(String path)
throws IOException, FileNotFoundException {
SYMLINK_UTILS.deleteSymbolicLink(new File(path), null);
}
@@ -421,7 +421,7 @@ public class Symlink extends DispatchTask {
* instead
*/
@Deprecated
public static void deleteSymlink(File linkfil)
public static void deleteSymlink(File linkfil)
throws IOException {
SYMLINK_UTILS.deleteSymbolicLink(linkfil, null);
}


+ 2
- 2
src/main/org/apache/tools/ant/types/FilterChain.java View File

@@ -375,7 +375,7 @@ public class FilterChain extends DataType
* @exception BuildException if this instance already has been configured.
*/
@Override
public void setRefid(Reference r) throws BuildException {
public void setRefid(Reference r) throws BuildException {
if (!filterReaders.isEmpty()) {
throw tooManyAttributes();
}
@@ -398,7 +398,7 @@ public class FilterChain extends DataType
}

@Override
protected synchronized void dieOnCircularReference(Stack<Object> stk, Project p)
protected synchronized void dieOnCircularReference(Stack<Object> stk, Project p)
throws BuildException {
if (isChecked()) {
return;


+ 2
- 2
src/main/org/apache/tools/ant/types/FilterSet.java View File

@@ -165,7 +165,7 @@ public class FilterSet extends DataType implements Cloneable {
//inherit doc
/** {@inheritDoc}. */
@Override
public String[] getValues() {
public String[] getValues() {
return VALUES;
}
}
@@ -494,7 +494,7 @@ public class FilterSet extends DataType implements Cloneable {
* @throws BuildException if the clone cannot be performed.
*/
@Override
public synchronized Object clone() throws BuildException {
public synchronized Object clone() throws BuildException {
if (isReference()) {
return getRef().clone();
}


+ 3
- 3
src/main/org/apache/tools/ant/types/Permissions.java View File

@@ -186,7 +186,7 @@ public class Permissions {
* @param status The exit status requested.
*/
@Override
public void checkExit(final int status) {
public void checkExit(final int status) {
final java.security.Permission perm = new java.lang.RuntimePermission("exitVM", null);
try {
checkPermission(perm);
@@ -202,7 +202,7 @@ public class Permissions {
* @param perm The permission requested.
*/
@Override
public void checkPermission(final java.security.Permission perm) {
public void checkPermission(final java.security.Permission perm) {
if (active) {
if (delegateToOldSM && !perm.getName().equals("exitVM")) {
boolean permOK = false;
@@ -349,7 +349,7 @@ public class Permissions {
* @return string description of the permissions.
*/
@Override
public String toString() {
public String toString() {
return ("Permission: " + className + " (\"" + name + "\", \"" + actions + "\")");
}
}


+ 3
- 3
src/main/org/apache/tools/ant/types/mappers/CutDirsMapper.java View File

@@ -46,18 +46,18 @@ public class CutDirsMapper implements FileNameMapper {
* Empty implementation.
* @param ignore ignored.
*/
public void setFrom(final String ignore) {
public void setFrom(final String ignore) {
}

/**
* Empty implementation.
* @param ignore ignored.
*/
public void setTo(final String ignore) {
public void setTo(final String ignore) {
}

/** {@inheritDoc}. */
public String[] mapFileName(final String sourceFileName) {
public String[] mapFileName(final String sourceFileName) {
if (dirs <= 0) {
throw new BuildException("dirs must be set to a positive number");
}


+ 7
- 7
src/main/org/apache/tools/ant/types/resources/Archives.java View File

@@ -72,7 +72,7 @@ public class Archives extends DataType
/**
* Sums the sizes of nested archives.
*/
public int size() {
public int size() {
if (isReference()) {
return ((Archives) getCheckedRef()).size();
}
@@ -87,7 +87,7 @@ public class Archives extends DataType
/**
* Merges the nested collections.
*/
public Iterator<Resource> iterator() {
public Iterator<Resource> iterator() {
if (isReference()) {
return ((Archives) getCheckedRef()).iterator();
}
@@ -103,7 +103,7 @@ public class Archives extends DataType
/**
* @return false
*/
public boolean isFilesystemOnly() {
public boolean isFilesystemOnly() {
if (isReference()) {
return ((Archives) getCheckedRef()).isFilesystemOnly();
}
@@ -116,7 +116,7 @@ public class Archives extends DataType
* @param r the Reference to set.
*/
@Override
public void setRefid(final Reference r) {
public void setRefid(final Reference r) {
if (zips.getResourceCollections().size() > 0
|| tars.getResourceCollections().size() > 0) {
throw tooManyAttributes();
@@ -130,7 +130,7 @@ public class Archives extends DataType
* @return a cloned instance.
*/
@Override
public Object clone() {
public Object clone() {
try {
final Archives a = (Archives) super.clone();
a.zips = (Union) zips.clone();
@@ -177,7 +177,7 @@ public class Archives extends DataType
* @throws BuildException on error.
*/
@Override
protected synchronized void dieOnCircularReference(final Stack<Object> stk, final Project p)
protected synchronized void dieOnCircularReference(final Stack<Object> stk, final Project p)
throws BuildException {
if (isChecked()) {
return;
@@ -191,4 +191,4 @@ public class Archives extends DataType
}
}

}
}

+ 5
- 5
src/main/org/apache/tools/ant/types/resources/ContentTransformingResource.java View File

@@ -56,7 +56,7 @@ public abstract class ContentTransformingResource extends ResourceDecorator {
* compatibility with java.io.File), or UNKNOWN_SIZE if not known.
*/
@Override
public long getSize() {
public long getSize() {
if (isExists()) {
InputStream in = null;
try {
@@ -88,7 +88,7 @@ public abstract class ContentTransformingResource extends ResourceDecorator {
* supported for this Resource type.
*/
@Override
public InputStream getInputStream() throws IOException {
public InputStream getInputStream() throws IOException {
InputStream in = getResource().getInputStream();
if (in != null) {
in = wrapStream(in);
@@ -105,7 +105,7 @@ public abstract class ContentTransformingResource extends ResourceDecorator {
* supported for this Resource type.
*/
@Override
public OutputStream getOutputStream() throws IOException {
public OutputStream getOutputStream() throws IOException {
OutputStream out = getResource().getOutputStream();
if (out != null) {
out = wrapStream(out);
@@ -117,14 +117,14 @@ public abstract class ContentTransformingResource extends ResourceDecorator {
* Suppress FileProvider, re-implement Appendable
*/
@Override
public <T> T as(final Class<T> clazz) {
public <T> T as(final Class<T> clazz) {
if (Appendable.class.isAssignableFrom(clazz)) {
if (isAppendSupported()) {
final Appendable a =
getResource().as(Appendable.class);
if (a != null) {
return clazz.cast(new Appendable() {
public OutputStream getAppendOutputStream()
public OutputStream getAppendOutputStream()
throws IOException {
OutputStream out = a.getAppendOutputStream();
if (out != null) {


+ 8
- 8
src/main/org/apache/tools/ant/types/resources/LazyResourceCollectionWrapper.java View File

@@ -37,7 +37,7 @@ public class LazyResourceCollectionWrapper extends
private FilteringIterator filteringIterator;

@Override
protected Iterator<Resource> createIterator() {
protected Iterator<Resource> createIterator() {
Iterator<Resource> iterator;
if (isCache()) {
if (filteringIterator == null) {
@@ -53,7 +53,7 @@ public class LazyResourceCollectionWrapper extends
}

@Override
protected int getSize() {
protected int getSize() {
// to compute the size, just iterate: the iterator will take care of
// caching
final Iterator<Resource> it = createIterator();
@@ -88,7 +88,7 @@ public class LazyResourceCollectionWrapper extends
this.it = it;
}

public boolean hasNext() {
public boolean hasNext() {
if (ended) {
return false;
}
@@ -105,7 +105,7 @@ public class LazyResourceCollectionWrapper extends
return true;
}

public Resource next() {
public Resource next() {
if (!hasNext()) {
throw new UnsupportedOperationException();
}
@@ -114,7 +114,7 @@ public class LazyResourceCollectionWrapper extends
return r;
}

public void remove() {
public void remove() {
throw new UnsupportedOperationException();
}
}
@@ -140,7 +140,7 @@ public class LazyResourceCollectionWrapper extends
this.it = it;
}

public boolean hasNext() {
public boolean hasNext() {
synchronized (cachedResources) {
// have we already cached the next entry ?
if (cachedResources.size() > cusrsor) {
@@ -157,7 +157,7 @@ public class LazyResourceCollectionWrapper extends
return true;
}

public Resource next() {
public Resource next() {
// first check that we have some to deliver
if (!hasNext()) {
throw new NoSuchElementException();
@@ -169,7 +169,7 @@ public class LazyResourceCollectionWrapper extends
}
}

public void remove() {
public void remove() {
throw new UnsupportedOperationException();
}
}


+ 6
- 6
src/main/org/apache/tools/ant/types/resources/MappedResource.java View File

@@ -47,7 +47,7 @@ public class MappedResource extends ResourceDecorator {
* Maps the name.
*/
@Override
public String getName() {
public String getName() {
String name = getResource().getName();
if (isReference()) {
return name;
@@ -61,7 +61,7 @@ public class MappedResource extends ResourceDecorator {
* @param r reference to set
*/
@Override
public void setRefid(Reference r) {
public void setRefid(Reference r) {
if (mapper != null) {
throw noChildrenAllowed();
}
@@ -73,7 +73,7 @@ public class MappedResource extends ResourceDecorator {
* @param clazz the type to implement
*/
@Override
public <T> T as(Class<T> clazz) {
public <T> T as(Class<T> clazz) {
return FileProvider.class.isAssignableFrom(clazz)
? null : getResource().as(clazz);
}
@@ -83,7 +83,7 @@ public class MappedResource extends ResourceDecorator {
* @since Ant 1.8.1
*/
@Override
public int hashCode() {
public int hashCode() {
String n = getName();
return n == null ? super.hashCode() : n.hashCode();
}
@@ -94,7 +94,7 @@ public class MappedResource extends ResourceDecorator {
* @since Ant 1.8.1
*/
@Override
public boolean equals(Object other) {
public boolean equals(Object other) {
if (other == null || !other.getClass().equals(getClass())) {
return false;
}
@@ -106,7 +106,7 @@ public class MappedResource extends ResourceDecorator {
}

@Override
public String toString() {
public String toString() {
if (isReference()) {
return getCheckedRef().toString();
}


+ 10
- 10
src/main/org/apache/tools/ant/types/resources/MultiRootFileSet.java View File

@@ -44,7 +44,7 @@ public class MultiRootFileSet extends AbstractFileSet
private Union union;

@Override
public void setDir(final File dir) {
public void setDir(final File dir) {
throw new BuildException(getDataTypeName()
+ " doesn't support the dir attribute");
}
@@ -98,7 +98,7 @@ public class MultiRootFileSet extends AbstractFileSet
}

@Override
public void setRefid(final Reference r) {
public void setRefid(final Reference r) {
if (!baseDirs.isEmpty()) {
throw tooManyAttributes();
}
@@ -111,7 +111,7 @@ public class MultiRootFileSet extends AbstractFileSet
* @return the cloned MultiRootFileSet.
*/
@Override
public Object clone() {
public Object clone() {
if (isReference()) {
return ((MultiRootFileSet) getRef(getProject())).clone();
} else {
@@ -126,7 +126,7 @@ public class MultiRootFileSet extends AbstractFileSet
* Fulfill the ResourceCollection contract.
* @return an Iterator of Resources.
*/
public Iterator<Resource> iterator() {
public Iterator<Resource> iterator() {
if (isReference()) {
return ((MultiRootFileSet) getRef(getProject())).iterator();
}
@@ -137,7 +137,7 @@ public class MultiRootFileSet extends AbstractFileSet
* Fulfill the ResourceCollection contract.
* @return number of elements as int.
*/
public int size() {
public int size() {
if (isReference()) {
return ((MultiRootFileSet) getRef(getProject())).size();
}
@@ -148,7 +148,7 @@ public class MultiRootFileSet extends AbstractFileSet
* Always returns true.
* @return true indicating that all elements will be FileResources.
*/
public boolean isFilesystemOnly() {
public boolean isFilesystemOnly() {
return true;
}

@@ -158,7 +158,7 @@ public class MultiRootFileSet extends AbstractFileSet
* @return a <code>String</code> of included directories.
*/
@Override
public String toString() {
public String toString() {
if (isReference()) {
return ((MultiRootFileSet) getRef(getProject())).toString();
}
@@ -201,11 +201,11 @@ public class MultiRootFileSet extends AbstractFileSet
setDir(dir);
}

public boolean isFilesystemOnly() {
public boolean isFilesystemOnly() {
return true;
}

public Iterator<Resource> iterator() {
public Iterator<Resource> iterator() {
final DirectoryScanner ds = getDirectoryScanner(getProject());
String[] names = type == SetType.file
? ds.getIncludedFiles()
@@ -221,7 +221,7 @@ public class MultiRootFileSet extends AbstractFileSet
names);
}

public int size() {
public int size() {
final DirectoryScanner ds = getDirectoryScanner(getProject());
int count = type == SetType.file
? ds.getIncludedFilesCount()


+ 2
- 2
src/main/org/apache/tools/ant/types/resources/selectors/Type.java View File

@@ -65,7 +65,7 @@ public class Type implements ResourceSelector {
* @return a String array.
*/
@Override
public String[] getValues() {
public String[] getValues() {
return VALUES;
}
}
@@ -99,7 +99,7 @@ public class Type implements ResourceSelector {
* @param r the Resource to check.
* @return whether the Resource was selected.
*/
public boolean isSelected(final Resource r) {
public boolean isSelected(final Resource r) {
if (type == null) {
throw new BuildException("The type attribute is required.");
}


+ 2
- 2
src/main/org/apache/tools/ant/types/selectors/MappingSelector.java View File

@@ -94,7 +94,7 @@ public abstract class MappingSelector extends BaseSelector {
* means that the dest attribute has been set and we have a mapper.
*/
@Override
public void verifySettings() {
public void verifySettings() {
if (targetdir == null) {
setError("The targetdir attribute is required.");
}
@@ -120,7 +120,7 @@ public abstract class MappingSelector extends BaseSelector {
* @return whether the file should be selected or not
*/
@Override
public boolean isSelected(File basedir, String filename, File file) {
public boolean isSelected(File basedir, String filename, File file) {

// throw BuildException on error
validate();


+ 4
- 4
src/main/org/apache/tools/ant/types/selectors/PresentSelector.java View File

@@ -52,7 +52,7 @@ public class PresentSelector extends BaseSelector {
* @return a string describing this object
*/
@Override
public String toString() {
public String toString() {
final StringBuilder buf = new StringBuilder("{presentselector targetdir: ");
if (targetdir == null) {
buf.append("NOT YET SET");
@@ -133,7 +133,7 @@ public class PresentSelector extends BaseSelector {
* means that the targetdir attribute has been set and we have a mapper.
*/
@Override
public void verifySettings() {
public void verifySettings() {
if (targetdir == null) {
setError("The targetdir attribute is required.");
}
@@ -159,7 +159,7 @@ public class PresentSelector extends BaseSelector {
* @return whether the file should be selected or not
*/
@Override
public boolean isSelected(final File basedir, final String filename, final File file) {
public boolean isSelected(final File basedir, final String filename, final File file) {

// throw BuildException on error
validate();
@@ -190,7 +190,7 @@ public class PresentSelector extends BaseSelector {
* @return the values as an array of strings
*/
@Override
public String[] getValues() {
public String[] getValues() {
return new String[] {"srconly", "both"};
}
}


+ 3
- 3
src/main/org/apache/tools/ant/types/selectors/TokenizedPath.java View File

@@ -87,7 +87,7 @@ public class TokenizedPath {
* @return The original path String
*/
@Override
public String toString() {
public String toString() {
return path;
}

@@ -162,13 +162,13 @@ public class TokenizedPath {
* true if the original paths are equal.
*/
@Override
public boolean equals(Object o) {
public boolean equals(Object o) {
return o instanceof TokenizedPath
&& path.equals(((TokenizedPath) o).path);
}

@Override
public int hashCode() {
public int hashCode() {
return path.hashCode();
}



+ 9
- 9
src/main/org/apache/tools/ant/util/LayoutPreservingProperties.java View File

@@ -139,7 +139,7 @@ public class LayoutPreservingProperties extends Properties {
}

@Override
public void load(final InputStream inStream) throws IOException {
public void load(final InputStream inStream) throws IOException {
final String s = readLines(inStream);
final byte[] ba = s.getBytes(ResourceUtils.ISO_8859_1);
final ByteArrayInputStream bais = new ByteArrayInputStream(ba);
@@ -147,7 +147,7 @@ public class LayoutPreservingProperties extends Properties {
}

@Override
public Object put(final Object key, final Object value) throws NullPointerException {
public Object put(final Object key, final Object value) throws NullPointerException {
final Object obj = super.put(key, value);
// the above call will have failed if key or value are null
innerSetProperty(key.toString(), value.toString());
@@ -155,7 +155,7 @@ public class LayoutPreservingProperties extends Properties {
}

@Override
public Object setProperty(final String key, final String value)
public Object setProperty(final String key, final String value)
throws NullPointerException {
final Object obj = super.setProperty(key, value);
// the above call will have failed if key or value are null
@@ -188,14 +188,14 @@ public class LayoutPreservingProperties extends Properties {
}

@Override
public void clear() {
public void clear() {
super.clear();
keyedPairLines.clear();
logicalLines.clear();
}

@Override
public Object remove(final Object key) {
public Object remove(final Object key) {
final Object obj = super.remove(key);
final Integer i = (Integer) keyedPairLines.remove(key);
if (null != i) {
@@ -208,7 +208,7 @@ public class LayoutPreservingProperties extends Properties {
}

@Override
public Object clone() {
public Object clone() {
final LayoutPreservingProperties dolly =
(LayoutPreservingProperties) super.clone();
dolly.keyedPairLines = (HashMap) this.keyedPairLines.clone();
@@ -256,7 +256,7 @@ public class LayoutPreservingProperties extends Properties {
}

@Override
public void store(final OutputStream out, final String header) throws IOException {
public void store(final OutputStream out, final String header) throws IOException {
final OutputStreamWriter osw = new OutputStreamWriter(out, ResourceUtils.ISO_8859_1);

int skipLines = 0;
@@ -630,7 +630,7 @@ public class LayoutPreservingProperties extends Properties {
}

@Override
public String toString() {
public String toString() {
return text;
}
}
@@ -694,7 +694,7 @@ public class LayoutPreservingProperties extends Properties {
}

@Override
public Object clone() {
public Object clone() {
Object dolly = null;
try {
dolly = super.clone();


+ 4
- 4
src/main/org/apache/tools/ant/util/LineOrientedOutputStream.java View File

@@ -51,7 +51,7 @@ public abstract class LineOrientedOutputStream extends OutputStream {
* @throws IOException if there is an error.
*/
@Override
public final void write(int cc) throws IOException {
public final void write(int cc) throws IOException {
final byte c = (byte) cc;
if ((c == LF) || (c == CR)) {
if (!skip) {
@@ -68,7 +68,7 @@ public abstract class LineOrientedOutputStream extends OutputStream {
* @throws IOException if there is an error.
*/
@Override
public void flush() throws IOException {
public void flush() throws IOException {
}

/**
@@ -114,7 +114,7 @@ public abstract class LineOrientedOutputStream extends OutputStream {
* @throws IOException if there is an error.
*/
@Override
public void close() throws IOException {
public void close() throws IOException {
if (buffer.size() > 0) {
processBuffer();
}
@@ -131,7 +131,7 @@ public abstract class LineOrientedOutputStream extends OutputStream {
* @throws IOException if the data cannot be written into the stream.
*/
@Override
public final void write(byte[] b, int off, int len) throws IOException {
public final void write(byte[] b, int off, int len) throws IOException {
// find the line breaks and pass other chars through in blocks
int offset = off;
int blockStartOffset = offset;


+ 4
- 4
src/main/org/apache/tools/ant/util/LineOrientedOutputStreamRedirector.java View File

@@ -44,24 +44,24 @@ public class LineOrientedOutputStreamRedirector
}

@Override
protected void processLine(byte[] b) throws IOException {
protected void processLine(byte[] b) throws IOException {
stream.write(b);
stream.write(EOL);
}

@Override
protected void processLine(String line) throws IOException {
protected void processLine(String line) throws IOException {
stream.write((line + System.getProperty("line.separator")).getBytes());
}

@Override
public void close() throws IOException {
public void close() throws IOException {
super.close();
stream.close();
}

@Override
public void flush() throws IOException {
public void flush() throws IOException {
super.flush();
stream.flush();
}


+ 5
- 5
src/main/org/apache/tools/ant/util/ProcessUtil.java View File

@@ -25,10 +25,10 @@ import java.lang.management.ManagementFactory;
*/
public class ProcessUtil {

private ProcessUtil() {
}
private ProcessUtil() {
}

/**
/**
* provide id of the current process
* @param fallback
* @return current process id
@@ -57,9 +57,9 @@ public class ProcessUtil {
public static void main(String [] args) {
System.out.println(getProcessId("<PID>"));
try {
Thread.sleep(120000);
Thread.sleep(120000);
} catch (Exception exc) {
// ignore
// ignore
}
}
}

+ 4
- 4
src/main/org/apache/tools/ant/util/ResourceUtils.java View File

@@ -145,10 +145,10 @@ public class ResourceUtils {
logFuture(logTo, source, granularity);
final ResourceSelectorProvider p =
new ResourceSelectorProvider() {
public ResourceSelector
public ResourceSelector
getTargetSelectorForSource(final Resource sr) {
return new ResourceSelector() {
public boolean isSelected(final Resource target) {
public boolean isSelected(final Resource target) {
/* Extra I/O, probably wasted:
if (target.isDirectory()) {
return false;
@@ -842,9 +842,9 @@ public class ResourceUtils {
* @since Ant 1.9.4
*/
public static class ReadOnlyTargetFileException extends IOException {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;

public ReadOnlyTargetFileException(final File destFile) {
public ReadOnlyTargetFileException(final File destFile) {
super("can't write to read-only destination file " + destFile);
}
}


+ 2
- 2
src/main/org/apache/tools/ant/util/SymbolicLinkUtils.java View File

@@ -177,7 +177,7 @@ public class SymbolicLinkUtils {
if (!f.exists()) {
final String localName = f.getName();
final String[] c = parent.list(new FilenameFilter() {
public boolean accept(final File d, final String n) {
public boolean accept(final File d, final String n) {
return localName.equals(n);
}
});
@@ -293,4 +293,4 @@ public class SymbolicLinkUtils {
}
}

}
}

+ 18
- 18
src/main/org/apache/tools/ant/util/UnicodeUtil.java View File

@@ -24,23 +24,23 @@ package org.apache.tools.ant.util;
*/
public class UnicodeUtil {

private UnicodeUtil() {
}
private UnicodeUtil() {
}

/**
* returns the unicode representation of a char without the leading backslash
* @param ch
* @return unicode representation of a char for property files
*/
public static StringBuffer EscapeUnicode(char ch) {
StringBuffer unicodeBuf = new StringBuffer("u0000");
String s = Integer.toHexString(ch);
//replace the last 0s by the chars contained in s
for (int i = 0; i < s.length(); i++) {
unicodeBuf.setCharAt(unicodeBuf.length()
- s.length() + i,
s.charAt(i));
}
return unicodeBuf;
}
/**
* returns the unicode representation of a char without the leading backslash
* @param ch
* @return unicode representation of a char for property files
*/
public static StringBuffer EscapeUnicode(char ch) {
StringBuffer unicodeBuf = new StringBuffer("u0000");
String s = Integer.toHexString(ch);
//replace the last 0s by the chars contained in s
for (int i = 0; i < s.length(); i++) {
unicodeBuf.setCharAt(unicodeBuf.length()
- s.length() + i,
s.charAt(i));
}
return unicodeBuf;
}
}

+ 2
- 2
src/main/org/apache/tools/ant/util/XmlConstants.java View File

@@ -28,8 +28,8 @@ package org.apache.tools.ant.util;

public class XmlConstants {

private XmlConstants() {
}
private XmlConstants() {
}

/** property for location of xml schema */
public static final String PROPERTY_SCHEMA_LOCATION =


+ 1
- 1
src/main/org/apache/tools/tar/TarEntry.java View File

@@ -912,7 +912,7 @@ public class TarEntry implements TarConstants {
int offset = 0;

name = oldStyle ? TarUtils.parseName(header, offset, NAMELEN)
: TarUtils.parseName(header, offset, NAMELEN, encoding);
: TarUtils.parseName(header, offset, NAMELEN, encoding);
offset += NAMELEN;
mode = (int) TarUtils.parseOctalOrBinary(header, offset, MODELEN);
offset += MODELEN;


+ 1
- 1
src/main/org/apache/tools/tar/TarOutputStream.java View File

@@ -378,7 +378,7 @@ public class TarOutputStream extends FilterOutputStream {
* @throws IOException on error
*/
@Override
public void write(byte[] wBuf) throws IOException {
public void write(byte[] wBuf) throws IOException {
write(wBuf, 0, wBuf.length);
}



+ 3
- 3
src/main/org/apache/tools/tar/TarUtils.java View File

@@ -46,9 +46,9 @@ public class TarUtils {
* Encapsulates the algorithms used up to Ant 1.8 as ZipEncoding.
*/
static final ZipEncoding FALLBACK_ENCODING = new ZipEncoding() {
public boolean canEncode(final String name) { return true; }
public boolean canEncode(final String name) { return true; }

public ByteBuffer encode(final String name) {
public ByteBuffer encode(final String name) {
final int length = name.length();
final byte[] buf = new byte[length];

@@ -59,7 +59,7 @@ public class TarUtils {
return ByteBuffer.wrap(buf);
}

public String decode(final byte[] buffer) {
public String decode(final byte[] buffer) {
final int length = buffer.length;
final StringBuilder result = new StringBuilder(length);



+ 5
- 5
src/main/org/apache/tools/zip/AbstractUnicodeExtraField.java View File

@@ -128,7 +128,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
}

/** {@inheritDoc} */
public byte[] getCentralDirectoryData() {
public byte[] getCentralDirectoryData() {
if (data == null) {
this.assembleData();
}
@@ -141,7 +141,7 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
}

/** {@inheritDoc} */
public ZipShort getCentralDirectoryLength() {
public ZipShort getCentralDirectoryLength() {
if (data == null) {
assembleData();
}
@@ -149,17 +149,17 @@ public abstract class AbstractUnicodeExtraField implements ZipExtraField {
}

/** {@inheritDoc} */
public byte[] getLocalFileDataData() {
public byte[] getLocalFileDataData() {
return getCentralDirectoryData();
}

/** {@inheritDoc} */
public ZipShort getLocalFileDataLength() {
public ZipShort getLocalFileDataLength() {
return getCentralDirectoryLength();
}

/** {@inheritDoc} */
public void parseFromLocalFileData(final byte[] buffer, final int offset, final int length)
public void parseFromLocalFileData(final byte[] buffer, final int offset, final int length)
throws ZipException {

if (length < 5) {


+ 3
- 3
src/main/org/apache/tools/zip/FallbackZipEncoding.java View File

@@ -64,7 +64,7 @@ class FallbackZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String)
*/
public boolean canEncode(final String name) {
public boolean canEncode(final String name) {
return true;
}

@@ -72,7 +72,7 @@ class FallbackZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#encode(java.lang.String)
*/
public ByteBuffer encode(final String name) throws IOException {
public ByteBuffer encode(final String name) throws IOException {
if (this.charset == null) { // i.e. use default charset, see no-args constructor
return ByteBuffer.wrap(name.getBytes());
} else {
@@ -84,7 +84,7 @@ class FallbackZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#decode(byte[])
*/
public String decode(final byte[] data) throws IOException {
public String decode(final byte[] data) throws IOException {
if (this.charset == null) { // i.e. use default charset, see no-args constructor
return new String(data);
} else {


+ 3
- 3
src/main/org/apache/tools/zip/NioZipEncoding.java View File

@@ -54,7 +54,7 @@ class NioZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String)
*/
public boolean canEncode(final String name) {
public boolean canEncode(final String name) {
final CharsetEncoder enc = this.charset.newEncoder();
enc.onMalformedInput(CodingErrorAction.REPORT);
enc.onUnmappableCharacter(CodingErrorAction.REPORT);
@@ -66,7 +66,7 @@ class NioZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#encode(java.lang.String)
*/
public ByteBuffer encode(final String name) {
public ByteBuffer encode(final String name) {
final CharsetEncoder enc = this.charset.newEncoder();

enc.onMalformedInput(CodingErrorAction.REPORT);
@@ -113,7 +113,7 @@ class NioZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#decode(byte[])
*/
public String decode(final byte[] data) throws IOException {
public String decode(final byte[] data) throws IOException {
return this.charset.newDecoder()
.onMalformedInput(CodingErrorAction.REPORT)
.onUnmappableCharacter(CodingErrorAction.REPORT)


+ 4
- 4
src/main/org/apache/tools/zip/Simple8BitZipEncoding.java View File

@@ -58,7 +58,7 @@ class Simple8BitZipEncoding implements ZipEncoding {
this.unicode = unicode;
}

public int compareTo(final Simple8BitChar a) {
public int compareTo(final Simple8BitChar a) {
return this.unicode - a.unicode;
}

@@ -215,7 +215,7 @@ class Simple8BitZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#canEncode(java.lang.String)
*/
public boolean canEncode(final String name) {
public boolean canEncode(final String name) {

for (int i=0;i<name.length();++i) {

@@ -233,7 +233,7 @@ class Simple8BitZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#encode(java.lang.String)
*/
public ByteBuffer encode(final String name) {
public ByteBuffer encode(final String name) {
ByteBuffer out = ByteBuffer.allocate(name.length()
+ 6 + (name.length() + 1) / 2);

@@ -260,7 +260,7 @@ class Simple8BitZipEncoding implements ZipEncoding {
* @see
* org.apache.tools.zip.ZipEncoding#decode(byte[])
*/
public String decode(final byte[] data) throws IOException {
public String decode(final byte[] data) throws IOException {
final char [] ret = new char[data.length];

for (int i=0;i<data.length;++i) {


+ 1
- 1
src/main/org/apache/tools/zip/UnicodeCommentExtraField.java View File

@@ -63,7 +63,7 @@ public class UnicodeCommentExtraField extends AbstractUnicodeExtraField {
}

/** {@inheritDoc} */
public ZipShort getHeaderId() {
public ZipShort getHeaderId() {
return UCOM_ID;
}



+ 1
- 1
src/main/org/apache/tools/zip/UnicodePathExtraField.java View File

@@ -61,7 +61,7 @@ public class UnicodePathExtraField extends AbstractUnicodeExtraField {
}

/** {@inheritDoc} */
public ZipShort getHeaderId() {
public ZipShort getHeaderId() {
return UPATH_ID;
}
}

+ 1
- 1
src/main/org/apache/tools/zip/ZipEntry.java View File

@@ -507,7 +507,7 @@ public class ZipEntry extends java.util.zip.ZipEntry implements Cloneable {
* @since 1.2
*/
@Deprecated
public void setComprSize(final long size) {
public void setComprSize(final long size) {
setCompressedSize(size);
}



+ 1
- 1
src/main/org/apache/tools/zip/ZipFile.java View File

@@ -992,7 +992,7 @@ public class ZipFile {
*/
private final Comparator<ZipEntry> OFFSET_COMPARATOR =
new Comparator<ZipEntry>() {
public int compare(final ZipEntry e1, final ZipEntry e2) {
public int compare(final ZipEntry e1, final ZipEntry e2) {
if (e1 == e2) {
return 0;
}


+ 3
- 3
src/main/org/apache/tools/zip/ZipOutputStream.java View File

@@ -1252,7 +1252,7 @@ public class ZipOutputStream extends FilterOutputStream {
* @deprecated use ZipUtil#toDosTime
*/
@Deprecated
protected static ZipLong toDosTime(Date time) {
protected static ZipLong toDosTime(Date time) {
return ZipUtil.toDosTime(time);
}

@@ -1266,7 +1266,7 @@ public class ZipOutputStream extends FilterOutputStream {
* @deprecated use ZipUtil#toDosTime
*/
@Deprecated
protected static byte[] toDosTime(long t) {
protected static byte[] toDosTime(long t) {
return ZipUtil.toDosTime(t);
}

@@ -1399,7 +1399,7 @@ public class ZipOutputStream extends FilterOutputStream {
* @deprecated use ZipUtil#adjustToLong
*/
@Deprecated
protected static long adjustToLong(int i) {
protected static long adjustToLong(int i) {
return ZipUtil.adjustToLong(i);
}



Loading…
Cancel
Save