You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by pe...@apache.org on 2005/01/24 19:13:20 UTC

cvs commit: ant/src/main/org/apache/tools/ant/util MergingMapper.java LeadPipeInputStream.java KeepAliveOutputStream.java KeepAliveInputStream.java JavaEnvUtils.java JAXPUtils.java IdentityMapper.java GlobPatternMapper.java FlatFileNameMapper.java FileNameMapper.java DateUtils.java DOMElementWriter.java ContainerMapper.java ConcatFileInputStream.java CollectionUtils.java ChainedMapper.java

peterreilly    2005/01/24 10:13:20

  Modified:    src/main/org/apache/tools/ant/util MergingMapper.java
                        LeadPipeInputStream.java KeepAliveOutputStream.java
                        KeepAliveInputStream.java JavaEnvUtils.java
                        JAXPUtils.java IdentityMapper.java
                        GlobPatternMapper.java FlatFileNameMapper.java
                        FileNameMapper.java DateUtils.java
                        DOMElementWriter.java ContainerMapper.java
                        ConcatFileInputStream.java CollectionUtils.java
                        ChainedMapper.java
  Log:
  checkstyle - mostly javadoc
  
  Revision  Changes    Path
  1.10      +5 -1      ant/src/main/org/apache/tools/ant/util/MergingMapper.java
  
  Index: MergingMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/MergingMapper.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- MergingMapper.java	9 Mar 2004 16:48:52 -0000	1.9
  +++ MergingMapper.java	24 Jan 2005 18:13:20 -0000	1.10
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000,2004 The Apache Software Foundation
  + * Copyright  2000,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -30,12 +30,14 @@
   
       /**
        * Ignored.
  +     * @param from ignored.
        */
       public void setFrom(String from) {
       }
   
       /**
        * Sets the name of the merged file.
  +     * @param to the name of the merged file.
        */
       public void setTo(String to) {
           mergedFile = new String[] {to};
  @@ -43,6 +45,8 @@
   
       /**
        * Returns an one-element array containing the file name set via setTo.
  +     * @param sourceFileName ignored.
  +     * @return a one-element array containing the merged filename.
        */
       public String[] mapFileName(String sourceFileName) {
           return mergedFile;
  
  
  
  1.2       +2 -1      ant/src/main/org/apache/tools/ant/util/LeadPipeInputStream.java
  
  Index: LeadPipeInputStream.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/LeadPipeInputStream.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LeadPipeInputStream.java	27 Mar 2004 21:22:58 -0000	1.1
  +++ LeadPipeInputStream.java	24 Jan 2005 18:13:20 -0000	1.2
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2004 The Apache Software Foundation
  + * Copyright 2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -42,6 +42,7 @@
        * Construct a new <CODE>LeadPipeInputStream</CODE> to pull
        * from the specified <CODE>PipedOutputStream</CODE>.
        * @param src   the <CODE>PipedOutputStream</CODE> source.
  +     * @throws IOException if unable to construct the stream.
        */
       public LeadPipeInputStream(PipedOutputStream src) throws IOException {
           super(src);
  
  
  
  1.9       +11 -4     ant/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java
  
  Index: KeepAliveOutputStream.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/KeepAliveOutputStream.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- KeepAliveOutputStream.java	9 Mar 2004 16:48:52 -0000	1.8
  +++ KeepAliveOutputStream.java	24 Jan 2005 18:13:20 -0000	1.9
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2002,2004 The Apache Software Foundation
  + * Copyright  2002,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -36,13 +36,20 @@
    */
   public class KeepAliveOutputStream extends FilterOutputStream {
   
  +    /**
  +     * Constructor of KeepAliveOutputStream.
  +     *
  +     * @param out an OutputStream value, it shoudl be standard output.
  +     */
       public KeepAliveOutputStream(OutputStream out) {
           super(out);
       }
   
  -    /** this method does nothing */
  +    /**
  +     * This method does nothing.
  +     * @throws IOException as we are overridding FilterOutputStream.
  +     */
       public void close() throws IOException {
  -        //
  +        // do not close the stream
       }
   }
  -
  
  
  
  1.6       +11 -4     ant/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java
  
  Index: KeepAliveInputStream.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/KeepAliveInputStream.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- KeepAliveInputStream.java	9 Mar 2004 16:48:52 -0000	1.5
  +++ KeepAliveInputStream.java	24 Jan 2005 18:13:20 -0000	1.6
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2003-2004 The Apache Software Foundation
  + * Copyright  2003-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -37,13 +37,20 @@
    */
   public class KeepAliveInputStream extends FilterInputStream {
   
  +    /**
  +     * Constructor of KeepAliveInputStream.
  +     *
  +     * @param in an InputStream value, it should be standard input.
  +     */
       public KeepAliveInputStream(InputStream in) {
           super(in);
       }
   
  -    /** this method does nothing */
  +    /**
  +     * This method does nothing.
  +     * @throws IOException as we are overridding FilterInputStream.
  +     */
       public void close() throws IOException {
  -        //
  +        // do not close the stream
       }
   }
  -
  
  
  
  1.25      +26 -23    ant/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
  
  Index: JavaEnvUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/JavaEnvUtils.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- JavaEnvUtils.java	6 Jan 2005 12:05:07 -0000	1.24
  +++ JavaEnvUtils.java	24 Jan 2005 18:13:20 -0000	1.25
  @@ -30,20 +30,20 @@
    *
    * @since Ant 1.5
    */
  -public class JavaEnvUtils {
  +public final class JavaEnvUtils {
   
       private JavaEnvUtils() {
       }
   
       /** Are we on a DOS-based system */
  -    private static final boolean isDos = Os.isFamily("dos");
  +    private static final boolean IS_DOS = Os.isFamily("dos");
       /** Are we on Novell NetWare */
  -    private static final boolean isNetware = Os.isName("netware");
  +    private static final boolean IS_NETWARE = Os.isName("netware");
       /** Are we on AIX */
  -    private static final boolean isAix = Os.isName("aix");
  +    private static final boolean IS_AIX = Os.isName("aix");
   
       /** shortcut for System.getProperty("java.home") */
  -    private static final String javaHome = System.getProperty("java.home");
  +    private static final String JAVA_HOME = System.getProperty("java.home");
   
       /** FileUtils instance for path normalization */
       private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
  @@ -127,8 +127,8 @@
        * Compares the current Java version to the passed in String -
        * assumes the argument is one of the constants defined in this
        * class.
  -     * @return true if the version of Java is the same as the given
  -     * version.
  +     * @param version the version to check against the current version.
  +     * @return true if the version of Java is the same as the given version.
        * @since Ant 1.5
        */
       public static boolean isJavaVersion(String version) {
  @@ -159,11 +159,12 @@
        * <code>JAVA_HOME</code> points to your JDK installation.  JDK
        * &lt; 1.2 has them in the same directory as the JDK
        * executables.</p>
  -     *
  +     * @param command the java executable to find.
  +     * @return the path to the command.
        * @since Ant 1.5
        */
       public static String getJreExecutable(String command) {
  -        if (isNetware) {
  +        if (IS_NETWARE) {
               // Extrapolating from:
               // "NetWare may have a "java" in that directory, but 99% of
               // the time, you don't want to execute it" -- Jeff Tulley
  @@ -173,14 +174,14 @@
   
           File jExecutable = null;
   
  -        if (isAix) {
  +        if (IS_AIX) {
               // On IBM's JDK 1.2 the directory layout is different, 1.3 follows
               // Sun's layout.
  -            jExecutable = findInDir(javaHome + "/sh", command);
  +            jExecutable = findInDir(JAVA_HOME + "/sh", command);
           }
   
           if (jExecutable == null) {
  -            jExecutable = findInDir(javaHome + "/bin", command);
  +            jExecutable = findInDir(JAVA_HOME + "/bin", command);
           }
   
           if (jExecutable != null) {
  @@ -199,11 +200,12 @@
        *
        * <p>You typically find them in <code>JAVA_HOME/bin</code> if
        * <code>JAVA_HOME</code> points to your JDK installation.</p>
  -     *
  +     * @param command the java executable to find.
  +     * @return the path to the command.
        * @since Ant 1.5
        */
       public static String getJdkExecutable(String command) {
  -        if (isNetware) {
  +        if (IS_NETWARE) {
               // Extrapolating from:
               // "NetWare may have a "java" in that directory, but 99% of
               // the time, you don't want to execute it" -- Jeff Tulley
  @@ -213,14 +215,14 @@
   
           File jExecutable = null;
   
  -        if (isAix) {
  +        if (IS_AIX) {
               // On IBM's JDK 1.2 the directory layout is different, 1.3 follows
               // Sun's layout.
  -            jExecutable = findInDir(javaHome + "/../sh", command);
  +            jExecutable = findInDir(JAVA_HOME + "/../sh", command);
           }
   
           if (jExecutable == null) {
  -            jExecutable = findInDir(javaHome + "/../bin", command);
  +            jExecutable = findInDir(JAVA_HOME + "/../bin", command);
           }
   
           if (jExecutable != null) {
  @@ -241,7 +243,7 @@
       private static String addExtension(String command) {
           // This is the most common extension case - exe for windows and OS/2,
           // nothing for *nix.
  -        return command + (isDos ? ".exe" : "");
  +        return command + (IS_DOS ? ".exe" : "");
       }
   
       /**
  @@ -263,7 +265,7 @@
   
       /**
        * demand creation of the package list.
  -     * When you add a new package, add a new test below
  +     * When you add a new package, add a new test below.
        */
   
       private static void buildJrePackages() {
  @@ -307,6 +309,7 @@
   
       /**
        * Testing helper method; kept here for unification of changes.
  +     * @return a list of test classes depending on the java version.
        */
       public static Vector getJrePackageTestCases() {
           Vector tests = new Vector();
  @@ -351,7 +354,7 @@
       /**
        * get a vector of strings of packages built into
        * that platforms runtime jar(s)
  -     * @return list of packages
  +     * @return list of packages.
        */
       public static Vector getJrePackages() {
           if (jrePackages == null) {
  @@ -365,9 +368,9 @@
        * Writes the command into a temporary DCL script and returns the
        * corresponding File object.
        * It is the job of the caller to delete the file on exit.
  -     * @param cmd
  -     * @return
  -     * @throws IOException
  +     * @param cmd the command.
  +     * @return the file containing the command.
  +     * @throws IOException if there is an error writing to the file.
        */
       public static File createVmsJavaOptionFile(String[] cmd)
               throws IOException {
  
  
  
  1.17      +11 -3     ant/src/main/org/apache/tools/ant/util/JAXPUtils.java
  
  Index: JAXPUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/JAXPUtils.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- JAXPUtils.java	6 Jan 2005 12:05:07 -0000	1.16
  +++ JAXPUtils.java	24 Jan 2005 18:13:20 -0000	1.17
  @@ -71,7 +71,8 @@
        * Returns the parser factory to use. Only one parser factory is
        * ever created by this method and is then cached for future use.
        *
  -     * @return a SAXParserFactory to use
  +     * @return a SAXParserFactory to use.
  +     * @throws BuildException on error.
        *
        * @since Ant 1.5
        */
  @@ -88,7 +89,8 @@
        * Returns the parser factory to use to create namespace aware parsers.
        *
        * @return a SAXParserFactory to use which supports manufacture of
  -     * namespace aware parsers
  +     * namespace aware parsers.
  +     * @throws BuildException on error.
        *
        * @since Ant 1.6
        */
  @@ -105,6 +107,8 @@
       /**
        * Returns a new  parser factory instance.
        *
  +     * @return the parser factory.
  +     * @throws BuildException on error.
        * @since Ant 1.5
        */
       public static SAXParserFactory newParserFactory() throws BuildException {
  @@ -123,6 +127,7 @@
        * factory.
        *
        * @return a SAX 1 Parser.
  +     * @throws BuildException on error.
        * @see #getParserFactory
        * @since Ant 1.5
        */
  @@ -139,6 +144,7 @@
        * factory.
        *
        * @return a SAX 2 XMLReader.
  +     * @throws BuildException on error.
        * @see #getParserFactory
        * @since Ant 1.5
        */
  @@ -154,6 +160,7 @@
        * Returns a newly created SAX 2 XMLReader, which is namespace aware
        *
        * @return a SAX 2 XMLReader.
  +     * @throws BuildException on error.
        * @see #getParserFactory
        * @since Ant 1.6
        */
  @@ -181,7 +188,8 @@
       /**
        * Returns a newly created DocumentBuilder.
        *
  -     * @return a DocumentBuilder
  +     * @return a DocumentBuilder.
  +     * @throws BuildException on error.
        * @since Ant 1.6
        */
       public static DocumentBuilder getDocumentBuilder() throws BuildException {
  
  
  
  1.10      +5 -1      ant/src/main/org/apache/tools/ant/util/IdentityMapper.java
  
  Index: IdentityMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/IdentityMapper.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- IdentityMapper.java	9 Mar 2004 16:48:51 -0000	1.9
  +++ IdentityMapper.java	24 Jan 2005 18:13:20 -0000	1.10
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000,2004 The Apache Software Foundation
  + * Copyright  2000,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -28,18 +28,22 @@
   
       /**
        * Ignored.
  +     * @param from ignored.
        */
       public void setFrom(String from) {
       }
   
       /**
        * Ignored.
  +     * @param to ignored.
        */
       public void setTo(String to) {
       }
   
       /**
        * Returns an one-element array containing the source file name.
  +     * @param sourceFileName the name to map.
  +     * @return the source filename in a one-element array.
        */
       public String[] mapFileName(String sourceFileName) {
           return new String[] {sourceFileName};
  
  
  
  1.12      +1 -2      ant/src/main/org/apache/tools/ant/util/GlobPatternMapper.java
  
  Index: GlobPatternMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/GlobPatternMapper.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- GlobPatternMapper.java	17 Dec 2004 13:06:35 -0000	1.11
  +++ GlobPatternMapper.java	24 Jan 2005 18:13:20 -0000	1.12
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000,2002,2004 The Apache Software Foundation
  + * Copyright  2000,2002,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -146,7 +146,6 @@
           return name.substring(prefixLength,
                                 name.length() - postfixLength);
       }
  -
   
       /**
        * modify string based on dir char mapping and case sensitivity
  
  
  
  1.10      +5 -1      ant/src/main/org/apache/tools/ant/util/FlatFileNameMapper.java
  
  Index: FlatFileNameMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/FlatFileNameMapper.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FlatFileNameMapper.java	9 Mar 2004 16:48:51 -0000	1.9
  +++ FlatFileNameMapper.java	24 Jan 2005 18:13:20 -0000	1.10
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000,2004 The Apache Software Foundation
  + * Copyright  2000,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -29,12 +29,14 @@
   
       /**
        * Ignored.
  +     * @param from ignored.
        */
       public void setFrom(String from) {
       }
   
       /**
        * Ignored.
  +     * @param to ignored.
        */
       public void setTo(String to) {
       }
  @@ -42,6 +44,8 @@
       /**
        * Returns an one-element array containing the source file name
        * without any leading directory information.
  +     * @param sourceFileName the name to map.
  +     * @return the file name in a one-element array.
        */
       public String[] mapFileName(String sourceFileName) {
           return new String[] {new java.io.File(sourceFileName).getName()};
  
  
  
  1.11      +5 -1      ant/src/main/org/apache/tools/ant/util/FileNameMapper.java
  
  Index: FileNameMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/FileNameMapper.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FileNameMapper.java	9 Mar 2004 16:48:51 -0000	1.10
  +++ FileNameMapper.java	24 Jan 2005 18:13:20 -0000	1.11
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000,2004 The Apache Software Foundation
  + * Copyright  2000,2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -32,11 +32,13 @@
   
       /**
        * Sets the from part of the transformation rule.
  +     * @param from a string.
        */
       void setFrom(String from);
   
       /**
        * Sets the to part of the transformation rule.
  +     * @param to a string.
        */
       void setTo(String to);
   
  @@ -50,6 +52,8 @@
        *
        * @param sourceFileName the name of the source file relative to
        *                       some given basedirectory.
  +     * @return an array of strings if the ruld applies to the source file, or
  +     *         null if it does not.
        */
       String[] mapFileName(String sourceFileName);
   }
  
  
  
  1.16      +5 -3      ant/src/main/org/apache/tools/ant/util/DateUtils.java
  
  Index: DateUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/DateUtils.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DateUtils.java	9 Mar 2004 16:48:51 -0000	1.15
  +++ DateUtils.java	24 Jan 2005 18:13:20 -0000	1.16
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2002-2004 The Apache Software Foundation
  + * Copyright  2002-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -171,6 +171,8 @@
        * + 11/22 for rounding
        * </pre>
        *
  +     * @param cal the calander.
  +     *
        * @return The phase of the moon as a number between 0 and 7 with
        *         0 meaning new moon and 4 meaning full moon.
        *
  @@ -189,7 +191,7 @@
       /**
        * Returns the current Date in a format suitable for a SMTP date
        * header.
  -     *
  +     * @return the current date.
        * @since Ant 1.5.2
        */
       public static String getDateForHeader() {
  
  
  
  1.26      +11 -2     ant/src/main/org/apache/tools/ant/util/DOMElementWriter.java
  
  Index: DOMElementWriter.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/DOMElementWriter.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- DOMElementWriter.java	17 May 2004 13:43:32 -0000	1.25
  +++ DOMElementWriter.java	24 Jan 2005 18:13:20 -0000	1.26
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2000-2004 The Apache Software Foundation
  + * Copyright  2000-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -145,6 +145,8 @@
                   }
                   out.write("?>");
                   break;
  +            default:
  +                // Do nothing
               }
           }
   
  @@ -168,6 +170,8 @@
       /**
        * Escape &lt;, &gt; &amp; &apos;, &quot; as their entities and
        * drop characters that are illegal in XML documents.
  +     * @param value the string to encode.
  +     * @return the encoded string.
        */
       public String encode(String value) {
           StringBuffer sb = new StringBuffer();
  @@ -217,6 +221,8 @@
        * href="http://www.w3.org/TR/1998/REC-xml-19980210#charsets">http://www.w3.org/TR/1998/REC-xml-19980210#charsets</a> and
        * 2.7 <a
        * href="http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect">http://www.w3.org/TR/1998/REC-xml-19980210#sec-cdata-sect</a>.</p>
  +     * @param value the value to be encoded.
  +     * @return the encoded value.
   
        */
       public String encodedata(final String value) {
  @@ -244,6 +250,8 @@
   
       /**
        * Is the given argument a character or entity reference?
  +     * @param ent the value to be checked.
  +     * @return true if it is an entity.
        */
       public boolean isReference(String ent) {
           if (!(ent.charAt(0) == '&') || !ent.endsWith(";")) {
  @@ -283,7 +291,8 @@
        * <p>See XML 1.0 2.2 <a
        * href="http://www.w3.org/TR/1998/REC-xml-19980210#charsets">
        * http://www.w3.org/TR/1998/REC-xml-19980210#charsets</a>.</p>
  -     *
  +     * @param c the character to test.
  +     * @return true if the character is allowed.
        * @since 1.10, Ant 1.5
        */
       public boolean isLegalCharacter(char c) {
  
  
  
  1.5       +3 -1      ant/src/main/org/apache/tools/ant/util/ContainerMapper.java
  
  Index: ContainerMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/ContainerMapper.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ContainerMapper.java	22 Nov 2004 09:23:37 -0000	1.4
  +++ ContainerMapper.java	24 Jan 2005 18:13:20 -0000	1.5
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2004 The Apache Software Foundation.
  + * Copyright 2004-2005 The Apache Software Foundation.
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -86,12 +86,14 @@
   
       /**
        * Empty implementation.
  +     * @param ignore ignored.
        */
       public void setFrom(String ignore) {
       }
   
       /**
        * Empty implementation.
  +     * @param ignore ignored.
        */
       public void setTo(String ignore) {
       }
  
  
  
  1.5       +3 -9      ant/src/main/org/apache/tools/ant/util/ConcatFileInputStream.java
  
  Index: ConcatFileInputStream.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/ConcatFileInputStream.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ConcatFileInputStream.java	22 Nov 2004 09:23:37 -0000	1.4
  +++ ConcatFileInputStream.java	24 Jan 2005 18:13:20 -0000	1.5
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2004 The Apache Software Foundation
  + * Copyright 2004-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -112,13 +112,7 @@
       }
   
       private void closeCurrent() {
  -        if (currentStream != null) {
  -            try {
  -                currentStream.close();
  -            } catch (IOException eyeOhEx) {
  -            }
  -            currentStream = null;
  -        }
  +        FileUtils.close(currentStream);
  +        currentStream = null;
       }
   }
  -
  
  
  
  1.16      +23 -9     ant/src/main/org/apache/tools/ant/util/CollectionUtils.java
  
  Index: CollectionUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/CollectionUtils.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CollectionUtils.java	27 Jul 2004 07:02:06 -0000	1.15
  +++ CollectionUtils.java	24 Jan 2005 18:13:20 -0000	1.16
  @@ -1,5 +1,5 @@
   /*
  - * Copyright  2002-2004 The Apache Software Foundation
  + * Copyright  2002-2005 The Apache Software Foundation
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -29,8 +29,10 @@
   public class CollectionUtils {
   
       /**
  -     * Please use Vector.equals() or List.equals()
  -     *
  +     * Please use Vector.equals() or List.equals().
  +     * @param v1 the first vector.
  +     * @param v2 the second vector.
  +     * @return true if the vectors are equal.
        * @since Ant 1.5
        * @deprecated
        */
  @@ -48,10 +50,12 @@
   
       /**
        * Dictionary does not have an equals.
  -     * Please use  Map.equals()
  +     * Please use  Map.equals().
        *
        * <p>Follows the equals contract of Java 2's Map.</p>
  -     *
  +     * @param d1 the first directory.
  +     * @param d2 the second directory.
  +     * @return true if the directories are equal.
        * @since Ant 1.5
        * @deprecated
        */
  @@ -86,7 +90,8 @@
   
       /**
        * Dictionary does not know the putAll method. Please use Map.putAll().
  -     *
  +     * @param m1 the to directory.
  +     * @param m2 the from directory.
        * @since Ant 1.6
        * @deprecated
        */
  @@ -98,16 +103,25 @@
       }
   
       /**
  +     * An empty enumeration.
        * @since Ant 1.6
        */
       public static final class EmptyEnumeration implements Enumeration {
  +        /** Constructor for the EmptyEnumeration */
           public EmptyEnumeration() {
           }
   
  +        /**
  +         * @return false always.
  +         */
           public boolean hasMoreElements() {
               return false;
           }
   
  +        /**
  +         * @return nothing.
  +         * @throws NoSuchElementException always.
  +         */
           public Object nextElement() throws NoSuchElementException {
               throw new NoSuchElementException();
           }
  @@ -116,9 +130,9 @@
       /**
        * Append one enumeration to another.
        * Elements are evaluated lazily.
  -     * @param e1 the first enumeration
  -     * @param e2 the subsequent enumeration
  -     * @return an enumeration representing e1 followed by e2
  +     * @param e1 the first enumeration.
  +     * @param e2 the subsequent enumeration.
  +     * @return an enumeration representing e1 followed by e2.
        * @since Ant 1.6.3
        */
       public static Enumeration append(Enumeration e1, Enumeration e2) {
  
  
  
  1.3       +1 -2      ant/src/main/org/apache/tools/ant/util/ChainedMapper.java
  
  Index: ChainedMapper.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/ChainedMapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ChainedMapper.java	22 Nov 2004 09:23:37 -0000	1.2
  +++ ChainedMapper.java	24 Jan 2005 18:13:20 -0000	1.3
  @@ -1,5 +1,5 @@
   /*
  - * Copyright 2004 The Apache Software Foundation.
  + * Copyright 2004-2005 The Apache Software Foundation.
    *
    *  Licensed under the Apache License, Version 2.0 (the "License");
    *  you may not use this file except in compliance with the License.
  @@ -21,7 +21,6 @@
   import java.util.Arrays;
   import java.util.Iterator;
   import java.util.ArrayList;
  -import org.apache.tools.ant.types.Mapper;
   
   /**
    * A <CODE>ContainerMapper</CODE> that chains the results of the first
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org