Browse Source

checkstyle

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@474079 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 18 years ago
parent
commit
5d029deab9
34 changed files with 127 additions and 34 deletions
  1. +3
    -1
      src/main/org/apache/tools/ant/util/Base64Converter.java
  2. +1
    -1
      src/main/org/apache/tools/ant/util/ChainedMapper.java
  3. +1
    -2
      src/main/org/apache/tools/ant/util/ClasspathUtils.java
  4. +1
    -1
      src/main/org/apache/tools/ant/util/CompositeMapper.java
  5. +9
    -2
      src/main/org/apache/tools/ant/util/ConcatFileInputStream.java
  6. +10
    -3
      src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java
  7. +7
    -1
      src/main/org/apache/tools/ant/util/DOMElementWriter.java
  8. +2
    -2
      src/main/org/apache/tools/ant/util/DOMUtils.java
  9. +0
    -2
      src/main/org/apache/tools/ant/util/FileTokenizer.java
  10. +2
    -1
      src/main/org/apache/tools/ant/util/FileUtils.java
  11. +3
    -0
      src/main/org/apache/tools/ant/util/GlobPatternMapper.java
  12. +3
    -0
      src/main/org/apache/tools/ant/util/IdentityStack.java
  13. +3
    -1
      src/main/org/apache/tools/ant/util/JavaEnvUtils.java
  14. +10
    -0
      src/main/org/apache/tools/ant/util/LazyFileOutputStream.java
  15. +3
    -0
      src/main/org/apache/tools/ant/util/LazyHashtable.java
  16. +1
    -0
      src/main/org/apache/tools/ant/util/LeadPipeInputStream.java
  17. +5
    -0
      src/main/org/apache/tools/ant/util/LineOrientedOutputStream.java
  18. +2
    -0
      src/main/org/apache/tools/ant/util/MergingMapper.java
  19. +16
    -1
      src/main/org/apache/tools/ant/util/ProxySetup.java
  20. +2
    -0
      src/main/org/apache/tools/ant/util/RegexpPatternMapper.java
  21. +2
    -1
      src/main/org/apache/tools/ant/util/RetryHandler.java
  22. +5
    -0
      src/main/org/apache/tools/ant/util/Retryable.java
  23. +2
    -0
      src/main/org/apache/tools/ant/util/SourceFileScanner.java
  24. +0
    -1
      src/main/org/apache/tools/ant/util/StringTokenizer.java
  25. +4
    -2
      src/main/org/apache/tools/ant/util/StringUtils.java
  26. +1
    -0
      src/main/org/apache/tools/ant/util/UUEncoder.java
  27. +4
    -2
      src/main/org/apache/tools/ant/util/WeakishReference.java
  28. +8
    -0
      src/main/org/apache/tools/ant/util/XmlConstants.java
  29. +6
    -2
      src/main/org/apache/tools/ant/util/java15/ProxyDiagnostics.java
  30. +1
    -1
      src/main/org/apache/tools/ant/util/optional/ScriptRunner.java
  31. +0
    -2
      src/main/org/apache/tools/ant/util/optional/WeakishReference12.java
  32. +2
    -0
      src/main/org/apache/tools/ant/util/regexp/JakartaOroMatcher.java
  33. +5
    -3
      src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java
  34. +3
    -2
      src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java

+ 3
- 1
src/main/org/apache/tools/ant/util/Base64Converter.java View File

@@ -25,7 +25,7 @@ package org.apache.tools.ant.util;
**/
public class Base64Converter {

private final static char[] ALPHABET = {
private static final char[] ALPHABET = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0 to 7
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 8 to 15
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 16 to 23
@@ -35,8 +35,10 @@ public class Base64Converter {
'w', 'x', 'y', 'z', '0', '1', '2', '3', // 48 to 55
'4', '5', '6', '7', '8', '9', '+', '/'}; // 56 to 63

// CheckStyle:ConstantNameCheck OFF - bc
/** Provided for BC purposes */
public static final char[] alphabet = ALPHABET;
// CheckStyle:ConstantNameCheck ON


/**


+ 1
- 1
src/main/org/apache/tools/ant/util/ChainedMapper.java View File

@@ -31,7 +31,7 @@ import java.util.ArrayList;
*/
public class ChainedMapper extends ContainerMapper {

//inherit doc
/** {@inheritDoc}. */
public String[] mapFileName(String sourceFileName) {
List inputs = new ArrayList();
List results = new ArrayList();


+ 1
- 2
src/main/org/apache/tools/ant/util/ClasspathUtils.java View File

@@ -263,8 +263,7 @@ public class ClasspathUtils {
try {
Class clazz = Class.forName(className, true, userDefinedLoader);
Object o = clazz.newInstance();
if (!expectedType.isInstance(o))
{
if (!expectedType.isInstance(o)) {
throw new BuildException(
"Class of unexpected Type: "
+ className


+ 1
- 1
src/main/org/apache/tools/ant/util/CompositeMapper.java View File

@@ -27,7 +27,7 @@ import java.util.Iterator;
*/
public class CompositeMapper extends ContainerMapper {

//inherit doc
/** {@inheritDoc}. */
public String[] mapFileName(String sourceFileName) {
HashSet results = new HashSet();



+ 9
- 2
src/main/org/apache/tools/ant/util/ConcatFileInputStream.java View File

@@ -51,13 +51,20 @@ public class ConcatFileInputStream extends InputStream {
this.file = file;
}

// inherit doc
/**
* Close the stream.
* @throws IOException if there is an error.
*/
public void close() throws IOException {
closeCurrent();
eof = true;
}

// inherit doc
/**
* Read a byte.
* @return the byte (0 - 255) or -1 if this is the end of the stream.
* @throws IOException if there is an error.
*/
public int read() throws IOException {
int result = readCurrent();
if (result == EOF && !eof) {


+ 10
- 3
src/main/org/apache/tools/ant/util/ConcatResourceInputStream.java View File

@@ -67,13 +67,20 @@ public class ConcatResourceInputStream extends InputStream {
return ignoreErrors;
}

// inherit doc
public void close() throws IOException {
/**
* Close the stream.
* @throws IOException if there is an error.
*/
public void close() throws IOException {
closeCurrent();
eof = true;
}

// inherit doc
/**
* Read a byte.
* @return the byte (0 - 255) or -1 if this is the end of the stream.
* @throws IOException if there is an error.
*/
public int read() throws IOException {
if (eof) {
return EOF;


+ 7
- 1
src/main/org/apache/tools/ant/util/DOMElementWriter.java View File

@@ -130,6 +130,7 @@ public class DOMElementWriter {
* XML namespaces will be ignored.
* @param xmlDeclaration flag to indicate whether the ?xml? declaration
* should be included.
* @param namespacePolicy the policy to use.
* @since Ant1.7
*/
public DOMElementWriter(boolean xmlDeclaration,
@@ -140,11 +141,13 @@ public class DOMElementWriter {

private static String lSep = System.getProperty("line.separator");

// CheckStyle:VisibilityModifier OFF - bc
/**
* Don't try to be too smart but at least recognize the predefined
* entities.
*/
protected String[] knownEntities = {"gt", "amp", "lt", "apos", "quot"};
// CheckStyle:VisibilityModifier ON


/**
@@ -164,7 +167,9 @@ public class DOMElementWriter {
}

/**
* Writes the XML declaration.
* Writes the XML declaration if xmlDeclaration is true.
* @param wri the writer to write to.
* @throws IOException if there is an error.
* @since Ant 1.7.0
*/
public void writeXMLDeclaration(Writer wri) throws IOException {
@@ -365,6 +370,7 @@ public class DOMElementWriter {
* @param indent number of
* @param indentWith string that should be used to indent the
* corresponding tag.
* @param hasChildren if true indent.
* @throws IOException if an error happens while writing to the stream.
*/
public void closeElement(Element element, Writer out, int indent,


+ 2
- 2
src/main/org/apache/tools/ant/util/DOMUtils.java View File

@@ -35,7 +35,7 @@ public class DOMUtils {

/**
* Get a new Document instance,
*
* @return the document.
* @since Ant 1.6.3
*/
public static Document newDocument() {
@@ -163,4 +163,4 @@ public class DOMUtils {
Element e = createChildElement(parent, name);
appendCDATA(e, content);
}
}
}

+ 0
- 2
src/main/org/apache/tools/ant/util/FileTokenizer.java View File

@@ -20,8 +20,6 @@ package org.apache.tools.ant.util;
import java.io.IOException;
import java.io.Reader;
import org.apache.tools.ant.ProjectComponent;
import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.util.Tokenizer;

/**
* Class to read the complete input into a string.


+ 2
- 1
src/main/org/apache/tools/ant/util/FileUtils.java View File

@@ -1105,7 +1105,8 @@ public class FileUtils {
File f = new File(path).getAbsoluteFile();
java.lang.reflect.Method toURIMethod = File.class.getMethod("toURI", new Class[0]);
Object uriObj = toURIMethod.invoke(f, new Object[] {});
java.lang.reflect.Method toASCIIStringMethod = uriClazz.getMethod("toASCIIString", new Class[0]);
java.lang.reflect.Method toASCIIStringMethod
= uriClazz.getMethod("toASCIIString", new Class[0]);
return (String) toASCIIStringMethod.invoke(uriObj, new Object[] {});
} catch (Exception e) {
// Reflection problems? Should not happen, debug.


+ 3
- 0
src/main/org/apache/tools/ant/util/GlobPatternMapper.java View File

@@ -33,6 +33,7 @@ package org.apache.tools.ant.util;
*/
public class GlobPatternMapper implements FileNameMapper {

// CheckStyle:VisibilityModifier OFF - bc
/**
* Part of "from" pattern before the *.
*/
@@ -63,6 +64,8 @@ public class GlobPatternMapper implements FileNameMapper {
*/
protected String toPostfix = null;

// CheckStyle:VisibilityModifier ON

private boolean handleDirSep = false;
private boolean caseSensitive = true;



+ 3
- 0
src/main/org/apache/tools/ant/util/IdentityStack.java View File

@@ -60,6 +60,7 @@ public class IdentityStack extends Stack {
/**
* Override methods that use <code>.equals()</code> comparisons on elements.
* @param o the Object to search for.
* @return true if the stack contains the object.
* @see java.util.Vector#contains(Object)
*/
public synchronized boolean contains(Object o) {
@@ -70,6 +71,7 @@ public class IdentityStack extends Stack {
* Override methods that use <code>.equals()</code> comparisons on elements.
* @param o the Object to search for.
* @param pos the position from which to search.
* @return the position of the object, -1 if not found.
* @see java.util.Vector#indexOf(Object, int)
*/
public synchronized int indexOf(Object o, int pos) {
@@ -85,6 +87,7 @@ public class IdentityStack extends Stack {
* Override methods that use <code>.equals()</code> comparisons on elements.
* @param o the Object to search for.
* @param pos the position from which to search (backward).
* @return the position of the object, -1 if not found.
* @see java.util.Vector#indexOf(Object, int)
*/
public synchronized int lastIndexOf(Object o, int pos) {


+ 3
- 1
src/main/org/apache/tools/ant/util/JavaEnvUtils.java View File

@@ -342,7 +342,9 @@ public final class JavaEnvUtils {
switch(javaVersionNumber) {
case 16:
case 15:
tests.addElement("com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl ");
tests.addElement(
"com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl ");
// Fall tru
case 14:
tests.addElement("sun.audio.AudioPlayer");
if (javaVersionNumber == 14) {


+ 10
- 0
src/main/org/apache/tools/ant/util/LazyFileOutputStream.java View File

@@ -41,6 +41,7 @@ public class LazyFileOutputStream extends OutputStream {
/**
* Creates a stream that will eventually write to the file with
* the given name and replace it.
* @param name the filename.
*/
public LazyFileOutputStream(String name) {
this(name, false);
@@ -50,6 +51,8 @@ public class LazyFileOutputStream extends OutputStream {
* Creates a stream that will eventually write to the file with
* the given name and optionally append to instead of replacing
* it.
* @param name the filename.
* @param append if true append rather than replace.
*/
public LazyFileOutputStream(String name, boolean append) {
this(new File(name), append);
@@ -58,6 +61,7 @@ public class LazyFileOutputStream extends OutputStream {
/**
* Creates a stream that will eventually write to the file with
* the given name and replace it.
* @param f the file to create.
*/
public LazyFileOutputStream(File f) {
this(f, false);
@@ -67,6 +71,8 @@ public class LazyFileOutputStream extends OutputStream {
* Creates a stream that will eventually write to the file with
* the given name and optionally append to instead of replacing
* it.
* @param file the file to create.
* @param append if true append rather than replace.
*/
public LazyFileOutputStream(File file, boolean append) {
this(file, append, false);
@@ -76,6 +82,9 @@ public class LazyFileOutputStream extends OutputStream {
* Creates a stream that will eventually write to the file with
* the given name, optionally append to instead of replacing
* it, and optionally always create a file (even if zero length).
* @param file the file to create.
* @param append if true append rather than replace.
* @param alwaysCreate if true create the file even if nothing to write.
*/
public LazyFileOutputStream(File file, boolean append,
boolean alwaysCreate) {
@@ -88,6 +97,7 @@ public class LazyFileOutputStream extends OutputStream {
* Explicitly open the file for writing.
*
* <p>Returns silently if the file has already been opened.</p>
* @throws IOException if there is an error.
*/
public void open() throws IOException {
ensureOpened();


+ 3
- 0
src/main/org/apache/tools/ant/util/LazyHashtable.java View File

@@ -29,8 +29,11 @@ import java.util.Enumeration;
* @since Ant 1.6
*/
public class LazyHashtable extends Hashtable {
// CheckStyle:VisibilityModifier OFF - bc
protected boolean initAllDone = false;
// CheckStyle:VisibilityModifier OFF - bc

/** No arg constructor. */
public LazyHashtable() {
super();
}


+ 1
- 0
src/main/org/apache/tools/ant/util/LeadPipeInputStream.java View File

@@ -67,6 +67,7 @@ public class LeadPipeInputStream extends PipedInputStream {
* circular buffer of the specified size.
* @param src the <code>PipedOutputStream</code> source.
* @param size the size of the circular buffer.
* @throws IOException if there is an error.
*/
public LeadPipeInputStream(PipedOutputStream src, int size) throws IOException {
super(src);


+ 5
- 0
src/main/org/apache/tools/ant/util/LineOrientedOutputStream.java View File

@@ -48,6 +48,7 @@ public abstract class LineOrientedOutputStream extends OutputStream {
* separator is detected.
*
* @param cc data to log (byte).
* @throws IOException if there is an error.
*/
public final void write(int cc) throws IOException {
final byte c = (byte) cc;
@@ -63,6 +64,7 @@ public abstract class LineOrientedOutputStream extends OutputStream {

/**
* Flush this log stream
* @throws IOException if there is an error.
*/
public final void flush() throws IOException {
if (buffer.size() > 0) {
@@ -73,6 +75,7 @@ public abstract class LineOrientedOutputStream extends OutputStream {
/**
* Converts the buffer to a string and sends it to
* <code>processLine</code>
* @throws IOException if there is an error.
*/
protected void processBuffer() throws IOException {
try {
@@ -86,11 +89,13 @@ public abstract class LineOrientedOutputStream extends OutputStream {
* Processes a line.
*
* @param line the line to log.
* @throws IOException if there is an error.
*/
protected abstract void processLine(String line) throws IOException;

/**
* Writes all remaining
* @throws IOException if there is an error.
*/
public final void close() throws IOException {
if (buffer.size() > 0) {


+ 2
- 0
src/main/org/apache/tools/ant/util/MergingMapper.java View File

@@ -27,7 +27,9 @@ package org.apache.tools.ant.util;
*
*/
public class MergingMapper implements FileNameMapper {
// CheckStyle:VisibilityModifier OFF - bc
protected String[] mergedFile = null;
// CheckStyle:VisibilityModifier ON

/**
* Ignored.


+ 16
- 1
src/main/org/apache/tools/ant/util/ProxySetup.java View File

@@ -38,26 +38,41 @@ public class ProxySetup {
* @value
*/
public static final String USE_SYSTEM_PROXIES = "java.net.useSystemProxies";
/** the http proxyhost property */
public static final String HTTP_PROXY_HOST = "http.proxyHost";
/** the http proxyport property */
public static final String HTTP_PROXY_PORT = "http.proxyPort";
/** the https proxyhost property */
public static final String HTTPS_PROXY_HOST = "https.proxyHost";
/** the https proxyport property */
public static final String HTTPS_PROXY_PORT = "https.proxyPort";
/** the ftp proxyhost property */
public static final String FTP_PROXY_HOST = "ftp.proxyHost";
/** the ftp proxyport property */
public static final String FTP_PROXY_PORT = "ftp.proxyPort";
/** the ftp proxyport property */
public static final String HTTP_NON_PROXY_HOSTS = "http.nonProxyHosts";
/** the http hosts not to be proxied property */
public static final String HTTPS_NON_PROXY_HOSTS = "https.nonProxyHosts";
/** the ftp hosts not to be proxied property */
public static final String FTP_NON_PROXY_HOSTS = "ftp.nonProxyHosts";
/** the http proxy username property */
public static final String HTTP_PROXY_USERNAME = "http.proxyUser";
/** the http proxy password property */
public static final String HTTP_PROXY_PASSWORD = "http.proxyPassword";
/** the socks proxy host property */
public static final String SOCKS_PROXY_HOST = "socksProxyHost";
/** the socks proxy port property */
public static final String SOCKS_PROXY_PORT = "socksProxyPort";
/** the socks proxy username property */
public static final String SOCKS_PROXY_USERNAME = "java.net.socks.username";
/** the socks proxy password property */
public static final String SOCKS_PROXY_PASSWORD = "java.net.socks.password";


/**
* create a proxy setup class bound to this project
* @param owner
* @param owner the project that owns this setup.
*/
public ProxySetup(Project owner) {
this.owner = owner;


+ 2
- 0
src/main/org/apache/tools/ant/util/RegexpPatternMapper.java View File

@@ -29,9 +29,11 @@ import org.apache.tools.ant.util.regexp.RegexpMatcherFactory;
*
*/
public class RegexpPatternMapper implements FileNameMapper {
// CheckStyle:VisibilityModifier OFF - bc
protected RegexpMatcher reg = null;
protected char[] to = null;
protected StringBuffer result = new StringBuffer();
// CheckStyle:VisibilityModifier ON

/**
* Constructor for RegexpPatternMapper.


+ 2
- 1
src/main/org/apache/tools/ant/util/RetryHandler.java View File

@@ -64,7 +64,8 @@ public class RetryHandler {
+ this.retriesAllowed + "), giving up", Project.MSG_WARN);
throw e;
} else {
task.log("try #" + retries + ": IO error (" + desc + "), retrying", Project.MSG_WARN);
task.log("try #" + retries + ": IO error (" + desc
+ "), retrying", Project.MSG_WARN);
}
}
}


+ 5
- 0
src/main/org/apache/tools/ant/util/Retryable.java View File

@@ -27,7 +27,12 @@ import java.io.IOException;
* @see RetryHandler
*/
public interface Retryable {
/** The value to use to never give up. */
public static final int RETRY_FOREVER = -1;
/**
* Called to execute the code.
* @throws IOException if there is a problem.
*/
void execute() throws IOException;

}

+ 2
- 0
src/main/org/apache/tools/ant/util/SourceFileScanner.java View File

@@ -36,7 +36,9 @@ import org.apache.tools.ant.types.resources.FileResource;
*/
public class SourceFileScanner implements ResourceFactory {

// CheckStyle:VisibilityModifier OFF - bc
protected Task task;
// CheckStyle:VisibilityModifier ON

private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
private File destDir; // base directory of the fileset


+ 0
- 1
src/main/org/apache/tools/ant/util/StringTokenizer.java View File

@@ -20,7 +20,6 @@ package org.apache.tools.ant.util;
import java.io.IOException;
import java.io.Reader;
import org.apache.tools.ant.ProjectComponent;
import org.apache.tools.ant.util.Tokenizer;

/**
* Class to tokenize the input as areas separated


+ 4
- 2
src/main/org/apache/tools/ant/util/StringUtils.java View File

@@ -100,8 +100,10 @@ public final class StringUtils {
}

/**
* Checks that a string buffer ends up with a given string. It may sound trivial with the existing
* JDK API but the various implementation among JDKs can make those methods extremely resource intensive
* Checks that a string buffer ends up with a given string. It may sound
* trivial with the existing
* JDK API but the various implementation among JDKs can make those
* methods extremely resource intensive
* and perform poorly due to massive memory allocation and copying. See
* @param buffer the buffer to perform the check on
* @param suffix the suffix


+ 1
- 0
src/main/org/apache/tools/ant/util/UUEncoder.java View File

@@ -54,6 +54,7 @@ public class UUEncoder {
* input stream.
* @param is the input stream.
* @param out the output stream.
* @throws IOException if there is an error.
*/
public void encode(InputStream is, OutputStream out)
throws IOException {


+ 4
- 2
src/main/org/apache/tools/ant/util/WeakishReference.java View File

@@ -22,8 +22,10 @@ package org.apache.tools.ant.util;
import java.lang.ref.WeakReference;

/**
* These classes are part of some code to reduce memory leaks by only retaining weak references to things
* on Java1.2+, and yet still work (with leaky hard references) on Java1.1. Now that Ant is 1.2+ only,
* These classes are part of some code to reduce memory leaks by only
* retaining weak references to things
* on Java1.2+, and yet still work (with leaky hard references) on Java1.1.
* Now that Ant is 1.2+ only,
* life is simpler and none of the classes are needed any more.
*
* They are only retained in case a third-party task uses them


+ 8
- 0
src/main/org/apache/tools/ant/util/XmlConstants.java View File

@@ -25,18 +25,26 @@ package org.apache.tools.ant.util;
*/

public class XmlConstants {
/** property for location of xml schema */
public static final String PROPERTY_SCHEMA_LOCATION =
"http://apache.org/xml/properties/schema/external-schemaLocation";
/** property for location of no-name schema */
public static final String PROPERTY_NO_NAMESPACE_SCHEMA_LOCATION =
"http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation";
/** property for full validation */
public static final String FEATURE_XSD_FULL_VALIDATION =
"http://apache.org/xml/features/validation/schema-full-checking";
/** property for xsd */
public static final String FEATURE_XSD = "http://apache.org/xml/features/validation/schema";

/** property for validation */
public static final String FEATURE_VALIDATION = "http://xml.org/sax/features/validation";
/** property for namespace support */
public static final String FEATURE_NAMESPACES = "http://xml.org/sax/features/namespaces";
/** property for schema language */
public static final String FEATURE_JAXP12_SCHEMA_LANGUAGE =
"http://java.sun.com/xml/jaxp/properties/schemaLanguage";
/** property for schema source */
public static final String FEATURE_JAXP12_SCHEMA_SOURCE =
"http://java.sun.com/xml/jaxp/properties/schemaSource";
public static final String URI_XSD =


+ 6
- 2
src/main/org/apache/tools/ant/util/java15/ProxyDiagnostics.java View File

@@ -40,9 +40,9 @@ import java.util.Iterator;
*/
public class ProxyDiagnostics {

String destination;
private String destination;

URI destURI;
private URI destURI;

/** {@value} */
public static final String DEFAULT_DESTINATION = "http://ant.apache.org/";
@@ -69,6 +69,10 @@ public class ProxyDiagnostics {
this(DEFAULT_DESTINATION);
}

/**
* Get the diagnostics for proxy information.
* @return the information.
*/
public String toString() {
ProxySelector selector = ProxySelector.getDefault();
List list = selector.select(destURI);


+ 1
- 1
src/main/org/apache/tools/ant/util/optional/ScriptRunner.java View File

@@ -24,7 +24,6 @@ import java.io.IOException;
import org.apache.bsf.BSFException;
import org.apache.bsf.BSFManager;

import org.apache.tools.ant.AntClassLoader;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.ProjectComponent;
import org.apache.tools.ant.Project;
@@ -187,6 +186,7 @@ public class ScriptRunner {

/**
* Set the class path to be used.
* @param classpath the path to use.
*/
public void setClasspath(Path classpath) {
this.classpath = classpath;


+ 0
- 2
src/main/org/apache/tools/ant/util/optional/WeakishReference12.java View File

@@ -20,8 +20,6 @@ package org.apache.tools.ant.util.optional;

import org.apache.tools.ant.util.WeakishReference;

import java.lang.ref.WeakReference;

/**
* This is a reference that really is is Weak, as it uses the
* appropriate java.lang.ref class.


+ 2
- 0
src/main/org/apache/tools/ant/util/regexp/JakartaOroMatcher.java View File

@@ -32,8 +32,10 @@ import org.apache.tools.ant.BuildException;
public class JakartaOroMatcher implements RegexpMatcher {

private String pattern;
// CheckStyle:VisibilityModifier OFF - bc
protected final Perl5Compiler compiler = new Perl5Compiler();
protected final Perl5Matcher matcher = new Perl5Matcher();
// CheckStyle:VisibilityModifier ON

/**
* Constructor for JakartaOroMatcher.


+ 5
- 3
src/main/org/apache/tools/ant/util/regexp/RegexpFactory.java View File

@@ -86,14 +86,16 @@ public class RegexpFactory extends RegexpMatcherFactory {
cause = orCause(cause, be, true);
}

throw new BuildException("No supported regular expression matcher found" +
(cause != null ? ": " + cause : ""), cause);
throw new BuildException(
"No supported regular expression matcher found"
+ (cause != null ? ": " + cause : ""), cause);
}

/**
* Wrapper over RegexpMatcherFactory.createInstance that ensures that
* we are dealing with a Regexp implementation.
*
* @return the instance.
* @throws BuildException if there is a problem.
* @since 1.3
*
* @see RegexpMatcherFactory#createInstance(String)


+ 3
- 2
src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java View File

@@ -94,8 +94,9 @@ public class RegexpMatcherFactory {
cause = orCause(cause, be, true);
}

throw new BuildException("No supported regular expression matcher found" +
(cause != null ? ": " + cause : ""), cause);
throw new BuildException(
"No supported regular expression matcher found"
+ (cause != null ? ": " + cause : ""), cause);
}

static Throwable orCause(Throwable deflt, BuildException be, boolean ignoreCnfe) {


Loading…
Cancel
Save