git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@471555 13f79535-47bb-0310-9956-ffa450edef68master
@@ -201,7 +201,7 @@ public class CommandlineJava implements Cloneable { | |||||
public void addSysproperties(SysProperties ps) { | public void addSysproperties(SysProperties ps) { | ||||
variables.addAll(ps.variables); | variables.addAll(ps.variables); | ||||
propertySets.addAll(ps.propertySets); | propertySets.addAll(ps.propertySets); | ||||
} | |||||
} | |||||
/** | /** | ||||
* Merge all property sets into a single Properties object. | * Merge all property sets into a single Properties object. | ||||
@@ -509,8 +509,8 @@ public class CommandlineJava implements Cloneable { | |||||
* operation, as it has to evaluate the size of many components. | * operation, as it has to evaluate the size of many components. | ||||
* @return the total number of arguments in the java command line. | * @return the total number of arguments in the java command line. | ||||
* @see #getCommandline() | * @see #getCommandline() | ||||
* @deprecated since 1.7. | |||||
* Please dont use this, it effectively creates the | |||||
* @deprecated since 1.7. | |||||
* Please dont use this, it effectively creates the | |||||
* entire command. | * entire command. | ||||
*/ | */ | ||||
public int size() { | public int size() { | ||||
@@ -52,7 +52,7 @@ public abstract class DataType extends ProjectComponent implements Cloneable { | |||||
/** | /** | ||||
* Value to the refid attribute. | * Value to the refid attribute. | ||||
* | * | ||||
* @deprecated since 1.7. | |||||
* @deprecated since 1.7. | |||||
* The user should not be directly referencing | * The user should not be directly referencing | ||||
* variable. Please use {@link #getRefid} instead. | * variable. Please use {@link #getRefid} instead. | ||||
*/ | */ | ||||
@@ -66,9 +66,9 @@ public abstract class DataType extends ProjectComponent implements Cloneable { | |||||
* child element has been added that is a subclass of | * child element has been added that is a subclass of | ||||
* DataType).</p> | * DataType).</p> | ||||
* | * | ||||
* @deprecated since 1.7. | |||||
* @deprecated since 1.7. | |||||
* The user should not be directly referencing | * The user should not be directly referencing | ||||
* variable. Please use {@link #setChecked} or | |||||
* variable. Please use {@link #setChecked} or | |||||
* {@link #isChecked} instead. | * {@link #isChecked} instead. | ||||
*/ | */ | ||||
protected boolean checked = true; | protected boolean checked = true; | ||||
@@ -54,7 +54,7 @@ public abstract class EnumeratedAttribute { | |||||
} | } | ||||
/** | /** | ||||
* Factory method for instantiating EAs via API in a more | |||||
* Factory method for instantiating EAs via API in a more | |||||
* developer friendly way. | * developer friendly way. | ||||
* @param clazz Class, extending EA, which to instantiate | * @param clazz Class, extending EA, which to instantiate | ||||
* @param value The value to set on that EA | * @param value The value to set on that EA | ||||
@@ -65,14 +65,14 @@ public abstract class EnumeratedAttribute { | |||||
* http://issues.apache.org/bugzilla/show_bug.cgi?id=14831</a> | * http://issues.apache.org/bugzilla/show_bug.cgi?id=14831</a> | ||||
*/ | */ | ||||
public static EnumeratedAttribute getInstance( | public static EnumeratedAttribute getInstance( | ||||
Class/*<? extends EnumeratedAttribute>*/ clazz, | |||||
Class/*<? extends EnumeratedAttribute>*/ clazz, | |||||
String value) throws BuildException { | String value) throws BuildException { | ||||
if (!EnumeratedAttribute.class.isAssignableFrom(clazz)) { | if (!EnumeratedAttribute.class.isAssignableFrom(clazz)) { | ||||
throw new BuildException("You have to provide a subclass from EnumeratedAttribut as clazz-parameter."); | throw new BuildException("You have to provide a subclass from EnumeratedAttribut as clazz-parameter."); | ||||
} | } | ||||
EnumeratedAttribute ea = null; | EnumeratedAttribute ea = null; | ||||
try { | try { | ||||
ea = (EnumeratedAttribute)clazz.newInstance(); | |||||
ea = (EnumeratedAttribute) clazz.newInstance(); | |||||
} catch (Exception e) { | } catch (Exception e) { | ||||
throw new BuildException(e); | throw new BuildException(e); | ||||
} | } | ||||
@@ -112,7 +112,7 @@ public class Path extends DataType implements Cloneable, ResourceCollection { | |||||
public Iterator iterator() { | public Iterator iterator() { | ||||
return new FileResourceIterator(null, parts); | return new FileResourceIterator(null, parts); | ||||
} | } | ||||
public boolean isFilesystemOnly() { | public boolean isFilesystemOnly() { | ||||
return true; | return true; | ||||
} | } | ||||
@@ -55,7 +55,7 @@ public class Quantifier extends EnumeratedAttribute { | |||||
}; | }; | ||||
private static final Predicate ANY_PRED = new Predicate() { | private static final Predicate ANY_PRED = new Predicate() { | ||||
boolean eval(int t, int f) { return t > 0 ; } | |||||
boolean eval(int t, int f) { return t > 0; } | |||||
}; | }; | ||||
private static final Predicate ONE_PRED = new Predicate() { | private static final Predicate ONE_PRED = new Predicate() { | ||||
@@ -32,7 +32,7 @@ public class Reference { | |||||
/** | /** | ||||
* Create a reference. | * Create a reference. | ||||
* @deprecated since 1.7. | |||||
* @deprecated since 1.7. | |||||
* Please use {@link Reference#Reference(Project,String)} | * Please use {@link Reference#Reference(Project,String)} | ||||
* instead. | * instead. | ||||
*/ | */ | ||||
@@ -42,7 +42,7 @@ public class Reference { | |||||
/** | /** | ||||
* Create a reference to a named ID. | * Create a reference to a named ID. | ||||
* @param id the name of this reference | * @param id the name of this reference | ||||
* @deprecated since 1.7. | |||||
* @deprecated since 1.7. | |||||
* Please use {@link Reference#Reference(Project,String)} | * Please use {@link Reference#Reference(Project,String)} | ||||
* instead. | * instead. | ||||
*/ | */ | ||||
@@ -255,8 +255,8 @@ public class Resource extends DataType | |||||
return super.clone(); | return super.clone(); | ||||
} catch (CloneNotSupportedException e) { | } catch (CloneNotSupportedException e) { | ||||
throw new UnsupportedOperationException( | throw new UnsupportedOperationException( | ||||
"CloneNotSupportedException for a Resource caught. "+ | |||||
"Derived classes must support cloning."); | |||||
"CloneNotSupportedException for a Resource caught. " | |||||
+ "Derived classes must support cloning."); | |||||
} | } | ||||
} | } | ||||
@@ -69,7 +69,7 @@ public abstract class AbstractScriptComponent extends ProjectComponent { | |||||
/** | /** | ||||
* Initialize the script runner. Calls this before running the system | * Initialize the script runner. Calls this before running the system | ||||
*/ | |||||
*/ | |||||
protected void initScriptRunner() { | protected void initScriptRunner() { | ||||
getRunner().bindToComponent(this); | getRunner().bindToComponent(this); | ||||
} | } | ||||
@@ -22,7 +22,7 @@ import org.apache.tools.ant.util.FileNameMapper; | |||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
/** | /** | ||||
* Script support at map time. | |||||
* Script support at map time. | |||||
* @since Ant1.7 | * @since Ant1.7 | ||||
*/ | */ | ||||
public class ScriptMapper extends AbstractScriptComponent implements FileNameMapper { | public class ScriptMapper extends AbstractScriptComponent implements FileNameMapper { | ||||
@@ -54,7 +54,7 @@ public class ScriptMapper extends AbstractScriptComponent implements FileNameMap | |||||
* Reset the list of files | * Reset the list of files | ||||
*/ | */ | ||||
public void clear() { | public void clear() { | ||||
files=new ArrayList(1); | |||||
files = new ArrayList(1); | |||||
} | } | ||||
/** | /** | ||||
@@ -84,10 +84,10 @@ public class ScriptMapper extends AbstractScriptComponent implements FileNameMap | |||||
getRunner().addBean("source", sourceFileName); | getRunner().addBean("source", sourceFileName); | ||||
clear(); | clear(); | ||||
executeScript("ant_mapper"); | executeScript("ant_mapper"); | ||||
if(files.size()==0) { | |||||
if (files.size() == 0) { | |||||
return null; | return null; | ||||
} else { | } else { | ||||
return (String[])files.toArray(EMPTY_STRING_ARRAY); | |||||
return (String[]) files.toArray(EMPTY_STRING_ARRAY); | |||||
} | } | ||||
} | } | ||||
} | } |
@@ -39,7 +39,7 @@ public class FileResource extends Resource implements Touchable { | |||||
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); | private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); | ||||
private static final int NULL_FILE | private static final int NULL_FILE | ||||
= Resource.getMagicNumber("null file".getBytes()); | = Resource.getMagicNumber("null file".getBytes()); | ||||
private File file; | private File file; | ||||
private File baseDir; | private File baseDir; | ||||
@@ -110,7 +110,7 @@ public class PropertyResource extends Resource { | |||||
} | } | ||||
return String.valueOf(getValue()); | return String.valueOf(getValue()); | ||||
} | } | ||||
/** | /** | ||||
* Get an InputStream for the Resource. | * Get an InputStream for the Resource. | ||||
* @return an InputStream containing this Resource's content. | * @return an InputStream containing this Resource's content. | ||||
@@ -156,9 +156,8 @@ public class StringResource extends Resource { | |||||
//I can't get my head around this; is encoding treatment needed here? | //I can't get my head around this; is encoding treatment needed here? | ||||
return | return | ||||
//new oata.util.ReaderInputStream(new InputStreamReader( | //new oata.util.ReaderInputStream(new InputStreamReader( | ||||
new ByteArrayInputStream(getContent().getBytes()) | |||||
//, encoding), encoding) | |||||
; | |||||
new ByteArrayInputStream(getContent().getBytes()); | |||||
//, encoding), encoding); | |||||
} | } | ||||
/** | /** | ||||
@@ -86,7 +86,7 @@ public class TarResource extends ArchiveResource { | |||||
return i; | return i; | ||||
} | } | ||||
} | } | ||||
FileUtils.close(i); | FileUtils.close(i); | ||||
throw new BuildException("no entry " + getName() + " in " | throw new BuildException("no entry " + getName() + " in " | ||||
+ getArchive()); | + getArchive()); | ||||
@@ -72,8 +72,8 @@ public abstract class BaseSelector extends DataType implements FileSelector { | |||||
* setError() as necessary.</p> | * setError() as necessary.</p> | ||||
*/ | */ | ||||
public void verifySettings() { | public void verifySettings() { | ||||
if(isReference()) { | |||||
((BaseSelector)getCheckedRef()).verifySettings(); | |||||
if (isReference()) { | |||||
((BaseSelector) getCheckedRef()).verifySettings(); | |||||
} | } | ||||
} | } | ||||
@@ -37,7 +37,7 @@ import org.apache.tools.ant.util.regexp.Regexp; | |||||
* | * | ||||
* @since Ant 1.6 | * @since Ant 1.6 | ||||
*/ | */ | ||||
public class ContainsRegexpSelector extends BaseExtendSelector | |||||
public class ContainsRegexpSelector extends BaseExtendSelector | |||||
implements ResourceSelector { | implements ResourceSelector { | ||||
private String userProvidedExpression = null; | private String userProvidedExpression = null; | ||||
@@ -472,7 +472,7 @@ public final class SelectorUtils { | |||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
/** | /** | ||||
* Breaks a path up into a Vector of path elements, tokenizing on | * Breaks a path up into a Vector of path elements, tokenizing on | ||||
* <code>File.separator</code>. | * <code>File.separator</code>. | ||||
@@ -34,7 +34,7 @@ public class Provider extends ProjectComponent { | |||||
/** | /** | ||||
* @return the class name for | * @return the class name for | ||||
*/ | */ | ||||
public String getClassName(){ | |||||
public String getClassName() { | |||||
return type; | return type; | ||||
} | } | ||||
@@ -42,7 +42,7 @@ public class Provider extends ProjectComponent { | |||||
* Set the provider classname. | * Set the provider classname. | ||||
* @param type the value to set. | * @param type the value to set. | ||||
*/ | */ | ||||
public void setClassName(String type){ | |||||
public void setClassName(String type) { | |||||
this.type = type; | this.type = type; | ||||
} | } | ||||
@@ -32,7 +32,7 @@ import org.apache.tools.ant.BuildException; | |||||
/** | /** | ||||
* ANT Jar-Task SPI extension | * ANT Jar-Task SPI extension | ||||
* | |||||
* | |||||
* @see <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=31520"> | * @see <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=31520"> | ||||
* http://issues.apache.org/bugzilla/show_bug.cgi?id=31520</a> | * http://issues.apache.org/bugzilla/show_bug.cgi?id=31520</a> | ||||
*/ | */ | ||||
@@ -62,7 +62,7 @@ public class Service extends ProjectComponent { | |||||
/** | /** | ||||
* @return the service type. | * @return the service type. | ||||
*/ | */ | ||||
public String getType(){ | |||||
public String getType() { | |||||
return type; | return type; | ||||
} | } | ||||
@@ -72,7 +72,7 @@ public class Service extends ProjectComponent { | |||||
* an interface or a class (normally | * an interface or a class (normally | ||||
* abstract). | * abstract). | ||||
*/ | */ | ||||
public void setType(String type){ | |||||
public void setType(String type) { | |||||
this.type = type; | this.type = type; | ||||
} | } | ||||
@@ -87,11 +87,11 @@ public class Service extends ProjectComponent { | |||||
Writer writer; | Writer writer; | ||||
Iterator providerIterator; | Iterator providerIterator; | ||||
Provider provider; | Provider provider; | ||||
arrayOut = new ByteArrayOutputStream(); | arrayOut = new ByteArrayOutputStream(); | ||||
writer = new OutputStreamWriter(arrayOut, "UTF-8"); | writer = new OutputStreamWriter(arrayOut, "UTF-8"); | ||||
providerIterator = providerList.iterator(); | providerIterator = providerList.iterator(); | ||||
while (providerIterator.hasNext()){ | |||||
while (providerIterator.hasNext()) { | |||||
provider = (Provider) providerIterator.next(); | provider = (Provider) providerIterator.next(); | ||||
writer.write(provider.getClassName()); | writer.write(provider.getClassName()); | ||||
writer.write("\n"); | writer.write("\n"); | ||||