ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r579713 - in /ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant: taskdefs/optional/ejb/ taskdefs/optional/j2ee/ taskdefs/optional/jsp/ types/selectors/modifiedselector/ util/ util/depend/bcel/
Date Wed, 26 Sep 2007 16:50:52 GMT
Author: peterreilly
Date: Wed Sep 26 09:50:46 2007
New Revision: 579713

URL: http://svn.apache.org/viewvc?rev=579713&view=rev
Log:
sync:checkstyle

Modified:
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/DOMElementWriter.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/UUEncoder.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java?rev=579713&r1=579712&r2=579713&view=diff
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WeblogicDeploymentTool.java
Wed Sep 26 09:50:46 2007
@@ -706,6 +706,7 @@
      *      see if it needs to be rebuilt.
      * @return true if the jar needs to be rebuilt.
      */
+    // CheckStyle:MethodLength OFF - this will no be fixed
     protected boolean isRebuildRequired(File genericJarFile, File weblogicJarFile) {
         boolean rebuild = false;
 

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java?rev=579713&r1=579712&r2=579713&view=diff
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
Wed Sep 26 09:50:46 2007
@@ -676,6 +676,7 @@
      *      see if it needs to be rebuilt.
      * @return true if a rebuild is required.
      */
+    // CheckStyle:MethodLength OFF - this will no be fixed
     protected boolean isRebuildRequired(File genericJarFile, File websphereJarFile) {
         boolean rebuild = false;
 

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java?rev=579713&r1=579712&r2=579713&view=diff
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/j2ee/WebLogicHotDeploymentTool.java
Wed Sep 26 09:50:46 2007
@@ -36,6 +36,7 @@
  */
 public class WebLogicHotDeploymentTool extends AbstractHotDeploymentTool
                                        implements HotDeploymentTool {
+    private static final int STRING_BUFFER_SIZE = 1024;
     /** The classname of the tool to run **/
     private static final String WEBLOGIC_DEPLOY_CLASS_NAME = "weblogic.deploy";
 
@@ -161,7 +162,7 @@
         ServerDeploy task = getTask();
         // constructs the "-url <url> -debug <action> <password>" portion
         // of the commmand line
-        return new StringBuffer(1024)
+        return new StringBuffer(STRING_BUFFER_SIZE)
                 .append((getServer() != null)
                     ? "-url " + getServer()
                     : "")

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java?rev=579713&r1=579712&r2=579713&view=diff
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
Wed Sep 26 09:50:46 2007
@@ -141,7 +141,9 @@
         helperTask.setFork(true);
         helperTask.setClassname("weblogic.jspc");
         helperTask.setTaskName(getTaskName());
+        // CheckStyle:MagicNumber OFF
         String[] args = new String[12];
+        // CheckStyle:MagicNumber ON
 
         File jspFile = null;
         String parents = "";
@@ -185,9 +187,11 @@
             args[j + 2] =  sourceDirectory + File.separator + filename;
             helperTask.clearArgs();
 
+            // CheckStyle:MagicNumber OFF
             for (int x = 0; x < j + 3; x++) {
                 helperTask.createArg().setValue(args[x]);
             }
+            // CheckStyle:MagicNumber ON
 
             helperTask.setClasspath(compileClasspath);
             if (helperTask.executeJava() != 0) {

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java?rev=579713&r1=579712&r2=579713&view=diff
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/types/selectors/modifiedselector/ModifiedSelector.java
Wed Sep 26 09:50:46 2007
@@ -145,6 +145,9 @@
 public class ModifiedSelector extends BaseExtendSelector
                               implements BuildListener, ResourceSelector {
 
+    private static final String CACHE_START = "cache.";
+    private static final String ALGORITHM_START = "algorithm.";
+    private static final String COMPARATOR_START = "comparator.";
 
     // -----  attributes  -----
 
@@ -747,14 +750,14 @@
                 ? true
                 : false;
             setSeldirs(sdValue);
-        } else if (key.startsWith("cache.")) {
-            String name = key.substring(6);
+        } else if (key.startsWith(CACHE_START)) {
+            String name = key.substring(CACHE_START.length());
             tryToSetAParameter(cache, name, value);
-        } else if (key.startsWith("algorithm.")) {
-            String name = key.substring(10);
+        } else if (key.startsWith(ALGORITHM_START)) {
+            String name = key.substring(ALGORITHM_START.length());
             tryToSetAParameter(algorithm, name, value);
-        } else if (key.startsWith("comparator.")) {
-            String name = key.substring(11);
+        } else if (key.startsWith(COMPARATOR_START)) {
+            String name = key.substring(COMPARATOR_START.length());
             tryToSetAParameter(comparator, name, value);
         } else {
             setError("Invalid parameter " + key);

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/DOMElementWriter.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/DOMElementWriter.java?rev=579713&r1=579712&r2=579713&view=diff
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/DOMElementWriter.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/DOMElementWriter.java
Wed Sep 26 09:50:46 2007
@@ -477,8 +477,10 @@
         int cdEnd = result.indexOf("]]>");
         while (cdEnd != -1) {
             sb.setLength(cdEnd);
+            // CheckStyle:MagicNumber OFF
             sb.append("&#x5d;&#x5d;&gt;")
                 .append(result.substring(cdEnd + 3));
+            // CheckStyle:MagicNumber ON
             result = sb.substring(0);
             cdEnd = result.indexOf("]]>");
         }
@@ -499,7 +501,9 @@
         if (ent.charAt(1) == '#') {
             if (ent.charAt(2) == 'x') {
                 try {
+                    // CheckStyle:MagicNumber OFF
                     Integer.parseInt(ent.substring(3, ent.length() - 1), HEX);
+                    // CheckStyle:MagicNumber ON
                     return true;
                 } catch (NumberFormatException nfe) {
                     return false;

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/UUEncoder.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/UUEncoder.java?rev=579713&r1=579712&r2=579713&view=diff
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/UUEncoder.java (original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/UUEncoder.java Wed
Sep 26 09:50:46 2007
@@ -33,6 +33,7 @@
 public class UUEncoder {
     protected static final int DEFAULT_MODE = 644;
     private static final int MAX_CHARS_PER_LINE = 45;
+    private static final int INPUT_BUFFER_SIZE = MAX_CHARS_PER_LINE * 100;
     private OutputStream out;
     private String name;
 
@@ -60,7 +61,7 @@
         throws IOException {
         this.out = out;
         encodeBegin();
-        byte[] buffer = new byte[MAX_CHARS_PER_LINE * 100];
+        byte[] buffer = new byte[INPUT_BUFFER_SIZE];
         int count;
         while ((count = is.read(buffer, 0, buffer.length)) != -1) {
             int pos = 0;

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java?rev=579713&r1=579712&r2=579713&view=diff
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/depend/bcel/DependencyVisitor.java
Wed Sep 26 09:50:46 2007
@@ -87,7 +87,8 @@
         String name = obj.getName(constantPool);
         if (obj.getSignature(constantPool).equals("Ljava/lang/Class;")
                 && name.startsWith("class$")) {
-            String classname = name.substring(6).replace('$', '.');
+            String classname
+                = name.substring("class$".length()).replace('$', '.');
             // does the class have a package structure
             int index = classname.lastIndexOf(".");
             if (index > 0) {



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


Mime
View raw message