ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject svn commit: r564924 - in /ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant: input/SecureInputHandler.java taskdefs/condition/ResourceContains.java taskdefs/optional/ssh/SSHExec.java util/ScriptRunnerBase.java
Date Sat, 11 Aug 2007 13:41:58 GMT
Author: peterreilly
Date: Sat Aug 11 06:41:57 2007
New Revision: 564924

URL: http://svn.apache.org/viewvc?view=rev&rev=564924
Log:
merge

Modified:
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/input/SecureInputHandler.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
    ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/input/SecureInputHandler.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/input/SecureInputHandler.java?view=diff&rev=564924&r1=564923&r2=564924
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/input/SecureInputHandler.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/input/SecureInputHandler.java
Sat Aug 11 06:41:57 2007
@@ -31,7 +31,8 @@
     /**
      * Default no-args constructor
      */
-    public SecureInputHandler(){}
+    public SecureInputHandler() {
+    }
 
     /**
      * Handle the input
@@ -44,7 +45,9 @@
             Class system = Class.forName("java.lang.System");
             Object console = ReflectUtil.invokeStatic(system, "console");
             do {
-                char[] input = (char[])ReflectUtil.invoke(console, "readPassword", String.class,
prompt, Object[].class, (Object[]) null);
+                char[] input = (char[]) ReflectUtil.invoke(
+                    console, "readPassword", String.class, prompt,
+                    Object[].class, (Object[]) null);
                 request.setInput(new String(input));
                 /* for security zero char array after retrieving value */
                 java.util.Arrays.fill(input, ' ');

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java?view=diff&rev=564924&r1=564923&r2=564924
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/condition/ResourceContains.java
Sat Aug 11 06:41:57 2007
@@ -60,7 +60,7 @@
 
     /**
      * Sets the resource to search
-     * @param r
+     * @param r the value to use.
      */
     public void setResource(String r) {
         this.resource = new FileResource(new File(r));
@@ -69,7 +69,7 @@
     /**
      * Sets the refid to search; should indicate a resource directly
      * or by way of a single-element ResourceCollection.
-     * @param refid
+     * @param refid the value to use.
      */
     public void setRefid(String refid) {
         this.refid = refid;
@@ -88,8 +88,8 @@
                         o = rc.iterator().next();
                     }
                 } else {
-                    throw new BuildException("Illegal value at '" + refid +"': "
-                            + String.valueOf(o));
+                    throw new BuildException(
+                        "Illegal value at '" + refid + "': " + String.valueOf(o));
                 }
             }
             this.resource = (Resource) o;
@@ -100,15 +100,15 @@
 
     /**
      * Sets the substring to look for
-     * @param substring
+     * @param substring the value to use.
      */
     public void setSubstring(String substring) {
         this.substring = substring;
     }
 
     /**
-     * Sets case sensitivity
-     * @param casesensitive
+     * Sets case sensitivity attribute.
+     * @param casesensitive the value to use.
      */
     public void setCasesensitive(boolean casesensitive) {
         this.casesensitive = casesensitive;
@@ -128,15 +128,17 @@
     }
 
     /**
-     * Evaluates
-     * Returns true if the substring is contained in the resource
+     * Evaluates the condition.
+     * @return true if the substring is contained in the resource
+     * @throws BuildException if there is a problem.
      */
     public synchronized boolean eval() throws BuildException {
         validate();
 
         if (substring.length() == 0) {
             if (getProject() != null) {
-                getProject().log("Substring is empty; returning true", Project.MSG_VERBOSE);
+                getProject().log("Substring is empty; returning true",
+                                 Project.MSG_VERBOSE);
             }
             return true;
         }

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java?view=diff&rev=564924&r1=564923&r2=564924
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHExec.java
Sat Aug 11 06:41:57 2007
@@ -80,7 +80,7 @@
 
     /**
      * Sets a commandResource from a file
-     * @param f
+     * @param f the value to use.
      * @since Ant 1.7.1
      */
     public void setCommandResource(String f) {
@@ -150,14 +150,15 @@
 
         /* called once */
         if (command != null) {
-            log("cmd : "+command, Project.MSG_INFO);
+            log("cmd : " + command, Project.MSG_INFO);
             executeCommand(command);
         } else { // read command resource and execute for each command
             try {
-                BufferedReader br = new BufferedReader(new InputStreamReader(commandResource.getInputStream()));
+                BufferedReader br = new BufferedReader(
+                    new InputStreamReader(commandResource.getInputStream()));
                 String cmd;
-                while((cmd = br.readLine()) != null) {
-                    log("cmd : "+cmd, Project.MSG_INFO);
+                while ((cmd = br.readLine()) != null) {
+                    log("cmd : " + cmd, Project.MSG_INFO);
                     executeCommand(cmd);
                 }
                 FileUtils.close(br);

Modified: ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
URL: http://svn.apache.org/viewvc/ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java?view=diff&rev=564924&r1=564923&r2=564924
==============================================================================
--- ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
(original)
+++ ant/core/branches/ANT_17_BRANCH/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
Sat Aug 11 06:41:57 2007
@@ -215,7 +215,7 @@
             in = new BufferedReader(reader);
             script += FileUtils.readFully(in);
         } catch (IOException ex) {
-            throw new BuildException("Failed to read "+ name,ex);
+            throw new BuildException("Failed to read " + name, ex);
         } finally {
             FileUtils.close(in);
         }
@@ -234,9 +234,10 @@
         try {
             in = sourceResource.getInputStream();
         } catch (IOException e) {
-            throw new BuildException("Failed to open "+name,e);
+            throw new BuildException("Failed to open " + name, e);
         } catch (UnsupportedOperationException e) {
-            throw new BuildException("Failed to open " + name+ " -it is not readable",e);
+            throw new BuildException(
+                "Failed to open " + name + " -it is not readable", e);
         }
         readSource(new InputStreamReader(in), name);
     }



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


Mime
View raw message