- lowercase tags - removed some nesting
I'm seeing a lot of empty default constructors. Is there a policy for keeping these? I get moans about uncommented empty blocks, but I'd rather remove them if they aren't required
Kev
Index: org/apache/tools/ant/ExitStatusException.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/ExitStatusException.java,v retrieving revision 1.2 diff -u -r1.2 ExitStatusException.java --- org/apache/tools/ant/ExitStatusException.java 17 Jun 2004 20:35:31 -0000 1.2 +++ org/apache/tools/ant/ExitStatusException.java 10 Mar 2005 09:22:16 -0000 @@ -27,7 +27,7 @@ private int status; /** - * Constructs an <CODE>ExitStatusException</CODE>. + * Constructs an <code>ExitStatusException</code>. * @param status the associated status code */ public ExitStatusException(int status) { @@ -36,7 +36,7 @@ } /** - * Constructs an <CODE>ExitStatusException</CODE>. + * Constructs an <code>ExitStatusException</code>. * @param msg the associated message * @param status the associated status code */ @@ -47,9 +47,9 @@ /** * Get the status code. - * @return <CODE>int</CODE> + * @return <code>int</code> */ public int getStatus() { return status; } -} +} \ No newline at end of file Index: org/apache/tools/ant/Target.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/Target.java,v retrieving revision 1.57 diff -u -r1.57 Target.java --- org/apache/tools/ant/Target.java 13 Aug 2004 09:27:01 -0000 1.57 +++ org/apache/tools/ant/Target.java 10 Mar 2005 09:22:17 -0000 @@ -54,6 +54,7 @@ /** Sole constructor. */ public Target() { + //empty } /** @@ -79,7 +80,7 @@ /** * Sets the location of this target's definition. * - * @param location <CODE>Location</CODE> + * @param location <code>Location</code> * @since 1.6.2 */ public void setLocation(Location location) { @@ -89,7 +90,7 @@ /** * Get the location of this target's definition. * - * @return <CODE>Location</CODE> + * @return <code>Location</code> * @since 1.6.2 */ public Location getLocation() { @@ -208,11 +209,7 @@ * @return an enumeration of the dependencies of this target */ public Enumeration getDependencies() { - if (dependencies != null) { - return Collections.enumeration(dependencies); - } else { - return new CollectionUtils.EmptyEnumeration(); - } + return (dependencies != null ? Collections.enumeration(dependencies) : new CollectionUtils.EmptyEnumeration()); } /** @@ -439,4 +436,4 @@ String test = project.replaceProperties(unlessCondition); return project.getProperty(test) == null; } -} +} \ No newline at end of file Index: org/apache/tools/ant/filters/StringInputStream.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/filters/StringInputStream.java,v retrieving revision 1.18 diff -u -r1.18 StringInputStream.java --- org/apache/tools/ant/filters/StringInputStream.java 25 Jan 2005 15:31:36 -0000 1.18 +++ org/apache/tools/ant/filters/StringInputStream.java 10 Mar 2005 09:22:17 -0000 @@ -39,10 +39,10 @@ * Composes a stream from a String with the specified encoding * * @param source The string to read from. Must not be <code>null</code>. - * @param encoding The encoding scheme. Also must not be <CODE>null</CODE>. + * @param encoding The encoding scheme. Also must not be <code>null</code>. */ public StringInputStream(String source, String encoding) { super(new StringReader(source), encoding); } -} +} \ No newline at end of file Index: org/apache/tools/ant/taskdefs/AbstractCvsTask.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/AbstractCvsTask.java,v retrieving revision 1.35 diff -u -r1.35 AbstractCvsTask.java --- org/apache/tools/ant/taskdefs/AbstractCvsTask.java 17 Jul 2004 15:10:11 -0000 1.35 +++ org/apache/tools/ant/taskdefs/AbstractCvsTask.java 10 Mar 2005 09:22:17 -0000 @@ -346,25 +346,23 @@ } catch (IOException e) { if (failOnError) { throw new BuildException(e, getLocation()); - } else { - log("Caught exception: " + e.getMessage(), Project.MSG_WARN); } + log("Caught exception: " + e.getMessage(), Project.MSG_WARN); } catch (BuildException e) { - if (failOnError) { - throw(e); - } else { - Throwable t = e.getException(); - if (t == null) { - t = e; - } - log("Caught exception: " + t.getMessage(), Project.MSG_WARN); - } + if (failOnError) { + throw(e); + } + Throwable t = e.getException(); + if (t == null) { + t = e; + } + log("Caught exception: " + t.getMessage(), Project.MSG_WARN); } catch (Exception e) { - if (failOnError) { - throw new BuildException(e, getLocation()); - } else { - log("Caught exception: " + e.getMessage(), Project.MSG_WARN); - } + if (failOnError) { + throw new BuildException(e, getLocation()); + } + log("Caught exception: " + e.getMessage(), Project.MSG_WARN); + } } Index: org/apache/tools/ant/taskdefs/Ant.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v retrieving revision 1.117 diff -u -r1.117 Ant.java --- org/apache/tools/ant/taskdefs/Ant.java 18 Feb 2005 23:27:59 -0000 1.117 +++ org/apache/tools/ant/taskdefs/Ant.java 10 Mar 2005 09:22:18 -0000 @@ -79,7 +79,7 @@ private String antFile = null; /** the output */ - private String output = null; + private String output = null; /** should we inherit properties from the parent ? */ private boolean inheritAll = true; @@ -112,6 +112,7 @@ * simple constructor */ public Ant() { + //default } /** @@ -223,67 +224,61 @@ /** * @see Task#handleOutput(String) - * * @since Ant 1.5 */ - public void handleOutput(String output) { + public void handleOutput(String outputToHandle) { if (newProject != null) { - newProject.demuxOutput(output, false); + newProject.demuxOutput(outputToHandle, false); } else { - super.handleOutput(output); + super.handleOutput(outputToHandle); } } /** * @see Task#handleInput(byte[], int, int) - * * @since Ant 1.6 */ public int handleInput(byte[] buffer, int offset, int length) throws IOException { if (newProject != null) { return newProject.demuxInput(buffer, offset, length); - } else { - return super.handleInput(buffer, offset, length); } + return super.handleInput(buffer, offset, length); } /** * @see Task#handleFlush(String) - * * @since Ant 1.5.2 */ - public void handleFlush(String output) { + public void handleFlush(String toFlush) { if (newProject != null) { - newProject.demuxFlush(output, false); + newProject.demuxFlush(toFlush, false); } else { - super.handleFlush(output); + super.handleFlush(toFlush); } } /** * @see Task#handleErrorOutput(String) - * * @since Ant 1.5 */ - public void handleErrorOutput(String output) { + public void handleErrorOutput(String errorOutputToHandle) { if (newProject != null) { - newProject.demuxOutput(output, true); + newProject.demuxOutput(errorOutputToHandle, true); } else { - super.handleErrorOutput(output); + super.handleErrorOutput(errorOutputToHandle); } } /** * @see Task#handleErrorFlush(String) - * * @since Ant 1.5.2 */ - public void handleErrorFlush(String output) { + public void handleErrorFlush(String errorOutputToFlush) { if (newProject != null) { - newProject.demuxFlush(output, true); + newProject.demuxFlush(errorOutputToFlush, true); } else { - super.handleErrorFlush(output); + super.handleErrorFlush(errorOutputToFlush); } } @@ -344,11 +339,10 @@ if (getTaskName().equals("antcall")) { throw new BuildException("antcall must not be used at" + " the top level."); - } else { - throw new BuildException(getTaskName() + " task at the" - + " top level must not invoke" - + " its own build file."); } + throw new BuildException(getTaskName() + " task at the" + + " top level must not invoke" + + " its own build file."); } } @@ -375,11 +369,11 @@ if (locals.contains(owningTargetName)) { throw new BuildException(getTaskName() + " task calling " + "its own parent target."); - } else { + } boolean circular = false; for (Iterator it = locals.iterator(); !circular && it.hasNext();) { Target other = (Target) (getProject().getTargets().get( - (String) (it.next()))); + (it.next()))); circular |= (other != null && other.dependsOn(owningTargetName)); } @@ -391,7 +385,6 @@ + owningTargetName + "\'."); } - } } addReferences(); @@ -593,10 +586,10 @@ * Defaults to the current project's basedir, unless inheritall * has been set to false, in which case it doesn't have a default * value. This will override the basedir setting of the called project. - * @param d new directory as <code>File</code>. + * @param dir new directory as <code>File</code>. */ - public void setDir(File d) { - this.dir = d; + public void setDir(File dir) { + this.dir = dir; } /** @@ -604,23 +597,23 @@ * to be a filename relative to the dir attribute given. * @param s the <code>String</code> build file name. */ - public void setAntfile(String s) { + public void setAntfile(String antFile) { // @note: it is a string and not a file to handle relative/absolute // otherwise a relative file will be resolved based on the current // basedir. - this.antFile = s; + this.antFile = antFile; } /** * The target of the new Ant project to execute. * Defaults to the new project's default target. - * @param s the name of the target to invoke. + * @param targetToAdd the name of the target to invoke. */ - public void setTarget(String s) { - if (s.equals("")) { + public void setTarget(String targetToAdd) { + if (targetToAdd.equals("")) { throw new BuildException("target attribute must not be empty"); } - targets.add(s); + targets.add(targetToAdd); targetAttributeSet = true; } @@ -628,10 +621,10 @@ * Set the filename to write the output to. This is relative to the value * of the dir attribute if it has been set or to the base directory of the * current project otherwise. - * @param s the name of the file to which the output should go. + * @param outputFile the name of the file to which the output should go. */ - public void setOutput(String s) { - this.output = s; + public void setOutput(String outputFile) { + this.output = outputFile; } /** @@ -653,15 +646,15 @@ /** * Add a Reference element identifying a data type to carry * over to the new project. - * @param r <code>Reference</code> to add. + * @param ref <code>Reference</code> to add. */ - public void addReference(Reference r) { - references.addElement(r); + public void addReference(Reference ref) { + references.addElement(ref); } /** * Add a target to this Ant invocation. - * @param t the <CODE>TargetElement</CODE> to add. + * @param t the <code>TargetElement</code> to add. * @since Ant 1.6.3 */ public void addConfiguredTarget(TargetElement t) { @@ -702,7 +695,7 @@ /** Creates a reference to be configured by Ant. */ public Reference() { - super(); + super(); } private String targetid = null; @@ -740,11 +733,12 @@ * Default constructor. */ public TargetElement() { + //default } /** * Set the name of this TargetElement. - * @param name the <CODE>String</CODE> target name. + * @param name the <code>String</code> target name. */ public void setName(String name) { this.name = name; @@ -752,10 +746,10 @@ /** * Get the name of this TargetElement. - * @return <CODE>String</CODE>. + * @return <code>String</code>. */ public String getName() { return name; } } -} +} \ No newline at end of file Index: org/apache/tools/ant/taskdefs/Apt.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Apt.java,v retrieving revision 1.6 diff -u -r1.6 Apt.java --- org/apache/tools/ant/taskdefs/Apt.java 8 Feb 2005 18:52:38 -0000 1.6 +++ org/apache/tools/ant/taskdefs/Apt.java 10 Mar 2005 09:22:18 -0000 @@ -61,6 +61,7 @@ /** Constructor for Option */ public Option() { + //default } /**
Index: org/apache/tools/ant/taskdefs/CallTarget.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java,v retrieving revision 1.43 diff -u -r1.43 CallTarget.java --- org/apache/tools/ant/taskdefs/CallTarget.java 18 Feb 2005 23:27:59 -0000 1.43 +++ org/apache/tools/ant/taskdefs/CallTarget.java 10 Mar 2005 09:22:18 -0000 @@ -187,9 +187,8 @@ throws IOException { if (callee != null) { return callee.handleInput(buffer, offset, length); - } else { - return super.handleInput(buffer, offset, length); } + return super.handleInput(buffer, offset, length); } /** Index: org/apache/tools/ant/taskdefs/Concat.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Concat.java,v retrieving revision 1.41 diff -u -r1.41 Concat.java --- org/apache/tools/ant/taskdefs/Concat.java 6 Jan 2005 12:05:05 -0000 1.41 +++ org/apache/tools/ant/taskdefs/Concat.java 10 Mar 2005 09:22:20 -0000 @@ -237,20 +237,20 @@ /** * Add a header to the concatenated output - * @param header the header + * @param headerToAdd the header * @since Ant 1.6 */ - public void addHeader(TextElement header) { - this.header = header; + public void addHeader(TextElement headerToAdd) { + this.header = headerToAdd; } /** * Add a footer to the concatenated output - * @param footer the footer + * @param footerToAdd the footer * @since Ant 1.6 */ - public void addFooter(TextElement footer) { - this.footer = footer; + public void addFooter(TextElement footerToAdd) { + this.footer = footerToAdd; } /** Index: org/apache/tools/ant/taskdefs/Execute.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Execute.java,v retrieving revision 1.92 diff -u -r1.92 Execute.java --- org/apache/tools/ant/taskdefs/Execute.java 9 Mar 2005 00:20:41 -0000 1.92 +++ org/apache/tools/ant/taskdefs/Execute.java 10 Mar 2005 09:22:21 -0000 @@ -17,25 +17,30 @@ package org.apache.tools.ant.taskdefs; -import java.io.OutputStream; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.io.OutputStream; import java.io.PrintWriter; import java.io.StringReader; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; +import java.util.Map; +import java.util.Set; import java.util.Vector; + import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import org.apache.tools.ant.util.FileUtils; import org.apache.tools.ant.taskdefs.condition.Os; import org.apache.tools.ant.types.Commandline; +import org.apache.tools.ant.util.FileUtils; +import org.apache.tools.ant.util.JavaEnvUtils; /** * Runs an external program. @@ -147,6 +152,13 @@ return procEnvironment; } procEnvironment = new Vector(); + + //use Java5 funtionality to get environment + if (JavaEnvUtils.getJavaVersion().equals(JavaEnvUtils.JAVA_1_5)) { + procEnvironment.addAll(System.getenv().entrySet()); + return procEnvironment; + } + try { ByteArrayOutputStream out = new ByteArrayOutputStream(); Execute exe = new Execute(new PumpStreamHandler(out)); @@ -645,7 +657,7 @@ /** * Close the streams belonging to the given Process. - * @param process the <CODE>Process</CODE>. + * @param process the <code>Process</code>. */ public static void closeStreams(Process process) { FileUtils.close(process.getInputStream()); Index: org/apache/tools/ant/taskdefs/Exit.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Exit.java,v retrieving revision 1.37 diff -u -r1.37 Exit.java --- org/apache/tools/ant/taskdefs/Exit.java 1 Dec 2004 17:52:25 -0000 1.37 +++ org/apache/tools/ant/taskdefs/Exit.java 10 Mar 2005 09:22:21 -0000 @@ -37,9 +37,9 @@ * are true. i.e. * <pre>fail := defined(ifProperty) && !defined(unlessProperty)</pre> * - * A single nested<CODE><condition></CODE> element can be specified - * instead of using <CODE>if</CODE>/<CODE>unless</CODE> (a combined - * effect can be achieved using <CODE>isset</CODE> conditions). + * A single nested<code><condition></code> element can be specified + * instead of using <code>if</code>/<code>unless</code> (a combined + * effect can be achieved using <code>isset</code> conditions). * * @since Ant 1.2 * @@ -90,17 +90,17 @@ /** * Set the status code to associate with the thrown Exception. - * @param i the <CODE>int</CODE> status + * @param i the <code>int</code> status */ public void setStatus(int i) { status = new Integer(i); } /** - * Throw a <CODE>BuildException</CODE> to exit (fail) the build. + * Throw a <code>BuildException</code> to exit (fail) the build. * If specified, evaluate conditions: * A single nested condition is accepted, but requires that the - * <CODE>if</CODE>/<code>unless</code> attributes be omitted. + * <code>if</code>/<code>unless</code> attributes be omitted. * If the nested condition evaluates to true, or the * ifCondition is true or unlessCondition is false, the build will exit. * The error message is constructed from the text fields, from @@ -156,7 +156,7 @@ /** * Add a condition element. - * @return <CODE>ConditionBase</CODE>. + * @return <code>ConditionBase</code>. * @since Ant 1.6.2 */ public ConditionBase createCondition() { @@ -207,10 +207,10 @@ /** * test whether there is a nested condition. - * @return <CODE>boolean</CODE>. + * @return <code>boolean</code>. */ private boolean nestedConditionPresent() { return (nestedCondition != null); } -} +} \ No newline at end of file Index: org/apache/tools/ant/taskdefs/Javadoc.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v retrieving revision 1.132 diff -u -r1.132 Javadoc.java --- org/apache/tools/ant/taskdefs/Javadoc.java 14 Jan 2005 09:45:54 -0000 1.132 +++ org/apache/tools/ant/taskdefs/Javadoc.java 10 Mar 2005 09:22:22 -0000 @@ -48,21 +48,21 @@ * Generates Javadoc documentation for a collection * of source code. * - * <P>Current known limitations are: + * <p>Current known limitations are: * - * <P><UL> - * <LI>patterns must be of the form "xxx.*", every other pattern doesn't + * <p><ul> + * <li>patterns must be of the form "xxx.*", every other pattern doesn't * work. - * <LI>there is no control on arguments sanity since they are left + * <li>there is no control on arguments sanity since they are left * to the javadoc implementation. - * <LI>argument J in javadoc1 is not supported (what is that for anyway?) - * </UL> + * <li>argument J in javadoc1 is not supported (what is that for anyway?) + * </ul> * - * <P>If no <CODE>doclet</CODE> is set, then the <CODE>version</CODE> and - * <CODE>author</CODE> are by default <CODE>"yes"</CODE>. + * <p>If no <code>doclet</code> is set, then the <code>version</code> and + * <code>author</code> are by default <code>"yes"</code>. * - * <P>Note: This task is run on another VM because the Javadoc code calls - * <CODE>System.exit()</CODE> which would break Ant functionality. + * <p>Note: This task is run on another VM because the Javadoc code calls + * <code>System.exit()</code> which would break Ant functionality. * * @since Ant 1.1 * @@ -270,6 +270,7 @@ * Default constructor */ public SourceFile() { + //empty } /** @@ -1199,6 +1200,7 @@ private File packagelistLoc; public LinkArgument() { + //empty } public void setHref(String hr) { @@ -1269,6 +1271,7 @@ /** Sole constructor. */ public TagArgument () { + //empty } /** @@ -1401,6 +1404,7 @@ private Vector packages = new Vector(); public GroupArgument() { + //empty } public void setTitle(String src) { @@ -2113,4 +2117,4 @@ return getProject().replaceProperties(content); } -} +} \ No newline at end of file Index: org/apache/tools/ant/taskdefs/LoadProperties.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/LoadProperties.java,v retrieving revision 1.28 diff -u -r1.28 LoadProperties.java --- org/apache/tools/ant/taskdefs/LoadProperties.java 18 Feb 2005 23:27:59 -0000 1.28 +++ org/apache/tools/ant/taskdefs/LoadProperties.java 10 Mar 2005 09:22:23 -0000 @@ -133,7 +133,7 @@ } /** - * get the classpath used by this <CODE>LoadProperties</CODE>. + * get the classpath used by this <code>LoadProperties</code>. * @return The classpath */ public Path getClasspath() { @@ -253,4 +253,4 @@ } //end class -} +} \ No newline at end of file Index: org/apache/tools/ant/taskdefs/condition/Http.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/condition/Http.java,v retrieving revision 1.13 diff -u -r1.13 Http.java --- org/apache/tools/ant/taskdefs/condition/Http.java 9 Mar 2004 16:48:13 -0000 1.13 +++ org/apache/tools/ant/taskdefs/condition/Http.java 10 Mar 2005 09:22:23 -0000 @@ -36,7 +36,6 @@ /** * Set the url attribute - * * @param url the url of the request */ public void setUrl(String url) { @@ -47,7 +46,6 @@ /** * Set the errorsBeginAt attribute - * * @param errorsBeginAt number at which errors begin at, default is * 400 */ @@ -75,9 +73,8 @@ Project.MSG_VERBOSE); if (code > 0 && code < errorsBeginAt) { return true; - } else { - return false; - } + } + return false; } } catch (java.io.IOException e) { return false; @@ -87,4 +84,4 @@ } return true; } -} +} \ No newline at end of file Index: org/apache/tools/ant/taskdefs/condition/IsSigned.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/condition/IsSigned.java,v retrieving revision 1.3 diff -u -r1.3 IsSigned.java --- org/apache/tools/ant/taskdefs/condition/IsSigned.java 23 Nov 2004 10:40:14 -0000 1.3 +++ org/apache/tools/ant/taskdefs/condition/IsSigned.java 10 Mar 2005 09:22:23 -0000 @@ -16,14 +16,15 @@ */ package org.apache.tools.ant.taskdefs.condition; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.Project; -import org.apache.tools.ant.types.DataType; import java.io.File; import java.io.IOException; +import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; -import java.util.Enumeration; + +import org.apache.tools.ant.BuildException; +import org.apache.tools.ant.Project; +import org.apache.tools.ant.types.DataType; /** * Checks whether a jarfile is signed: if the name of the @@ -37,12 +38,11 @@ private static final String SIG_END = ".SF"; private String name; - private File file; + private File file; /** * The jarfile that is to be tested for the presence * of a signature. - * * @param file jarfile to be tested. */ public void setFile(File file) { @@ -51,7 +51,6 @@ /** * The signature name to check jarfile for. - * * @param name signature to look for. */ public void setName(String name) { @@ -59,8 +58,8 @@ } /** - * Returns <CODE>true</code> if the file exists and is signed with - * the signature specified, or, if <CODE>name</code> wasn't + * Returns <code>true</code> if the file exists and is signed with + * the signature specified, or, if <code>name</code> wasn't * specified, if the file contains a signature. * @return true if the file is signed. */ @@ -79,20 +78,19 @@ } } return false; - } else { - boolean shortSig = jarFile.getEntry(SIG_START - + name.toUpperCase() - + SIG_END) != null; - boolean longSig = false; - if (name.length() > 8) { - longSig = - jarFile.getEntry(SIG_START - + name.substring(0, 8).toUpperCase() - + SIG_END) != null; - } - - return shortSig || longSig; + } + boolean shortSig = jarFile.getEntry(SIG_START + + name.toUpperCase() + + SIG_END) != null; + boolean longSig = false; + if (name.length() > 8) { + longSig = + jarFile.getEntry(SIG_START + + name.substring(0, 8).toUpperCase() + + SIG_END) != null; } + + return shortSig || longSig; } finally { if (jarFile != null) { try { @@ -105,8 +103,8 @@ } /** - * Returns <CODE>true</code> if the file exists and is signed with - * the signature specified, or, if <CODE>name</code> wasn't + * Returns <code>true</code> if the file exists and is signed with + * the signature specified, or, if <code>name</code> wasn't * specified, if the file contains a signature. * @return true if the file is signed. */ @@ -134,4 +132,4 @@ } return r; } -} +} \ No newline at end of file Index: org/apache/tools/ant/taskdefs/condition/Os.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/condition/Os.java,v retrieving revision 1.35 diff -u -r1.35 Os.java --- org/apache/tools/ant/taskdefs/condition/Os.java 9 Mar 2005 00:20:40 -0000 1.35 +++ org/apache/tools/ant/taskdefs/condition/Os.java 10 Mar 2005 09:22:23 -0000 @@ -18,6 +18,7 @@ package org.apache.tools.ant.taskdefs.condition; import java.util.Locale; + import org.apache.tools.ant.BuildException; /** @@ -45,11 +46,11 @@ * */ public Os() { + //default } /** * Constructor that sets the family attribute - * * @param family a String value */ public Os(String family) { @@ -233,4 +234,4 @@ } return retValue; } -} +} \ No newline at end of file Index: org/apache/tools/ant/taskdefs/condition/ParserSupports.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/condition/ParserSupports.java,v retrieving revision 1.1 diff -u -r1.1 ParserSupports.java --- org/apache/tools/ant/taskdefs/condition/ParserSupports.java 25 Feb 2005 11:32:35 -0000 1.1 +++ org/apache/tools/ant/taskdefs/condition/ParserSupports.java 10 Mar 2005 09:22:23 -0000 @@ -16,16 +16,17 @@ */ package org.apache.tools.ant.taskdefs.condition; -import org.apache.tools.ant.ProjectComponent; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; +import org.apache.tools.ant.ProjectComponent; import org.apache.tools.ant.util.JAXPUtils; -import org.xml.sax.XMLReader; + import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; +import org.xml.sax.XMLReader; /** - * test for the XML parser supporting a particular feature + * Test for the XML parser supporting a particular feature * @since Ant 1.7 */ public class ParserSupports extends ProjectComponent implements Condition { @@ -47,7 +48,6 @@ /** * Feature to probe for. - * * @param feature */ public void setFeature(String feature) { @@ -71,33 +71,30 @@ this.value = value; } - - /** - * validate the args, then try to set the feature or property + * Validate the args, then try to set the feature or property * @return * @throws BuildException */ public boolean eval() throws BuildException { - if(feature!=null && property!=null) { + if(feature != null && property != null) { throw new BuildException(ERROR_BOTH_ATTRIBUTES); } - if(feature==null && property==null) { + if(feature == null && property == null) { throw new BuildException(ERROR_NO_ATTRIBUTES); } //pick a value that is good for everything - if(feature!=null) { + if(feature != null) { return evalFeature(); - } else { - if(value==null) { - throw new BuildException(ERROR_NO_VALUE); - } - return evalProperty(); } + if(value == null) { + throw new BuildException(ERROR_NO_VALUE); + } + return evalProperty(); } /** - * get our reader + * Get our reader * @return a reader */ private XMLReader getReader() { @@ -106,7 +103,7 @@ } /** - * set a feature + * Set a feature * @return true if the feature could be set */ public boolean evalFeature() { @@ -116,7 +113,7 @@ } boolean v= Project.toBoolean(value); try { - reader.setFeature(feature,v); + reader.setFeature(feature, v); } catch (SAXNotRecognizedException e) { log(FEATURE+NOT_RECOGNIZED+feature,Project.MSG_VERBOSE); return false; @@ -128,8 +125,7 @@ } /** - * set a feature - * + * Set a property * @return true if the feature could be set */ public boolean evalProperty() { @@ -145,6 +141,4 @@ } return true; } - - -} +} \ No newline at end of file Index: org/apache/tools/ant/types/selectors/modifiedselector/EqualComparator.java =================================================================== RCS file: /home/cvspublic/ant/src/main/org/apache/tools/ant/types/selectors/modifiedselector/EqualComparator.java,v retrieving revision 1.6 diff -u -r1.6 EqualComparator.java --- org/apache/tools/ant/types/selectors/modifiedselector/EqualComparator.java 9 Mar 2004 16:48:49 -0000 1.6 +++ org/apache/tools/ant/types/selectors/modifiedselector/EqualComparator.java 10 Mar 2005 09:22:28 -0000 @@ -41,12 +41,10 @@ if (o1 == null) { if (o2 == null) { return 1; - } else { - return 0; } - } else { - return (o1.equals(o2)) ? 0 : 1; + return 0; } + return (o1.equals(o2)) ? 0 : 1; } /**
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]