Author: peterreilly Date: Sun Nov 12 14:43:14 2006 New Revision: 474080 URL: http://svn.apache.org/viewvc?view=rev&rev=474080 Log: checkstyle
Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/LogLevel.java ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java ant/core/trunk/src/main/org/apache/tools/ant/types/resources/CompressedResource.java ant/core/trunk/src/main/org/apache/tools/ant/types/resources/PropertyResource.java ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Compare.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/LogLevel.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/LogLevel.java?view=diff&rev=474080&r1=474079&r2=474080 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/types/LogLevel.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/LogLevel.java Sun Nov 12 14:43:14 2006 @@ -29,7 +29,6 @@ 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.types.EnumeratedAttribute; /** Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java?view=diff&rev=474080&r1=474079&r2=474080 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/PropertySet.java Sun Nov 12 14:43:14 2006 @@ -30,7 +30,6 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; -import org.apache.tools.ant.types.ResourceCollection; import org.apache.tools.ant.types.resources.PropertyResource; import org.apache.tools.ant.util.FileNameMapper; import org.apache.tools.ant.util.regexp.RegexpMatcher; @@ -440,7 +439,7 @@ static final String ALL = "all"; static final String SYSTEM = "system"; static final String COMMANDLINE = "commandline"; - /** @see EnumeratedAttribute#getValues() */ + /** [EMAIL PROTECTED] */ public String[] getValues() { return new String[] {ALL, SYSTEM, COMMANDLINE}; } Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/CompressedResource.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/CompressedResource.java?view=diff&rev=474080&r1=474079&r2=474080 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/CompressedResource.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/CompressedResource.java Sun Nov 12 14:43:14 2006 @@ -40,9 +40,14 @@ private Resource resource; + /** no arg constructor */ public CompressedResource() { } + /** + * Constructor with another resource to wrap. + * @param other the resource to wrap. + */ public CompressedResource(ResourceCollection other) { addConfigured(other); } @@ -64,12 +69,21 @@ resource = (Resource) a.iterator().next(); } + /** + * Get the name of the resource. + * @return the name of the wrapped resource. + */ public String getName() { return getResource().getName(); } - public void setName(String name) { + /** + * Overridden, not allowed to set the name of the resource. + * @param name not used. + * @throws BuildException always. + */ + public void setName(String name) throws BuildException { throw new BuildException("you can't change the name of a compressed" + " resource"); } @@ -101,7 +115,12 @@ return getResource().getLastModified(); } - public void setLastModified(long lastmodified) { + /** + * Override setLastModified. + * @param lastmodified not used. + * @throws BuildException always. + */ + public void setLastModified(long lastmodified) throws BuildException { throw new BuildException("you can't change the timestamp of a " + " compressed resource"); } @@ -114,7 +133,12 @@ return getResource().isDirectory(); } - public void setDirectory(boolean directory) { + /** + * Override setDirectory. + * @param directory not used. + * @throws BuildException always. + */ + public void setDirectory(boolean directory) throws BuildException { throw new BuildException("you can't change the directory state of a " + " compressed resource"); } @@ -147,7 +171,12 @@ } } - public void setSize(long size) { + /** + * Override setSize. + * @param size not used. + * @throws BuildException always. + */ + public void setSize(long size) throws BuildException { throw new BuildException("you can't change the size of a " + " compressed resource"); } @@ -163,10 +192,10 @@ return 0; } if (other instanceof CompressedResource) { - return getResource().compareTo(((CompressedResource)other).getResource()); + return getResource().compareTo( + ((CompressedResource) other).getResource()); } return getResource().compareTo(other); - } /** @@ -176,7 +205,7 @@ public int hashCode() { return getResource().hashCode(); } - + /** * Get an InputStream for the Resource. * @return an InputStream containing this Resource's content. @@ -242,6 +271,8 @@ * Is supposed to wrap the stream to allow decompression on the fly. * * @param in InputStream to wrap, will never be null. + * @return a compressed inputstream. + * @throws IOException if there is a problem. */ protected abstract InputStream wrapStream(InputStream in) throws IOException; @@ -250,6 +281,8 @@ * Is supposed to wrap the stream to allow compression on the fly. * * @param out OutputStream to wrap, will never be null. + * @return a compressed outputstream. + * @throws IOException if there is a problem. */ protected abstract OutputStream wrapStream(OutputStream out) throws IOException; Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/PropertyResource.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/PropertyResource.java?view=diff&rev=474080&r1=474079&r2=474080 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/PropertyResource.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/PropertyResource.java Sun Nov 12 14:43:14 2006 @@ -51,6 +51,7 @@ /** * Construct a new PropertyResource with the specified name. + * @param p the project to use. * @param n the String name of this PropertyResource (Ant property name/key). */ public PropertyResource(Project p, String n) { Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java?view=diff&rev=474080&r1=474079&r2=474080 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/Sort.java Sun Nov 12 14:43:14 2006 @@ -18,7 +18,6 @@ package org.apache.tools.ant.types.resources; import java.util.Stack; -import java.util.Vector; import java.util.TreeMap; import java.util.Iterator; import java.util.Collection; Modified: ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Compare.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Compare.java?view=diff&rev=474080&r1=474079&r2=474080 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Compare.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/types/resources/selectors/Compare.java Sun Nov 12 14:43:14 2006 @@ -18,14 +18,7 @@ package org.apache.tools.ant.types.resources.selectors; import java.util.Stack; -import java.util.Vector; -import java.util.TreeMap; import java.util.Iterator; -import java.util.Collection; -import java.util.Comparator; -import java.util.Collections; -import java.util.AbstractCollection; -import java.util.NoSuchElementException; import org.apache.tools.ant.Project; import org.apache.tools.ant.BuildException; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]