ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r397298 - in /ant/core/trunk: ./ src/main/org/apache/tools/ant/ src/main/org/apache/tools/ant/filters/ src/main/org/apache/tools/ant/taskdefs/ src/main/org/apache/tools/ant/taskdefs/compilers/ src/main/org/apache/tools/ant/taskdefs/optional...
Date Wed, 26 Apr 2006 20:55:33 GMT
Author: jkf
Date: Wed Apr 26 13:55:31 2006
New Revision: 397298

URL: http://svn.apache.org/viewcvs?rev=397298&view=rev
Log:
Minor updates based on the input of Dave Brosius
pr: 39320

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java
    ant/core/trunk/src/main/org/apache/tools/ant/filters/BaseFilterReader.java
    ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DefaultExcludes.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
    ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed Apr 26 13:55:31 2006
@@ -212,6 +212,8 @@
 
 Other changes:
 --------------
+* took in bugzilla report 39320.
+
 * Improve compatibility with GNU Classpath and java versions prior to 1.5. Bugzilla 39027.
 
 * ${ant.core.lib} may now be used to refer to the library containing the

Modified: ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/UnknownElement.java Wed Apr 26 13:55:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2000-2005 The Apache Software Foundation
+ * Copyright  2000-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -608,6 +608,6 @@
     }
 
     private static boolean equalsString(String a, String b) {
-        return (a == null) ? (a == b) : a.equals(b);
+        return (a == null) ? (b == null) : a.equals(b);
     }
 }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/filters/BaseFilterReader.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/filters/BaseFilterReader.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/filters/BaseFilterReader.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/filters/BaseFilterReader.java Wed Apr 26
13:55:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2002,2004-2005 The Apache Software Foundation
+ * Copyright  2002,2004-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -46,7 +46,7 @@
      * this placeholder instance to create a chain of real filters.
      */
     public BaseFilterReader() {
-        super(new StringReader(new String()));
+        super(new StringReader(""));
         FileUtils.close(this);
     }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/filters/FixCrLfFilter.java Wed Apr 26 13:55:31
2006
@@ -857,6 +857,10 @@
                     && getIndex() == ((AddAsisRemove) other).getIndex();
         }
 
+        public int hashCode() {
+            return getIndex();
+        }
+
         AddAsisRemove resolve() throws IllegalStateException {
             if (this.equals(ASIS)) {
                 return ASIS;
@@ -909,6 +913,10 @@
 
         public boolean equals(Object other) {
             return other instanceof CrLf && getIndex() == ((CrLf) other).getIndex();
+        }
+
+        public int hashCode() {
+            return getIndex();
         }
 
         CrLf resolve() {

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Copy.java Wed Apr 26 13:55:31 2006
@@ -539,7 +539,7 @@
 
             if (nonFileResources.size() > 0) {
                 Resource[] nonFiles =
-                    (Resource[]) nonFileResources.toArray(new Resource[0]);
+                    (Resource[]) nonFileResources.toArray(new Resource[nonFileResources.size()]);
                 // restrict to out-of-date resources
                 Map map = scan(nonFiles, destDir);
                 try {

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DefaultExcludes.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DefaultExcludes.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DefaultExcludes.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DefaultExcludes.java Wed Apr 26
13:55:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2003-2004 The Apache Software Foundation
+ * Copyright  2003-2004,2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.DirectoryScanner;
+import org.apache.tools.ant.util.StringUtils;
 
 /**
  * Alters the default excludes for the <strong>entire</strong> build..
@@ -60,10 +61,13 @@
         }
         if (echo) {
             StringBuffer message
-                = new StringBuffer("Current Default Excludes:\n");
+                = new StringBuffer("Current Default Excludes:");
+            message.append(StringUtils.LINE_SEP);
             String[] excludes = DirectoryScanner.getDefaultExcludes();
             for (int i = 0; i < excludes.length; i++) {
-                message.append("  " + excludes[i] + "\n");
+                message.append("  ");
+                message.append(excludes[i]);
+                message.append(StringUtils.LINE_SEP);
             }
             log(message.toString(), logLevel);
         }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Exit.java Wed Apr 26 13:55:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2000-2005 The Apache Software Foundation
+ * Copyright  2000-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -47,7 +47,7 @@
  */
 public class Exit extends Task {
 
-    private class NestedCondition extends ConditionBase implements Condition {
+    private static class NestedCondition extends ConditionBase implements Condition {
         public boolean eval() {
             if (countConditions() != 1) {
                 throw new BuildException(

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/MacroInstance.java Wed Apr 26 13:55:31
2006
@@ -200,7 +200,9 @@
                         String name = macroName.toString().toLowerCase(Locale.US);
                         String value = (String) macroMapping.get(name);
                         if (value == null) {
-                            ret.append("@{" + name + "}");
+                            ret.append("@{");
+                            ret.append(name);
+                            ret.append("}");
                         } else {
                             ret.append(value);
                         }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/SQLExec.java Wed Apr 26 13:55:31
2006
@@ -508,9 +508,11 @@
             }
 
             if (!keepformat) {
-                sql.append(" " + line);
+                sql.append(" ");
+                sql.append(line);
             } else {
-                sql.append("\n" + line);
+                sql.append("\n");
+                sql.append(line);
             }
 
             // SQL defines "--" as a comment to EOL

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/UpToDate.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/UpToDate.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/UpToDate.java Wed Apr 26 13:55:31
2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2000-2005 The Apache Software Foundation
+ * Copyright  2000-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -207,8 +207,8 @@
         if (upToDate) {
             Resource[] r = sourceResources.listResources();
             upToDate = upToDate &&
-                (ResourceUtils.selectOutOfDateSources(this, r, getMapper(),
-                                                      getProject()).length
+                (ResourceUtils.selectOutOfDateResources(this, r, getMapper(),
+                                                      getProject(), null).length
                  == 0);
         }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/VerifyJar.java Wed Apr 26 13:55:31
2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2000-2005 The Apache Software Foundation
+ * Copyright  2000-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -150,7 +150,7 @@
     /**
      * we are not thread safe here. Do not use on multiple threads at the same time.
      */
-    private class BufferingOutputFilter implements ChainableReader {
+    private static class BufferingOutputFilter implements ChainableReader {
 
         private BufferingOutputFilterReader buffer;
 
@@ -173,7 +173,7 @@
     /**
      * catch the output of the buffer
      */
-    private class BufferingOutputFilterReader extends Reader {
+    private static class BufferingOutputFilterReader extends Reader {
 
         private Reader next;
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Zip.java Wed Apr 26 13:55:31 2006
@@ -415,7 +415,7 @@
      */
     public void executeMain() throws BuildException {
 
-        if (baseDir == null & resources.size() == 0
+        if (baseDir == null && resources.size() == 0
             && groupfilesets.size() == 0 && "zip".equals(archiveType)) {
             throw new BuildException("basedir attribute must be set, "
                                      + "or at least one "

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
Wed Apr 26 13:55:31 2006
@@ -408,7 +408,9 @@
         for (int i = 0; i < compileList.length; i++) {
             String arg = compileList[i].getAbsolutePath();
             cmd.createArgument().setValue(arg);
-            niceSourceList.append("    " + arg + StringUtils.LINE_SEP);
+            niceSourceList.append("    ");
+            niceSourceList.append(arg);
+            niceSourceList.append(StringUtils.LINE_SEP);
         }
 
         attributes.log(niceSourceList.toString(), Project.MSG_VERBOSE);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java Wed Apr 26 13:55:31
2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2000-2005 The Apache Software Foundation
+ * Copyright  2000-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -442,7 +442,9 @@
         String[] c = getClasses();
         for (int i = 0; i < c.length; i++) {
             cmd.createArgument().setValue(c[i]);
-            niceClassList.append("    " + c[i] + lSep);
+            niceClassList.append("    ");
+            niceClassList.append(c[i]);
+            niceClassList.append(lSep);
         }
 
         StringBuffer prefix = new StringBuffer("Class");

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/TraXLiaison.java Wed Apr
26 13:55:31 2006
@@ -412,17 +412,22 @@
             }
             int line = locator.getLineNumber();
             if (line != -1) {
-                msg.append(":" + line);
+                msg.append(":");
+                msg.append(line);
                 int column = locator.getColumnNumber();
                 if (column != -1) {
-                    msg.append(":" + column);
+                    msg.append(":");
+                    msg.append(column);
                 }
             }
         }
-        msg.append(": " + type + "! ");
+        msg.append(": ");
+        msg.append(type);
+        msg.append("! ");
         msg.append(e.getMessage());
         if (e.getCause() != null) {
-            msg.append(" Cause: " + e.getCause());
+            msg.append(" Cause: ");
+            msg.append(e.getCause());
         }
 
         logger.log(msg.toString());

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/DotnetCompile.java
Wed Apr 26 13:55:31 2006
@@ -266,10 +266,9 @@
         //iterate through the ref list & generate an entry for each
         //or just rely on the fact that the toString operator does this, but
         //noting that the separator is ';' on windows, ':' on unix
-        String refpath = references.toString();
 
         //bail on no references listed
-        if (refpath.length() == 0) {
+        if (references.length() == 0) {
             return null;
         }
 
@@ -277,7 +276,7 @@
         if (isWindows) {
             s.append('\"');
         }
-        s.append(refpath);
+        s.append(references);
         if (isWindows) {
             s.append('\"');
         }

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
Wed Apr 26 13:55:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2000-2004 The Apache Software Foundation
+ * Copyright  2000-2004,2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -450,7 +450,7 @@
 
         } catch (SAXException se) {
             String msg = "SAXException while parsing '"
-                + descriptorFileName.toString()
+                + descriptorFileName
                 + "'. This probably indicates badly-formed XML."
                 + "  Details: "
                 + se.getMessage();

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/extension/JarLibManifestTask.java
Wed Apr 26 13:55:31 2006
@@ -279,7 +279,8 @@
                                       final int size) {
         final StringBuffer sb = new StringBuffer();
         for (int i = 0; i < size; i++) {
-            sb.append(listPrefix + i);
+            sb.append(listPrefix);
+            sb.append(i);
             sb.append(' ');
         }
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/DefaultJspCompilerAdapter.java
Wed Apr 26 13:55:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2001-2005 The Apache Software Foundation
+ * Copyright  2001-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -60,7 +60,9 @@
         while (e.hasMoreElements()) {
             String arg = (String) e.nextElement();
             cmd.createArgument().setValue(arg);
-            niceSourceList.append("    " + arg + lSep);
+            niceSourceList.append("    ");
+            niceSourceList.append(arg);
+            niceSourceList.append(lSep);
         }
 
         jspc.log(niceSourceList.toString(), Project.MSG_VERBOSE);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Wed
Apr 26 13:55:31 2006
@@ -1449,7 +1449,7 @@
      * Forked test support
      * @since Ant 1.6.2
      */
-    private final class ForkedTestConfiguration {
+    private final static class ForkedTestConfiguration {
         private boolean filterTrace;
         private boolean haltOnError;
         private boolean haltOnFailure;

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java Wed Apr
26 13:55:31 2006
@@ -606,9 +606,7 @@
                     env = new String[0];
                 }
                 String[] newEnv = new String[env.length + 1];
-                for (int i = 0; i < env.length; i++) {
-                    newEnv[i] = env[i];
-                }
+                System.arraycopy(env, 0, newEnv, 0, env.length);
                 newEnv[env.length] = "SSDIR=" + serverPath;
 
                 exe.setEnvironment(newEnv);
@@ -635,9 +633,8 @@
      * @throws ParseException
      */
     private String calcDate(String startDate, int daysToAdd) throws ParseException {
-        Date currentDate = new Date();
         Calendar calendar = new GregorianCalendar();
-        currentDate = dateFormat.parse(startDate);
+        Date currentDate = dateFormat.parse(startDate);
         calendar.setTime(currentDate);
         calendar.add(Calendar.DATE, daysToAdd);
         return dateFormat.format(calendar.getTime());

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java Wed
Apr 26 13:55:31 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright  2001-2005 The Apache Software Foundation
+ * Copyright  2001-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -263,7 +263,8 @@
         for (int i = 0; i < cListSize; i++) {
             String arg = (String) compileList.elementAt(i);
             cmd.createArgument().setValue(arg);
-            niceSourceList.append("    " + arg);
+            niceSourceList.append("    ");
+            niceSourceList.append(arg);
         }
 
         attributes.log(niceSourceList.toString(), Project.MSG_VERBOSE);

Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java?rev=397298&r1=397297&r2=397298&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java Wed Apr 26 13:55:31
2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2005 The Apache Software Foundation
+ * Copyright 2005-2006 The Apache Software Foundation
  *
  *  Licensed under the Apache License, Version 2.0 (the "License");
  *  you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@
  */
 public class Sort extends BaseResourceCollectionWrapper {
 
-    private class MultiComparator implements Comparator {
+    private static class MultiComparator implements Comparator {
         private Vector v = null;
         synchronized void add(ResourceComparator c) {
             if (c == null) {
@@ -62,7 +62,7 @@
     }
 
     //sorted bag impl. borrowed from commons-collections TreeBag:
-    private class SortedBag extends AbstractCollection {
+    private static class SortedBag extends AbstractCollection {
         private class MutableInt {
             int value = 0;
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message