Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@471555 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
bbb8480014
18 changed files with 36 additions and 37 deletions
  1. +3
    -3
      src/main/org/apache/tools/ant/types/CommandlineJava.java
  2. +3
    -3
      src/main/org/apache/tools/ant/types/DataType.java
  3. +3
    -3
      src/main/org/apache/tools/ant/types/EnumeratedAttribute.java
  4. +1
    -1
      src/main/org/apache/tools/ant/types/Path.java
  5. +1
    -1
      src/main/org/apache/tools/ant/types/Quantifier.java
  6. +2
    -2
      src/main/org/apache/tools/ant/types/Reference.java
  7. +2
    -2
      src/main/org/apache/tools/ant/types/Resource.java
  8. +1
    -1
      src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java
  9. +4
    -4
      src/main/org/apache/tools/ant/types/optional/ScriptMapper.java
  10. +1
    -1
      src/main/org/apache/tools/ant/types/resources/FileResource.java
  11. +1
    -1
      src/main/org/apache/tools/ant/types/resources/PropertyResource.java
  12. +2
    -3
      src/main/org/apache/tools/ant/types/resources/StringResource.java
  13. +1
    -1
      src/main/org/apache/tools/ant/types/resources/TarResource.java
  14. +2
    -2
      src/main/org/apache/tools/ant/types/selectors/BaseSelector.java
  15. +1
    -1
      src/main/org/apache/tools/ant/types/selectors/ContainsRegexpSelector.java
  16. +1
    -1
      src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java
  17. +2
    -2
      src/main/org/apache/tools/ant/types/spi/Provider.java
  18. +5
    -5
      src/main/org/apache/tools/ant/types/spi/Service.java

+ 3
- 3
src/main/org/apache/tools/ant/types/CommandlineJava.java View File

@@ -201,7 +201,7 @@ public class CommandlineJava implements Cloneable {
public void addSysproperties(SysProperties ps) {
variables.addAll(ps.variables);
propertySets.addAll(ps.propertySets);
}
}

/**
* 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.
* @return the total number of arguments in the java command line.
* @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.
*/
public int size() {


+ 3
- 3
src/main/org/apache/tools/ant/types/DataType.java View File

@@ -52,7 +52,7 @@ public abstract class DataType extends ProjectComponent implements Cloneable {
/**
* Value to the refid attribute.
*
* @deprecated since 1.7.
* @deprecated since 1.7.
* The user should not be directly referencing
* 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
* DataType).</p>
*
* @deprecated since 1.7.
* @deprecated since 1.7.
* The user should not be directly referencing
* variable. Please use {@link #setChecked} or
* variable. Please use {@link #setChecked} or
* {@link #isChecked} instead.
*/
protected boolean checked = true;


+ 3
- 3
src/main/org/apache/tools/ant/types/EnumeratedAttribute.java View File

@@ -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.
* @param clazz Class, extending EA, which to instantiate
* @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>
*/
public static EnumeratedAttribute getInstance(
Class/*<? extends EnumeratedAttribute>*/ clazz,
Class/*<? extends EnumeratedAttribute>*/ clazz,
String value) throws BuildException {
if (!EnumeratedAttribute.class.isAssignableFrom(clazz)) {
throw new BuildException("You have to provide a subclass from EnumeratedAttribut as clazz-parameter.");
}
EnumeratedAttribute ea = null;
try {
ea = (EnumeratedAttribute)clazz.newInstance();
ea = (EnumeratedAttribute) clazz.newInstance();
} catch (Exception e) {
throw new BuildException(e);
}


+ 1
- 1
src/main/org/apache/tools/ant/types/Path.java View File

@@ -112,7 +112,7 @@ public class Path extends DataType implements Cloneable, ResourceCollection {
public Iterator iterator() {
return new FileResourceIterator(null, parts);
}
public boolean isFilesystemOnly() {
return true;
}


+ 1
- 1
src/main/org/apache/tools/ant/types/Quantifier.java View File

@@ -55,7 +55,7 @@ public class Quantifier extends EnumeratedAttribute {
};

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() {


+ 2
- 2
src/main/org/apache/tools/ant/types/Reference.java View File

@@ -32,7 +32,7 @@ public class Reference {

/**
* Create a reference.
* @deprecated since 1.7.
* @deprecated since 1.7.
* Please use {@link Reference#Reference(Project,String)}
* instead.
*/
@@ -42,7 +42,7 @@ public class Reference {
/**
* Create a reference to a named ID.
* @param id the name of this reference
* @deprecated since 1.7.
* @deprecated since 1.7.
* Please use {@link Reference#Reference(Project,String)}
* instead.
*/


+ 2
- 2
src/main/org/apache/tools/ant/types/Resource.java View File

@@ -255,8 +255,8 @@ public class Resource extends DataType
return super.clone();
} catch (CloneNotSupportedException e) {
throw new UnsupportedOperationException(
"CloneNotSupportedException for a Resource caught. "+
"Derived classes must support cloning.");
"CloneNotSupportedException for a Resource caught. "
+ "Derived classes must support cloning.");
}
}



+ 1
- 1
src/main/org/apache/tools/ant/types/optional/AbstractScriptComponent.java View File

@@ -69,7 +69,7 @@ public abstract class AbstractScriptComponent extends ProjectComponent {

/**
* Initialize the script runner. Calls this before running the system
*/
*/
protected void initScriptRunner() {
getRunner().bindToComponent(this);
}


+ 4
- 4
src/main/org/apache/tools/ant/types/optional/ScriptMapper.java View File

@@ -22,7 +22,7 @@ import org.apache.tools.ant.util.FileNameMapper;
import java.util.ArrayList;

/**
* Script support at map time.
* Script support at map time.
* @since Ant1.7
*/
public class ScriptMapper extends AbstractScriptComponent implements FileNameMapper {
@@ -54,7 +54,7 @@ public class ScriptMapper extends AbstractScriptComponent implements FileNameMap
* Reset the list of files
*/
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);
clear();
executeScript("ant_mapper");
if(files.size()==0) {
if (files.size() == 0) {
return null;
} else {
return (String[])files.toArray(EMPTY_STRING_ARRAY);
return (String[]) files.toArray(EMPTY_STRING_ARRAY);
}
}
}

+ 1
- 1
src/main/org/apache/tools/ant/types/resources/FileResource.java View File

@@ -39,7 +39,7 @@ public class FileResource extends Resource implements Touchable {
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
private static final int NULL_FILE
= Resource.getMagicNumber("null file".getBytes());
private File file;
private File baseDir;



+ 1
- 1
src/main/org/apache/tools/ant/types/resources/PropertyResource.java View File

@@ -110,7 +110,7 @@ public class PropertyResource extends Resource {
}
return String.valueOf(getValue());
}
/**
* Get an InputStream for the Resource.
* @return an InputStream containing this Resource's content.


+ 2
- 3
src/main/org/apache/tools/ant/types/resources/StringResource.java View File

@@ -156,9 +156,8 @@ public class StringResource extends Resource {
//I can't get my head around this; is encoding treatment needed here?
return
//new oata.util.ReaderInputStream(new InputStreamReader(
new ByteArrayInputStream(getContent().getBytes())
//, encoding), encoding)
;
new ByteArrayInputStream(getContent().getBytes());
//, encoding), encoding);
}

/**


+ 1
- 1
src/main/org/apache/tools/ant/types/resources/TarResource.java View File

@@ -86,7 +86,7 @@ public class TarResource extends ArchiveResource {
return i;
}
}
FileUtils.close(i);
throw new BuildException("no entry " + getName() + " in "
+ getArchive());


+ 2
- 2
src/main/org/apache/tools/ant/types/selectors/BaseSelector.java View File

@@ -72,8 +72,8 @@ public abstract class BaseSelector extends DataType implements FileSelector {
* setError() as necessary.</p>
*/
public void verifySettings() {
if(isReference()) {
((BaseSelector)getCheckedRef()).verifySettings();
if (isReference()) {
((BaseSelector) getCheckedRef()).verifySettings();
}
}



+ 1
- 1
src/main/org/apache/tools/ant/types/selectors/ContainsRegexpSelector.java View File

@@ -37,7 +37,7 @@ import org.apache.tools.ant.util.regexp.Regexp;
*
* @since Ant 1.6
*/
public class ContainsRegexpSelector extends BaseExtendSelector
public class ContainsRegexpSelector extends BaseExtendSelector
implements ResourceSelector {

private String userProvidedExpression = null;


+ 1
- 1
src/main/org/apache/tools/ant/types/selectors/SelectorUtils.java View File

@@ -472,7 +472,7 @@ public final class SelectorUtils {
}
return true;
}
/**
* Breaks a path up into a Vector of path elements, tokenizing on
* <code>File.separator</code>.


+ 2
- 2
src/main/org/apache/tools/ant/types/spi/Provider.java View File

@@ -34,7 +34,7 @@ public class Provider extends ProjectComponent {
/**
* @return the class name for
*/
public String getClassName(){
public String getClassName() {
return type;
}

@@ -42,7 +42,7 @@ public class Provider extends ProjectComponent {
* Set the provider classname.
* @param type the value to set.
*/
public void setClassName(String type){
public void setClassName(String type) {
this.type = type;
}



+ 5
- 5
src/main/org/apache/tools/ant/types/spi/Service.java View File

@@ -32,7 +32,7 @@ import org.apache.tools.ant.BuildException;

/**
* ANT Jar-Task SPI extension
*
*
* @see <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=31520">
* http://issues.apache.org/bugzilla/show_bug.cgi?id=31520</a>
*/
@@ -62,7 +62,7 @@ public class Service extends ProjectComponent {
/**
* @return the service type.
*/
public String getType(){
public String getType() {
return type;
}

@@ -72,7 +72,7 @@ public class Service extends ProjectComponent {
* an interface or a class (normally
* abstract).
*/
public void setType(String type){
public void setType(String type) {
this.type = type;
}

@@ -87,11 +87,11 @@ public class Service extends ProjectComponent {
Writer writer;
Iterator providerIterator;
Provider provider;
arrayOut = new ByteArrayOutputStream();
writer = new OutputStreamWriter(arrayOut, "UTF-8");
providerIterator = providerList.iterator();
while (providerIterator.hasNext()){
while (providerIterator.hasNext()) {
provider = (Provider) providerIterator.next();
writer.write(provider.getClassName());
writer.write("\n");


Loading…
Cancel
Save