Author: bodewig
Date: Mon Jan 30 21:27:33 2006
New Revision: 373716
URL: http://svn.apache.org/viewcvs?rev=373716&view=rev
Log:
whitespace
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java
URL:
http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java?rev=373716&r1=373715&r2=373716&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java
(original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java Mon
Jan 30 21:27:33 2006
@@ -234,54 +234,54 @@
*/
public boolean eval() throws BuildException {
try {
- if (classname == null && file == null && resource == null) {
- throw new BuildException("At least one of (classname|file|"
- + "resource) is required", getLocation());
- }
- if (type != null) {
- if (file == null) {
- throw new BuildException("The type attribute is only valid "
- + "when specifying the file "
- + "attribute.", getLocation());
- }
- }
- if (classpath != null) {
- classpath.setProject(getProject());
- this.loader = getProject().createClassLoader(classpath);
- }
- String appendix = "";
- if (isTask) {
- appendix = " to set property " + property;
- } else {
- setTaskName("available");
- }
- if ((classname != null) && !checkClass(classname)) {
- log("Unable to load class " + classname + appendix,
- Project.MSG_VERBOSE);
- return false;
- }
- if ((file != null) && !checkFile()) {
- StringBuffer buf = new StringBuffer("Unable to find ");
+ if (classname == null && file == null && resource == null) {
+ throw new BuildException("At least one of (classname|file|"
+ + "resource) is required",
getLocation());
+ }
if (type != null) {
- buf.append(type).append(' ');
+ if (file == null) {
+ throw new BuildException("The type attribute is only valid
"
+ + "when specifying the file "
+ + "attribute.", getLocation());
+ }
+ }
+ if (classpath != null) {
+ classpath.setProject(getProject());
+ this.loader = getProject().createClassLoader(classpath);
+ }
+ String appendix = "";
+ if (isTask) {
+ appendix = " to set property " + property;
+ } else {
+ setTaskName("available");
+ }
+ if ((classname != null) && !checkClass(classname)) {
+ log("Unable to load class " + classname + appendix,
+ Project.MSG_VERBOSE);
+ return false;
+ }
+ if ((file != null) && !checkFile()) {
+ StringBuffer buf = new StringBuffer("Unable to find ");
+ if (type != null) {
+ buf.append(type).append(' ');
+ }
+ buf.append(filename).append(appendix);
+ log(buf.toString(), Project.MSG_VERBOSE);
+ return false;
+ }
+ if ((resource != null) && !checkResource(resource)) {
+ log("Unable to load resource " + resource + appendix,
+ Project.MSG_VERBOSE);
+ return false;
}
- buf.append(filename).append(appendix);
- log(buf.toString(), Project.MSG_VERBOSE);
- return false;
- }
- if ((resource != null) && !checkResource(resource)) {
- log("Unable to load resource " + resource + appendix,
- Project.MSG_VERBOSE);
- return false;
- }
} finally {
- if (loader != null) {
- loader.cleanup();
- loader = null;
- }
- if (!isTask) {
- setTaskName(null);
- }
+ if (loader != null) {
+ loader.cleanup();
+ loader = null;
+ }
+ if (!isTask) {
+ setTaskName(null);
+ }
}
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]