ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: ant/src/script ant.bat
Date Wed, 09 Jul 2003 13:12:25 GMT
conor       2003/07/09 06:12:25

  Modified:    src/main/org/apache/tools/ant PathTokenizer.java
               src/main/org/apache/tools/ant/filters EscapeUnicode.java
                        StripLineBreaks.java
               src/main/org/apache/tools/ant/taskdefs Mkdir.java
                        Sequential.java
               src/main/org/apache/tools/ant/taskdefs/optional ANTLR.java
               src/main/org/apache/tools/ant/taskdefs/optional/i18n
                        Translate.java
               src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
               src/main/org/apache/tools/mail ErrorInQuitException.java
               src/script ant.bat
  Log:
  Checkstyle
  
  Revision  Changes    Path
  1.17      +1 -1      ant/src/main/org/apache/tools/ant/PathTokenizer.java
  
  Index: PathTokenizer.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/PathTokenizer.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -w -u -r1.16 -r1.17
  
  
  
  1.4       +0 -1      ant/src/main/org/apache/tools/ant/filters/EscapeUnicode.java
  
  Index: EscapeUnicode.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/filters/EscapeUnicode.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -u -r1.3 -r1.4
  --- EscapeUnicode.java	6 Jul 2003 09:57:35 -0000	1.3
  +++ EscapeUnicode.java	9 Jul 2003 13:12:23 -0000	1.4
  @@ -55,7 +55,6 @@
   
   import java.io.IOException;
   import java.io.Reader;
  -import org.apache.tools.ant.types.Parameter;
   
   /**
    * Converts non latin characters to unicode escapes
  
  
  
  1.9       +2 -1      ant/src/main/org/apache/tools/ant/filters/StripLineBreaks.java
  
  Index: StripLineBreaks.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/filters/StripLineBreaks.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -w -u -r1.8 -r1.9
  --- StripLineBreaks.java	6 Jul 2003 09:57:35 -0000	1.8
  +++ StripLineBreaks.java	9 Jul 2003 13:12:23 -0000	1.9
  @@ -66,7 +66,8 @@
    *
    * Or:
    *
  - * <pre>&lt;filterreader classname=&quot;org.apache.tools.ant.filters.StripLineBreaks&quot;/&gt;</pre>
  + * <pre>&lt;filterreader
  + *   classname=&quot;org.apache.tools.ant.filters.StripLineBreaks&quot;/&gt;</pre>
    *
    * @author Steve Loughran
    * @author Magesh Umasankar
  
  
  
  1.24      +2 -1      ant/src/main/org/apache/tools/ant/taskdefs/Mkdir.java
  
  Index: Mkdir.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Mkdir.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -w -u -r1.23 -r1.24
  --- Mkdir.java	6 Jul 2003 09:57:36 -0000	1.23
  +++ Mkdir.java	9 Jul 2003 13:12:23 -0000	1.24
  @@ -104,7 +104,8 @@
   
       /**
        * the directory to create; required.
  -     * @param dir
  +     *
  +     * @param dir the directory to be made.
        */
       public void setDir(File dir) {
           this.dir = dir;
  
  
  
  1.14      +2 -0      ant/src/main/org/apache/tools/ant/taskdefs/Sequential.java
  
  Index: Sequential.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Sequential.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -w -u -r1.13 -r1.14
  --- Sequential.java	6 Jul 2003 09:57:36 -0000	1.13
  +++ Sequential.java	9 Jul 2003 13:12:24 -0000	1.14
  @@ -94,6 +94,8 @@
   
       /**
        * Execute all nestedTasks.
  +     *
  +     * @throws BuildException if one of the nested tasks fails.
        */
       public void execute() throws BuildException {
           for (Enumeration e = nestedTasks.elements(); e.hasMoreElements();) {
  
  
  
  1.30      +7 -7      ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java
  
  Index: ANTLR.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -w -u -r1.29 -r1.30
  
  
  
  1.24      +74 -60    ant/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java
  
  Index: Translate.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -w -u -r1.23 -r1.24
  --- Translate.java	30 Jun 2003 13:51:35 -0000	1.23
  +++ Translate.java	9 Jul 2003 13:12:24 -0000	1.24
  @@ -83,71 +83,88 @@
        * Family name of resource bundle
        */
       private String bundle;
  +
       /**
        * Locale specific language of the resource bundle
        */
       private String bundleLanguage;
  +
       /**
        * Locale specific country of the resource bundle
        */
       private String bundleCountry;
  +
       /**
        * Locale specific variant of the resource bundle
        */
       private String bundleVariant;
  +
       /**
        * Destination directory
        */
       private File toDir;
  +
       /**
        * Source file encoding scheme
        */
       private String srcEncoding;
  +
       /**
        * Destination file encoding scheme
        */
       private String destEncoding;
  +
       /**
        * Resource Bundle file encoding scheme, defaults to srcEncoding
        */
       private String bundleEncoding;
  +
       /**
        * Starting token to identify keys
        */
       private String startToken;
  +
       /**
        * Ending token to identify keys
        */
       private String endToken;
  +
       /**
        * Whether or not to create a new destination file.
        * Defaults to <code>false</code>.
        */
       private boolean forceOverwrite;
  +
       /**
        * Vector to hold source file sets.
        */
       private Vector filesets = new Vector();
  +
       /**
        * Holds key value pairs loaded from resource bundle file
        */
       private Hashtable resourceMap = new Hashtable();
       /**
  +
        * Used to resolve file names.
        */
       private FileUtils fileUtils = FileUtils.newFileUtils();
  +
       /**
        * Last Modified Timestamp of resource bundle file being used.
        */
       private long[] bundleLastModified = new long[7];
  +
       /**
        * Last Modified Timestamp of source file being used.
        */
       private long srcLastModified;
  +
       /**
        * Last Modified Timestamp of destination file being used.
        */
       private long destLastModified;
  +
       /**
        * Has at least one file from the bundle been loaded?
        */
  @@ -283,11 +300,9 @@
   
           if (!toDir.exists()) {
               toDir.mkdirs();
  -        } else {
  -            if (toDir.isFile()) {
  +        } else if (toDir.isFile()) {
                   throw new BuildException(toDir + " is not a directory");
               }
  -        }
   
           if (srcEncoding == null) {
               srcEncoding = System.getProperty("file.encoding");
  @@ -515,8 +530,7 @@
   						// is there a startToken
   						// and there is still stuff following the startToken
   						int startIndex = line.indexOf(startToken);
  -						while ( startIndex >= 0 && (startIndex+startToken.length()) <= line.length()
)
  -						{
  +                        while (startIndex >= 0 && (startIndex + startToken.length())
<= line.length()) {
   							// the new value, this needs to be here
   							// because it is required to calculate the next position to search from
   							// at the end of the loop
  @@ -525,9 +539,9 @@
   							// we found a starttoken, is there an endtoken following?
   							// start at token+tokenlength because start and end token may be indentical
   							int endIndex = line.indexOf(endToken, startIndex + startToken.length());
  -							if (endIndex < 0) startIndex += 1;
  -							else
  -							{
  +                            if (endIndex < 0) {
  +                                startIndex += 1;
  +                            } else {
   								// grab the token
   								String token = line.substring(startIndex + startToken.length(), endIndex);
   
  @@ -537,20 +551,20 @@
   				                for (int k = 0; k < token.length() && validToken; k++)
   				                {
   				                    char c = token.charAt(k);
  -				                    if ( c == ':'
  -				                      || c == '='
  -				                      || Character.isSpaceChar(c)
  -				                       )
  -				                    {
  +                                    if (c == ':' || c == '='
  +                                        || Character.isSpaceChar(c)) {
   				                    	validToken = false;
   				                    }
   				                }
  -				                if (!validToken) startIndex += 1;
  -				                else
  -				                {
  +                                if (!validToken) {
  +                                    startIndex += 1;
  +                                } else {
   				                	// find the replace string
  -				                	if (resourceMap.containsKey(token)) replace = (String)resourceMap.get(token);
  -				                	else                                replace = token;
  +                                    if (resourceMap.containsKey(token)) {
  +                                        replace = (String) resourceMap.get(token);
  +                                    } else {
  +                                        replace = token;
  +                                    }
   
   
   				                    // generate the new line
  
  
  
  1.69      +8 -8      ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -w -u -r1.68 -r1.69
  
  
  
  1.5       +7 -2      ant/src/main/org/apache/tools/mail/ErrorInQuitException.java
  
  Index: ErrorInQuitException.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/mail/ErrorInQuitException.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- ErrorInQuitException.java	7 Mar 2003 11:23:09 -0000	1.4
  +++ ErrorInQuitException.java	9 Jul 2003 13:12:25 -0000	1.5
  @@ -69,6 +69,11 @@
    */
   public class ErrorInQuitException extends IOException {
   
  +    /**
  +     * Initialise from an IOException
  +     *
  +     * @param e the IO Exception.
  +     */
       public ErrorInQuitException(IOException e) {
           super(e.getMessage());
       }
  
  
  
  1.28      +3 -5      ant/src/script/ant.bat
  
  Index: ant.bat
  ===================================================================
  RCS file: /home/cvs/ant/src/script/ant.bat,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -w -u -r1.27 -r1.28
  --- ant.bat	17 Feb 2003 00:17:14 -0000	1.27
  +++ ant.bat	9 Jul 2003 13:12:25 -0000	1.28
  @@ -55,13 +55,11 @@
   :checkJava
   set _JAVACMD=%JAVACMD%
   set LOCALCLASSPATH=%CLASSPATH%
  -for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" %%i
   
   if "%JAVA_HOME%" == "" goto noJavaHome
   if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
   if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
   if exist "%JAVA_HOME%\lib\tools.jar" set LOCALCLASSPATH=%JAVA_HOME%\lib\tools.jar;%LOCALCLASSPATH%
  -if exist "%JAVA_HOME%\lib\classes.zip" set LOCALCLASSPATH=%JAVA_HOME%\lib\classes.zip;%LOCALCLASSPATH%
   goto checkJikes
   
   :noJavaHome
  @@ -77,11 +75,11 @@
   if not "%JIKESPATH%"=="" goto runAntWithJikes
   
   :runAnt
  -"%_JAVACMD%" %ANT_OPTS% -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.Main
%ANT_ARGS% %ANT_CMD_LINE_ARGS%
  +"%_JAVACMD%" %ANT_OPTS% -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher
%ANT_ARGS% %ANT_CMD_LINE_ARGS%
   goto end
   
   :runAntWithJikes
  -"%_JAVACMD%" %ANT_OPTS% -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%"
org.apache.tools.ant.Main %ANT_ARGS% %ANT_CMD_LINE_ARGS%
  +"%_JAVACMD%" %ANT_OPTS% -classpath "%LOCALCLASSPATH%" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
   goto end
   
   :end
  
  
  

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


Mime
View raw message