ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/types CommandlineJava.java Environment.java
Date Wed, 04 May 2005 09:22:41 GMT
bodewig     2005/05/04 02:22:41

  Modified:    src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        ExecuteJava.java
               src/main/org/apache/tools/ant/types Tag: ANT_16_BRANCH
                        CommandlineJava.java Environment.java
  Log:
  merge
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.38.2.8  +2 -0      ant/src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java
  
  Index: ExecuteJava.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java,v
  retrieving revision 1.38.2.7
  retrieving revision 1.38.2.8
  diff -u -r1.38.2.7 -r1.38.2.8
  --- ExecuteJava.java	29 Mar 2005 20:40:01 -0000	1.38.2.7
  +++ ExecuteJava.java	4 May 2005 09:22:41 -0000	1.38.2.8
  @@ -170,6 +170,8 @@
               throw new BuildException("Could not find " + classname + "."
                                        + " Make sure you have it in your"
                                        + " classpath");
  +        } catch (BuildException e) {
  +            throw e;
           } catch (SecurityException e) {
               throw e;
           } catch (ThreadDeath e) {
  
  
  
  No                   revision
  No                   revision
  1.47.2.10 +1 -0      ant/src/main/org/apache/tools/ant/types/CommandlineJava.java
  
  Index: CommandlineJava.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/CommandlineJava.java,v
  retrieving revision 1.47.2.9
  retrieving revision 1.47.2.10
  diff -u -r1.47.2.9 -r1.47.2.10
  --- CommandlineJava.java	4 Feb 2005 08:13:47 -0000	1.47.2.9
  +++ CommandlineJava.java	4 May 2005 09:22:41 -0000	1.47.2.10
  @@ -135,6 +135,7 @@
                   p.putAll(mergePropertySets());
                   for (Enumeration e = variables.elements(); e.hasMoreElements();) {
                       Environment.Variable v = (Environment.Variable) e.nextElement();
  +                    v.validate();
                       p.put(v.getKey(), v.getValue());
                   }
                   System.setProperties(p);
  
  
  
  1.13.2.5  +11 -3     ant/src/main/org/apache/tools/ant/types/Environment.java
  
  Index: Environment.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Environment.java,v
  retrieving revision 1.13.2.4
  retrieving revision 1.13.2.5
  diff -u -r1.13.2.4 -r1.13.2.5
  --- Environment.java	9 Mar 2004 17:01:54 -0000	1.13.2.4
  +++ Environment.java	4 May 2005 09:22:41 -0000	1.13.2.5
  @@ -109,13 +109,21 @@
            * @throws BuildException if key or value are unassigned
            */
           public String getContent() throws BuildException {
  +            validate();
  +            StringBuffer sb = new StringBuffer(key.trim());
  +            sb.append("=").append(value.trim());
  +            return sb.toString();
  +        }
  +
  +        /**
  +         * checks whether all required attributes have been specified.
  +         * @throws BuildException if key or value are unassigned
  +         */
  +        public void validate() {
               if (key == null || value == null) {
                   throw new BuildException("key and value must be specified "
                       + "for environment variables.");
               }
  -            StringBuffer sb = new StringBuffer(key.trim());
  -            sb.append("=").append(value.trim());
  -            return sb.toString();
           }
       }
   
  
  
  

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


Mime
View raw message