git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@373714 13f79535-47bb-0310-9956-ffa450edef68master
@@ -210,6 +210,7 @@ Stefan Bodewig | |||||
Stefano Mazzocchi | Stefano Mazzocchi | ||||
Stephane Bailliez | Stephane Bailliez | ||||
stephan | stephan | ||||
Stephan Michels | |||||
Stephen Chin | Stephen Chin | ||||
Steve Cohen | Steve Cohen | ||||
Steve Loughran | Steve Loughran | ||||
@@ -181,6 +181,8 @@ Fixed bugs: | |||||
* <junit> task did not print all the Test names when using forkmode='once'. | * <junit> task did not print all the Test names when using forkmode='once'. | ||||
Bugzilla report 37426. | Bugzilla report 37426. | ||||
* <available> could leak resources, Bugzilla Report 38260. | |||||
Other changes: | Other changes: | ||||
-------------- | -------------- | ||||
* Minor performance improvements Bugzilla report 37777 | * Minor performance improvements Bugzilla report 37777 | ||||
@@ -856,6 +856,10 @@ | |||||
<name> | <name> | ||||
<last>stephan</last> | <last>stephan</last> | ||||
</name> | </name> | ||||
<name> | |||||
<first>Stephan</first> | |||||
<last>Michels</last> | |||||
</name> | |||||
<name> | <name> | ||||
<first>Stephen</first> | <first>Stephen</first> | ||||
<last>Chin</last> | <last>Chin</last> | ||||
@@ -1,5 +1,5 @@ | |||||
/* | /* | ||||
* Copyright 2000-2005 The Apache Software Foundation | |||||
* Copyright 2000-2006 The Apache Software Foundation | |||||
* | * | ||||
* Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
* you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
@@ -233,6 +233,7 @@ public class Available extends Task implements Condition { | |||||
* @exception BuildException if the condition is not configured correctly | * @exception BuildException if the condition is not configured correctly | ||||
*/ | */ | ||||
public boolean eval() throws BuildException { | public boolean eval() throws BuildException { | ||||
try { | |||||
if (classname == null && file == null && resource == null) { | if (classname == null && file == null && resource == null) { | ||||
throw new BuildException("At least one of (classname|file|" | throw new BuildException("At least one of (classname|file|" | ||||
+ "resource) is required", getLocation()); | + "resource) is required", getLocation()); | ||||
@@ -273,6 +274,7 @@ public class Available extends Task implements Condition { | |||||
Project.MSG_VERBOSE); | Project.MSG_VERBOSE); | ||||
return false; | return false; | ||||
} | } | ||||
} finally { | |||||
if (loader != null) { | if (loader != null) { | ||||
loader.cleanup(); | loader.cleanup(); | ||||
loader = null; | loader = null; | ||||
@@ -280,6 +282,7 @@ public class Available extends Task implements Condition { | |||||
if (!isTask) { | if (!isTask) { | ||||
setTaskName(null); | setTaskName(null); | ||||
} | } | ||||
} | |||||
return true; | return true; | ||||
} | } | ||||
@@ -1,5 +1,5 @@ | |||||
/* | /* | ||||
* Copyright 2000-2005 The Apache Software Foundation | |||||
* Copyright 2000-2006 The Apache Software Foundation | |||||
* | * | ||||
* Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
* you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
@@ -665,6 +665,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
JarFile wlJar = null; | JarFile wlJar = null; | ||||
File newWLJarFile = null; | File newWLJarFile = null; | ||||
JarOutputStream newJarStream = null; | JarOutputStream newJarStream = null; | ||||
ClassLoader genericLoader = null; | |||||
try { | try { | ||||
log("Checking if weblogic Jar needs to be rebuilt for jar " + weblogicJarFile.getName(), | log("Checking if weblogic Jar needs to be rebuilt for jar " + weblogicJarFile.getName(), | ||||
@@ -694,8 +695,7 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
} | } | ||||
//Cycle Through generic and make sure its in weblogic | //Cycle Through generic and make sure its in weblogic | ||||
ClassLoader genericLoader | |||||
= getClassLoaderFromJar(genericJarFile); | |||||
genericLoader = getClassLoaderFromJar(genericJarFile); | |||||
for (Enumeration e = genericEntries.keys(); e.hasMoreElements();) { | for (Enumeration e = genericEntries.keys(); e.hasMoreElements();) { | ||||
String filepath = (String) e.nextElement(); | String filepath = (String) e.nextElement(); | ||||
@@ -797,11 +797,6 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
log("Weblogic Jar rebuild needed due to changed " | log("Weblogic Jar rebuild needed due to changed " | ||||
+ "interface or XML", Project.MSG_VERBOSE); | + "interface or XML", Project.MSG_VERBOSE); | ||||
} | } | ||||
if (genericLoader instanceof AntClassLoader) { | |||||
AntClassLoader loader = (AntClassLoader) genericLoader; | |||||
loader.cleanup(); | |||||
} | |||||
} else { | } else { | ||||
rebuild = true; | rebuild = true; | ||||
} | } | ||||
@@ -846,6 +841,11 @@ public class WeblogicDeploymentTool extends GenericDeploymentTool { | |||||
rebuild = true; | rebuild = true; | ||||
} | } | ||||
} | } | ||||
if (genericLoader != null | |||||
&& genericLoader instanceof AntClassLoader) { | |||||
AntClassLoader loader = (AntClassLoader) genericLoader; | |||||
loader.cleanup(); | |||||
} | |||||
} | } | ||||
return rebuild; | return rebuild; | ||||