ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cvs commit: ant/src/testcases/org/apache/tools/ant/types CommandlineJavaTest.java
Date Thu, 07 Oct 2004 10:59:45 GMT
stevel      2004/10/07 03:59:45

  Modified:    src/main/org/apache/tools/ant/types CommandlineJava.java
               src/testcases/org/apache/tools/ant/types
                        CommandlineJavaTest.java
  Log:
  Dont ask me why jikes decided to go all fussy on me. It has, and these are the corrections.
  
  Revision  Changes    Path
  1.56      +12 -10    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.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- CommandlineJava.java	20 Apr 2004 06:24:25 -0000	1.55
  +++ CommandlineJava.java	7 Oct 2004 10:59:45 -0000	1.56
  @@ -17,17 +17,17 @@
   
   package org.apache.tools.ant.types;
   
  -import java.util.Enumeration;
  -import java.util.Properties;
  -import java.util.Vector;
  -import java.util.List;
  -import java.util.LinkedList;
  -import java.util.ListIterator;
  -
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.util.JavaEnvUtils;
   
  +import java.util.Enumeration;
  +import java.util.LinkedList;
  +import java.util.List;
  +import java.util.ListIterator;
  +import java.util.Properties;
  +import java.util.Vector;
  +
   /**
    * A representation of a Java command line that is
    * a composite of 2 <tt>Commandline</tt>. One is used for the
  @@ -74,7 +74,7 @@
        * Specialized Environment class for System properties
        */
       public static class SysProperties extends Environment implements Cloneable {
  -        Properties sys = null;
  +        private Properties sys = null;
           private Vector propertySets = new Vector();
   
           /**
  @@ -170,7 +170,7 @@
            *  deep clone
            * @return a cloned instance of SysProperties
            */
  -        public Object clone() {
  +        public Object clone() throws CloneNotSupportedException {
               try {
                   SysProperties c = (SysProperties) super.clone();
                   c.variables = (Vector) variables.clone();
  @@ -566,8 +566,10 @@
       /**
        * clone the object; clone of all fields in the class
        * @return a CommandlineJava object
  +     * @throws BuildException if anything went wrong.
  +     * @throws CloneNotSupportedException never
        */
  -    public Object clone() {
  +    public Object clone() throws CloneNotSupportedException {
           try {
               CommandlineJava c = (CommandlineJava) super.clone();
               c.vmCommand = (Commandline) vmCommand.clone();
  
  
  
  1.25      +3 -7      ant/src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java
  
  Index: CommandlineJavaTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/types/CommandlineJavaTest.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- CommandlineJavaTest.java	20 Apr 2004 06:24:25 -0000	1.24
  +++ CommandlineJavaTest.java	7 Oct 2004 10:59:45 -0000	1.25
  @@ -17,14 +17,10 @@
   
   package org.apache.tools.ant.types;
   
  +import junit.framework.TestCase;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.util.JavaEnvUtils;
   
  -import junit.framework.TestCase;
  -import junit.framework.AssertionFailedError;
  -
  -import java.io.File;
  -
   /**
    * JUnit 3 testcases for org.apache.tools.ant.CommandlineJava
    *
  @@ -55,7 +51,7 @@
           }
       }
   
  -    public void testGetCommandline() {
  +    public void testGetCommandline() throws Exception {
           CommandlineJava c = new CommandlineJava();
           c.createArgument().setValue("org.apache.tools.ant.CommandlineJavaTest");
           c.setClassname("junit.textui.TestRunner");
  @@ -143,7 +139,7 @@
           assertNull(System.getProperty("key2"));
       }
   
  -    public void testAssertions() {
  +    public void testAssertions() throws Exception {
           if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2)
               || JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_3)) {
               return;
  
  
  

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


Mime
View raw message