You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by co...@apache.org on 2003/12/07 23:37:45 UTC

cvs commit: ant/src/main/org/apache/tools/ant/taskdefs ExecuteJava.java

conor       2003/12/07 14:37:45

  Modified:    src/main/org/apache/tools/ant/taskdefs ExecuteJava.java
  Log:
  Head sync
  
  Revision  Changes    Path
  1.39      +7 -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
  retrieving revision 1.39
  diff -u -w -u -r1.38 -r1.39
  --- ExecuteJava.java	13 Sep 2003 12:58:33 -0000	1.38
  +++ ExecuteJava.java	7 Dec 2003 22:37:45 -0000	1.39
  @@ -58,6 +58,7 @@
   import java.io.PrintStream;
   import java.lang.reflect.InvocationTargetException;
   import java.lang.reflect.Method;
  +import java.lang.reflect.Modifier;
   import org.apache.tools.ant.AntClassLoader;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.Project;
  @@ -158,6 +159,12 @@
                   throw new BuildException("Could not find main() method in "
                                            + classname);
               }
  +
  +            if ((main.getModifiers() & Modifier.STATIC) == 0) {
  +                throw new BuildException("main() method in " + classname
  +                    + " is not declared static");
  +            }
  +
   
               if (timeout == null) {
                   run();
  
  
  

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