Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 30343 invoked from network); 12 Aug 2007 18:21:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2007 18:21:23 -0000 Received: (qmail 8093 invoked by uid 500); 12 Aug 2007 18:21:20 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 8048 invoked by uid 500); 12 Aug 2007 18:21:20 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 8037 invoked by uid 500); 12 Aug 2007 18:21:20 -0000 Received: (qmail 8034 invoked by uid 99); 12 Aug 2007 18:21:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2007 11:21:20 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Aug 2007 18:21:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3A2A71A981A; Sun, 12 Aug 2007 11:21:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r565102 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ Date: Sun, 12 Aug 2007 18:21:00 -0000 To: ant-cvs@apache.org From: peterreilly@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070812182101.3A2A71A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: peterreilly Date: Sun Aug 12 11:20:59 2007 New Revision: 565102 URL: http://svn.apache.org/viewvc?view=rev&rev=565102 Log: checkstyle Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Componentdef.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DependSet.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ear.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Truncate.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Available.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- 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 Sun Aug 12 11:20:59 2007 @@ -340,9 +340,9 @@ // ** full-pathname specified == path in list // ** simple name specified == path in list - if (path.exists() && - (filename.equals(paths[i]) - || filename.equals(path.getName()))) { + if (path.exists() + && (filename.equals(paths[i]) + || filename.equals(path.getName()))) { if (type == null) { log("Found: " + path, Project.MSG_VERBOSE); return true; Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Componentdef.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Componentdef.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Componentdef.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Componentdef.java Sun Aug 12 11:20:59 2007 @@ -18,9 +18,6 @@ package org.apache.tools.ant.taskdefs; -import org.apache.tools.ant.Task; -import org.apache.tools.ant.TaskAdapter; - /** * Adds a compenent definition to the current project. * used in the current project. Two attributes are needed, the name that identifies Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Concat.java Sun Aug 12 11:20:59 2007 @@ -218,7 +218,7 @@ * The concatentated result can then be filtered as * a single stream. */ - private class MultiReader extends Reader { + private final class MultiReader extends Reader { private Reader reader = null; private int lastPos = 0; private char[] lastChars = new char[eolString.length()]; @@ -374,7 +374,7 @@ } } - private class ConcatResource extends Resource { + private final class ConcatResource extends Resource { private ResourceCollection c; private ConcatResource(ResourceCollection c) { @@ -618,7 +618,7 @@ newRc.setProject(getProject()); newRc.add(rc); rc = newRc; - } + } ((Resources) rc).add(c); } Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ConditionTask.java Sun Aug 12 11:20:59 2007 @@ -62,7 +62,7 @@ /** * The value for the property to set, if condition evaluates to true. * Defaults to "true". - * @param v the (Object) value of the property + * @param value the (Object) value of the property * @since Ant 1.8 */ public void setValue(Object value) { @@ -82,7 +82,7 @@ /** * The value for the property to set, if condition evaluates to false. * If this attribute is not specified, the property will not be set. - * @param e the alternate value of the property. + * @param alt the alternate value of the property. * @since Ant 1.8 */ public void setElse(Object alt) { Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DependSet.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DependSet.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DependSet.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/DependSet.java Sun Aug 12 11:20:59 2007 @@ -28,7 +28,6 @@ import org.apache.tools.ant.types.Resource; import org.apache.tools.ant.types.TimeComparison; import org.apache.tools.ant.types.ResourceCollection; -import org.apache.tools.ant.types.resources.Sort; import org.apache.tools.ant.types.resources.Union; import org.apache.tools.ant.types.resources.Restrict; import org.apache.tools.ant.types.resources.Resources; @@ -88,14 +87,15 @@ = new org.apache.tools.ant.types.resources.comparators.Date(); private static final ResourceComparator REVERSE_DATE = new Reverse(DATE); - private static class NonExistent extends Restrict { + private static final class NonExistent extends Restrict { private NonExistent(ResourceCollection rc) { super.add(rc); super.add(NOT_EXISTS); } } - private static class HideMissingBasedir implements ResourceCollection { + private static final class HideMissingBasedir + implements ResourceCollection { private FileSet fs; private HideMissingBasedir(FileSet fs) { Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ear.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ear.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ear.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Ear.java Sun Aug 12 11:20:59 2007 @@ -131,7 +131,7 @@ || !FILE_UTILS.fileNameEquals(deploymentDescriptor, file) || descriptorAdded) { log("Warning: selected " + archiveType - + " files include a "+ XML_DESCRIPTOR_PATH +" which will" + + " files include a " + XML_DESCRIPTOR_PATH + " which will" + " be ignored (please use appxml attribute to " + archiveType + " task)", Project.MSG_WARN); Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Expand.java Sun Aug 12 11:20:59 2007 @@ -144,9 +144,10 @@ log("expand complete", Project.MSG_VERBOSE); } catch (IOException ioe) { - throw new BuildException("Error while expanding " + srcF.getPath() - +"\n"+ioe.toString(), - ioe); + throw new BuildException( + "Error while expanding " + srcF.getPath() + + "\n" + ioe.toString(), + ioe); } finally { ZipFile.closeQuietly(zf); } Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Java.java Sun Aug 12 11:20:59 2007 @@ -202,6 +202,7 @@ /** * Execute the specified CommandlineJava. * @param commandLine CommandLineJava instance. + * @return the exit value of the process if forked, 0 otherwise. */ protected int executeJava(CommandlineJava commandLine) { try { Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/ManifestTask.java Sun Aug 12 11:20:59 2007 @@ -49,7 +49,7 @@ * Specifies the valid characters which can be used in attribute names. * {@value} */ - public final String VALID_ATTRIBUTE_CHARS = + public static final String VALID_ATTRIBUTE_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ012345679-_"; /** @@ -105,7 +105,8 @@ throws ManifestException { Enumeration attributeKeys = section.getAttributeKeys(); while (attributeKeys.hasMoreElements()) { - Attribute attribute = section.getAttribute((String)attributeKeys.nextElement()); + Attribute attribute = section.getAttribute( + (String) attributeKeys.nextElement()); checkAttribute(attribute); } nestedManifest.addConfiguredSection(section); Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Property.java Sun Aug 12 11:20:59 2007 @@ -93,11 +93,14 @@ this.map = map; } + // CheckStyle:LineLengthCheck OFF see to long /* (non-Javadoc) * @see org.apache.tools.ant.PropertyHelper.PropertyEvaluator#evaluate(java.lang.String, org.apache.tools.ant.PropertyHelper) */ + // CheckStyle:LineLengthCheck ON public Object evaluate(String property, PropertyHelper propertyHelper) { - //our feeble properties don't matter if the PropertyHelper can resolve the property without us: + //our feeble properties don't matter if the PropertyHelper + // can resolve the property without us: Stack stk = (Stack) getStack.get(); if (stk.contains(property)) { return null; @@ -207,7 +210,7 @@ /** * Set the value of the property. - * @param value + * @param value the value to use. */ public void setValue(Object value) { this.untypedValue = value; @@ -525,14 +528,15 @@ * @see http://java.sun.com/dtd/properties.dtd * @see java.util.Properties#loadFromXML(InputStream) */ - private void loadProperties(Properties props, InputStream is, boolean isXml) throws IOException { + private void loadProperties( + Properties props, InputStream is, boolean isXml) throws IOException { if (isXml) { // load the xml based property definition // use reflection because of bwc to Java 1.3 try { Method loadXmlMethod = props.getClass().getMethod("loadFromXML", - new Class[] { InputStream.class }); - loadXmlMethod.invoke(props, new Object[] { is }); + new Class[] {InputStream.class}); + loadXmlMethod.invoke(props, new Object[] {is}); } catch (NoSuchMethodException e) { e.printStackTrace(); log("Can not load xml based property definition on Java < 5"); Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/PropertyHelperTask.java Sun Aug 12 11:20:59 2007 @@ -38,7 +38,7 @@ /** * Nested delegate for refid usage. */ - public class DelegateElement { + public final class DelegateElement { private String refid; private DelegateElement() { Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Retry.java Sun Aug 12 11:20:59 2007 @@ -40,18 +40,20 @@ /** * set the task + * @param t the task to retry. */ public synchronized void addTask(Task t) { if (nestedTask != null) { - throw new BuildException("The retry task container accepts a single nested task" - + " (which may be a sequential task container)"); + throw new BuildException( + "The retry task container accepts a single nested task" + + " (which may be a sequential task container)"); } nestedTask = t; } /** * set the number of times to retry the task - * @param n + * @param n the number to use. */ public void setRetryCount(int n) { retryCount = n; @@ -59,6 +61,7 @@ /** * perform the work + * @throws BuildException if there is an error. */ public void execute() throws BuildException { StringBuffer errorMessages = new StringBuffer(); Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Rmic.java Sun Aug 12 11:20:59 2007 @@ -523,7 +523,8 @@ scanDir(baseDir, files, adapter.getMapper()); } else { // otherwise perform a timestamp comparison - at least - scanDir(baseDir, new String[] { classname.replace('.', File.separatorChar) + scanDir(baseDir, new String[] { + classname.replace('.', File.separatorChar) + ".class" }, adapter.getMapper()); } int fileCount = compileList.size(); @@ -611,7 +612,8 @@ protected void scanDir(File baseDir, String[] files, FileNameMapper mapper) { String[] newFiles = files; if (idl) { - log("will leave uptodate test to rmic implementation in idl mode.", Project.MSG_VERBOSE); + log("will leave uptodate test to rmic implementation in idl mode.", + Project.MSG_VERBOSE); } else if (iiop && iiopOpts != null && iiopOpts.indexOf("-always") > -1) { log("no uptodate test as -always option has been specified", Project.MSG_VERBOSE); } else { Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Truncate.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Truncate.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Truncate.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Truncate.java Sun Aug 12 11:20:59 2007 @@ -84,7 +84,7 @@ /** * Set the length to which files should be set. * It is permissible to append K / M / G / T / P. - * @param adjust (positive) adjustment amount. + * @param length (positive) adjustment amount. */ public void setLength(Long length) { this.length = length; Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java Sun Aug 12 11:20:59 2007 @@ -272,7 +272,8 @@ String[] dirs; String baseMessage = - "specify the stylesheet either as a filename in style attribute or as a nested resource"; + "specify the stylesheet either as a filename in style attribute " + + "or as a nested resource"; if (xslResource == null && xslFile == null) { throw new BuildException(baseMessage, getLocation()); @@ -306,7 +307,8 @@ * the wrong version has been used. */ if (stylesheet.exists()) { - log("DEPRECATED - the 'style' attribute should be relative to the project's"); + log("DEPRECATED - the 'style' attribute should be " + + "relative to the project's"); log(" basedir, not the tasks's basedir."); } } @@ -1010,7 +1012,8 @@ * * @since Ant 1.7 */ - private void setLiaisonDynamicFileParameters(XSLTLiaison liaison, File inFile) throws Exception { + private void setLiaisonDynamicFileParameters( + XSLTLiaison liaison, File inFile) throws Exception { if (fileNameParameter != null) { liaison.addParam(fileNameParameter, inFile.getName()); } Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java?view=diff&rev=565102&r1=565101&r2=565102 ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/XmlProperty.java Sun Aug 12 11:20:59 2007 @@ -362,8 +362,10 @@ String nodeName = attributeNode.getNodeName(); String attributeValue = getAttributeValue(attributeNode); - Path containingPath = container != null && container instanceof Path ? (Path) container - : null; + Path containingPath = + ((container != null) && (container instanceof Path)) + ? (Path) container + : null; /* * The main conditional logic -- if the attribute * is somehow "special" (i.e., it has known --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org