You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/12/15 07:19:16 UTC

cvs commit: jakarta-ant/src/main/org/apache/tools/ant Main.java

donaldp     01/12/14 22:19:16

  Modified:    src/main/org/apache/tools/ant Main.java
  Log:
  Revert setting of security manager.
  
  Revision  Changes    Path
  1.51      +8 -1      jakarta-ant/src/main/org/apache/tools/ant/Main.java
  
  Index: Main.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Main.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- Main.java	2001/12/14 23:36:17	1.50
  +++ Main.java	2001/12/15 06:19:15	1.51
  @@ -164,6 +164,7 @@
               }
               System.exit(1);
           } catch(Throwable exc) {
  +            exc.printStackTrace();
               printMessage(exc);
               System.exit(1);
           }
  @@ -424,7 +425,11 @@
               if ( !Project.JAVA_1_0.equals(Project.getJavaVersion()) &&
                   !Project.JAVA_1_1.equals(Project.getJavaVersion()) ){
                   oldsm = System.getSecurityManager();
  -                System.setSecurityManager(new NoExitSecurityManager());
  +
  +                //SecurityManager can not be installed here for backwards 
  +                //compatability reasons (PD). Needs to be loaded prior to
  +                //ant class if we are going to implement it.
  +                //System.setSecurityManager(new NoExitSecurityManager());
               }
               try {
                   System.setOut(new PrintStream(new DemuxOutputStream(project, false)));
  @@ -476,9 +481,11 @@
               }
               finally {
                   // put back the original security manager
  +                //The following will never eval to true. (PD)
                   if (oldsm != null){
                       System.setSecurityManager(oldsm);
                   }
  +
                   System.setOut(out);
                   System.setErr(err);
               }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>