|
|
@@ -749,15 +749,6 @@ public class Main implements AntMain { |
|
|
|
final PrintStream savedErr = System.err; |
|
|
|
final PrintStream savedOut = System.out; |
|
|
|
final InputStream savedIn = System.in; |
|
|
|
|
|
|
|
// use a system manager that prevents from System.exit() |
|
|
|
SecurityManager oldsm = null; |
|
|
|
oldsm = System.getSecurityManager(); |
|
|
|
|
|
|
|
//SecurityManager can not be installed here for backwards |
|
|
|
//compatibility reasons (PD). Needs to be loaded prior to |
|
|
|
//ant class if we are going to implement it. |
|
|
|
//System.setSecurityManager(new NoExitSecurityManager()); |
|
|
|
try { |
|
|
|
if (allowInput) { |
|
|
|
project.setDefaultInputStream(System.in); |
|
|
@@ -826,12 +817,6 @@ public class Main implements AntMain { |
|
|
|
|
|
|
|
project.executeTargets(targets); |
|
|
|
} finally { |
|
|
|
// put back the original security manager |
|
|
|
//The following will never eval to true. (PD) |
|
|
|
if (oldsm != null) { |
|
|
|
System.setSecurityManager(oldsm); |
|
|
|
} |
|
|
|
|
|
|
|
System.setOut(savedOut); |
|
|
|
System.setErr(savedErr); |
|
|
|
System.setIn(savedIn); |
|
|
|