diff --git a/proposal/myrmidon/src/java/org/apache/antlib/archive/BZip2.java b/proposal/myrmidon/src/java/org/apache/antlib/archive/BZip2.java
index 9428a8819..db9232b44 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/archive/BZip2.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/archive/BZip2.java
@@ -22,7 +22,7 @@ import org.apache.aut.bzip2.CBZip2OutputStream;
public class BZip2
extends Pack
{
- private static final byte[] HEADER = new byte[]{(byte)'B', (byte)'Z'};
+ private final static byte[] HEADER = new byte[]{(byte)'B', (byte)'Z'};
protected OutputStream getPackingStream( OutputStream output )
throws TaskException, IOException
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/archive/Pack.java b/proposal/myrmidon/src/java/org/apache/antlib/archive/Pack.java
index 0c8b0e86f..9343ca370 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/archive/Pack.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/archive/Pack.java
@@ -12,7 +12,7 @@ import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
-import java.util.zip.GZIPOutputStream;
+
import org.apache.avalon.excalibur.io.IOUtil;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/LoadProperties.java b/proposal/myrmidon/src/java/org/apache/antlib/core/LoadProperties.java
index af18dd5d4..ff9004094 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/LoadProperties.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/LoadProperties.java
@@ -26,7 +26,7 @@ import org.apache.myrmidon.framework.AbstractContainerTask;
public class LoadProperties
extends AbstractContainerTask
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( LoadProperties.class );
private String m_prefix;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/Property.java b/proposal/myrmidon/src/java/org/apache/antlib/core/Property.java
index fa494bfa3..a9a9297f5 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/Property.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/Property.java
@@ -34,7 +34,7 @@ public class Property
extends AbstractContainerTask
implements Configurable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( Property.class );
private String m_name;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToBooleanConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToBooleanConverter.java
index 63a8ca5a4..469dc9745 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToBooleanConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToBooleanConverter.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToBooleanConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToBooleanConverter.class );
public StringToBooleanConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToByteConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToByteConverter.java
index 3a0f9c7d1..f6e606631 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToByteConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToByteConverter.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToByteConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToByteConverter.class );
public StringToByteConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToClassConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToClassConverter.java
index 38c33fbe6..1ed3975c1 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToClassConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToClassConverter.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToClassConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToClassConverter.class );
public StringToClassConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToDoubleConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToDoubleConverter.java
index 32f9e3efc..aedb1d8b9 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToDoubleConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToDoubleConverter.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToDoubleConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToDoubleConverter.class );
public StringToDoubleConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToEnumConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToEnumConverter.java
index f70051d0c..b56dee737 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToEnumConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToEnumConverter.java
@@ -25,7 +25,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToEnumConverter
implements Converter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToEnumConverter.class );
public Object convert( final Class destination,
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToFileConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToFileConverter.java
index f503541a7..198631bce 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToFileConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToFileConverter.java
@@ -25,7 +25,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToFileConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToFileConverter.class );
public StringToFileConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToFloatConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToFloatConverter.java
index 025100b14..8e6dd663d 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToFloatConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToFloatConverter.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToFloatConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToFloatConverter.class );
public StringToFloatConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToIntegerConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToIntegerConverter.java
index 0f6f4c8eb..81e53b6bd 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToIntegerConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToIntegerConverter.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToIntegerConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToFloatConverter.class );
public StringToIntegerConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToLongConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToLongConverter.java
index 7304eb10c..9086419a6 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToLongConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToLongConverter.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToLongConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToLongConverter.class );
public StringToLongConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToShortConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToShortConverter.java
index 50aaedda7..5c70214ab 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToShortConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToShortConverter.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToShortConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToShortConverter.class );
public StringToShortConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToURLConverter.java b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToURLConverter.java
index 4ed6e9d04..bf19e7d44 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/core/StringToURLConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/core/StringToURLConverter.java
@@ -24,7 +24,7 @@ import org.apache.myrmidon.converter.ConverterException;
public class StringToURLConverter
extends AbstractConverter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( StringToURLConverter.class );
public StringToURLConverter()
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/cvslib/CVSPass.java b/proposal/myrmidon/src/java/org/apache/antlib/cvslib/CVSPass.java
index 37dea1f8d..edb072074 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/cvslib/CVSPass.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/cvslib/CVSPass.java
@@ -44,7 +44,7 @@ public class CVSPass
/**
* Array contain char conversion data
*/
- private static final char[] c_shifts =
+ private final static char[] c_shifts =
{
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/cvslib/Cvs.java b/proposal/myrmidon/src/java/org/apache/antlib/cvslib/Cvs.java
index 4a1c9336f..f5ece5f66 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/cvslib/Cvs.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/cvslib/Cvs.java
@@ -148,7 +148,9 @@ public class Cvs
final Execute2 exe = new Execute2();
setupLogger( exe );
- if( m_dest == null ) m_dest = getBaseDirectory();
+ if( m_dest == null ) {
+ m_dest = getBaseDirectory();
+ }
exe.setWorkingDirectory( m_dest );
exe.setCommandline( command.getCommandline() );
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/nativelib/Exec.java b/proposal/myrmidon/src/java/org/apache/antlib/nativelib/Exec.java
index 0cf4af732..188938bee 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/nativelib/Exec.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/nativelib/Exec.java
@@ -34,7 +34,7 @@ import org.apache.tools.ant.types.EnvironmentVariable;
public class Exec
extends AbstractTask
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( Exec.class );
private long m_timeout;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/nativelib/LoadEnvironment.java b/proposal/myrmidon/src/java/org/apache/antlib/nativelib/LoadEnvironment.java
index ed1a1472b..090ae6721 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/nativelib/LoadEnvironment.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/nativelib/LoadEnvironment.java
@@ -27,7 +27,7 @@ import org.apache.aut.nativelib.ExecException;
public class LoadEnvironment
extends AbstractTask
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( LoadEnvironment.class );
private String m_prefix;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/runtime/ConverterDef.java b/proposal/myrmidon/src/java/org/apache/antlib/runtime/ConverterDef.java
index 8436d87b1..f771a54f2 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/runtime/ConverterDef.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/runtime/ConverterDef.java
@@ -30,7 +30,7 @@ public class ConverterDef
extends AbstractTask
implements Composable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( ConverterDef.class );
private String m_sourceType;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/runtime/Facility.java b/proposal/myrmidon/src/java/org/apache/antlib/runtime/Facility.java
index a7977ee94..4bac1688c 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/runtime/Facility.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/runtime/Facility.java
@@ -32,7 +32,7 @@ public class Facility
extends AbstractContainerTask
implements Composable, Configurable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( Facility.class );
private String m_namespace;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/runtime/Import.java b/proposal/myrmidon/src/java/org/apache/antlib/runtime/Import.java
index c2ac018f6..0dc46aca3 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/runtime/Import.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/runtime/Import.java
@@ -27,7 +27,7 @@ public class Import
extends AbstractTask
implements Composable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( Import.class );
private File m_lib;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/selftest/SubElementTest.java b/proposal/myrmidon/src/java/org/apache/antlib/selftest/SubElementTest.java
index c102c7c4e..767821075 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/selftest/SubElementTest.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/selftest/SubElementTest.java
@@ -18,7 +18,7 @@ import org.apache.myrmidon.api.TaskException;
public class SubElementTest
extends AbstractTask
{
- public static final class Beep
+ public final static class Beep
{
public void setMessage( final String string )
{
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/xml/TraXLiaison.java b/proposal/myrmidon/src/java/org/apache/antlib/xml/TraXLiaison.java
index 9d2a5a9bc..8f9fb35e5 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/xml/TraXLiaison.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/xml/TraXLiaison.java
@@ -182,8 +182,9 @@ public class TraXLiaison
if( e.getLocator().getSystemId() != null )
{
String url = e.getLocator().getSystemId();
- if( url.startsWith( "file:///" ) )
+ if( url.startsWith( "file:///" ) ) {
url = url.substring( 8 );
+ }
msg.append( url );
}
else
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java b/proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java
index d278b5a24..f223613ee 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/xml/XMLValidateTask.java
@@ -8,12 +8,12 @@
package org.apache.antlib.xml;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
+
+
import java.io.FileReader;
import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
+
+
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
@@ -26,13 +26,13 @@ import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;
import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
+
import org.xml.sax.InputSource;
import org.xml.sax.Parser;
import org.xml.sax.SAXException;
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;
-import org.xml.sax.SAXParseException;
+
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.ParserAdapter;
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTParam.java b/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTParam.java
index 6c1c7f647..7f0b966a4 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTParam.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTParam.java
@@ -7,7 +7,7 @@
*/
package org.apache.antlib.xml;
-import org.apache.myrmidon.api.TaskException;
+
public final class XSLTParam
{
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTProcess.java b/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTProcess.java
index 2e311d846..73179c612 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTProcess.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/xml/XSLTProcess.java
@@ -244,8 +244,9 @@ public class XSLTProcess
for( int j = 0; j < dirs.length; ++j )
{
list = new File( m_baseDir, dirs[ j ] ).list();
- for( int i = 0; i < list.length; ++i )
+ for( int i = 0; i < list.length; ++i ) {
process( m_baseDir, list[ i ], m_destDir, stylesheet );
+ }
}
}
@@ -470,8 +471,9 @@ public class XSLTProcess
catch( Exception ex )
{
getLogger().info( "Failed to process " + inFile );
- if( outFile != null )
+ if( outFile != null ) {
outFile.delete();
+ }
throw new TaskException( "Error", ex );
}
}
diff --git a/proposal/myrmidon/src/java/org/apache/antlib/xml/XalanLiaison.java b/proposal/myrmidon/src/java/org/apache/antlib/xml/XalanLiaison.java
index 5f067e819..6f42bd0a8 100644
--- a/proposal/myrmidon/src/java/org/apache/antlib/xml/XalanLiaison.java
+++ b/proposal/myrmidon/src/java/org/apache/antlib/xml/XalanLiaison.java
@@ -38,8 +38,9 @@ public class XalanLiaison
public void setOutputtype( String type )
throws Exception
{
- if( !type.equals( "xml" ) )
+ if( !type.equals( "xml" ) ) {
throw new TaskException( "Unsupported output type: " + type );
+ }
}
public void setStylesheet( File stylesheet )
diff --git a/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2InputStream.java b/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2InputStream.java
index c5ac4011c..f45351818 100644
--- a/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2InputStream.java
+++ b/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2InputStream.java
@@ -175,8 +175,9 @@ public class CBZip2InputStream
m_blockSize100k = newSize100k;
- if( newSize100k == 0 )
+ if( newSize100k == 0 ) {
return;
+ }
int n = BASE_BLOCK_SIZE * newSize100k;
m_ll8 = new char[ n ];
@@ -302,8 +303,9 @@ public class CBZip2InputStream
{
m_rNToGo = RAND_NUMS[ m_rTPos ];
m_rTPos++;
- if( m_rTPos == 512 )
+ if( m_rTPos == 512 ) {
m_rTPos = 0;
+ }
}
m_rNToGo--;
ch2 ^= (int)( ( m_rNToGo == 1 ) ? 1 : 0 );
@@ -340,8 +342,9 @@ public class CBZip2InputStream
{
m_rNToGo = RAND_NUMS[ m_rTPos ];
m_rTPos++;
- if( m_rTPos == 512 )
+ if( m_rTPos == 512 ) {
m_rTPos = 0;
+ }
}
m_rNToGo--;
z ^= ( ( m_rNToGo == 1 ) ? 1 : 0 );
@@ -464,10 +467,11 @@ public class CBZip2InputStream
int N = 1;
do
{
- if( nextSym == RUNA )
+ if( nextSym == RUNA ) {
s = s + ( 0 + 1 ) * N;
- else if( nextSym == RUNB )
+ } else if( nextSym == RUNB ) {
s = s + ( 1 + 1 ) * N;
+ }
N = N * 2;
if( groupPos == 0 )
diff --git a/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2OutputStream.java b/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2OutputStream.java
index 93960bd29..eb7e8db37 100644
--- a/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2OutputStream.java
+++ b/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2OutputStream.java
@@ -187,8 +187,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
int weight[] = new int[ MAX_ALPHA_SIZE * 2 ];
int parent[] = new int[ MAX_ALPHA_SIZE * 2 ];
- for( i = 0; i < alphaSize; i++ )
+ for( i = 0; i < alphaSize; i++ ) {
weight[ i + 1 ] = ( freq[ i ] == 0 ? 1 : freq[ i ] ) << 8;
+ }
while( true )
{
@@ -217,8 +218,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
heap[ zz ] = tmp;
}
}
- if( !( nHeap < ( MAX_ALPHA_SIZE + 2 ) ) )
+ if( !( nHeap < ( MAX_ALPHA_SIZE + 2 ) ) ) {
panic();
+ }
while( nHeap > 1 )
{
@@ -234,13 +236,16 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
while( true )
{
yy = zz << 1;
- if( yy > nHeap )
+ if( yy > nHeap ) {
break;
+ }
if( yy < nHeap &&
- weight[ heap[ yy + 1 ] ] < weight[ heap[ yy ] ] )
+ weight[ heap[ yy + 1 ] ] < weight[ heap[ yy ] ] ) {
yy++;
- if( weight[ tmp ] < weight[ heap[ yy ] ] )
+ }
+ if( weight[ tmp ] < weight[ heap[ yy ] ] ) {
break;
+ }
heap[ zz ] = heap[ yy ];
zz = yy;
}
@@ -258,13 +263,16 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
while( true )
{
yy = zz << 1;
- if( yy > nHeap )
+ if( yy > nHeap ) {
break;
+ }
if( yy < nHeap &&
- weight[ heap[ yy + 1 ] ] < weight[ heap[ yy ] ] )
+ weight[ heap[ yy + 1 ] ] < weight[ heap[ yy ] ] ) {
yy++;
- if( weight[ tmp ] < weight[ heap[ yy ] ] )
+ }
+ if( weight[ tmp ] < weight[ heap[ yy ] ] ) {
break;
+ }
heap[ zz ] = heap[ yy ];
zz = yy;
}
@@ -296,8 +304,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
heap[ zz ] = tmp;
}
}
- if( !( nNodes < ( MAX_ALPHA_SIZE * 2 ) ) )
+ if( !( nNodes < ( MAX_ALPHA_SIZE * 2 ) ) ) {
panic();
+ }
tooLong = false;
for( i = 1; i <= alphaSize; i++ )
@@ -310,12 +319,14 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
j++;
}
len[ i - 1 ] = (char)j;
- if( j > maxLen )
+ if( j > maxLen ) {
tooLong = true;
+ }
}
- if( !tooLong )
+ if( !tooLong ) {
break;
+ }
for( i = 1; i < alphaSize; i++ )
{
@@ -335,11 +346,13 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
public void close()
throws IOException
{
- if( closed )
+ if( closed ) {
return;
+ }
- if( runLength > 0 )
+ if( runLength > 0 ) {
writeRun();
+ }
currentChar = -1;
endBlock();
endCompression();
@@ -520,16 +533,18 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
}
origPtr = -1;
- for( i = 0; i <= last; i++ )
+ for( i = 0; i <= last; i++ ) {
if( zptr[ i ] == 0 )
{
origPtr = i;
break;
}
+ }
;
- if( origPtr == -1 )
+ if( origPtr == -1 ) {
panic();
+ }
}
private void endBlock()
@@ -620,43 +635,49 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
i1++;
i2++;
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
i1++;
i2++;
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
i1++;
i2++;
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
i1++;
i2++;
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
i1++;
i2++;
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
i1++;
i2++;
@@ -666,45 +687,53 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
{
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
s1 = quadrant[ i1 ];
s2 = quadrant[ i2 ];
- if( s1 != s2 )
+ if( s1 != s2 ) {
return ( s1 > s2 );
+ }
i1++;
i2++;
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
s1 = quadrant[ i1 ];
s2 = quadrant[ i2 ];
- if( s1 != s2 )
+ if( s1 != s2 ) {
return ( s1 > s2 );
+ }
i1++;
i2++;
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
s1 = quadrant[ i1 ];
s2 = quadrant[ i2 ];
- if( s1 != s2 )
+ if( s1 != s2 ) {
return ( s1 > s2 );
+ }
i1++;
i2++;
c1 = block[ i1 + 1 ];
c2 = block[ i2 + 1 ];
- if( c1 != c2 )
+ if( c1 != c2 ) {
return ( c1 > c2 );
+ }
s1 = quadrant[ i1 ];
s2 = quadrant[ i2 ];
- if( s1 != s2 )
+ if( s1 != s2 ) {
return ( s1 > s2 );
+ }
i1++;
i2++;
@@ -742,13 +771,15 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
makeMaps();
EOB = nInUse + 1;
- for( i = 0; i <= EOB; i++ )
+ for( i = 0; i <= EOB; i++ ) {
mtfFreq[ i ] = 0;
+ }
wr = 0;
zPend = 0;
- for( i = 0; i < nInUse; i++ )
+ for( i = 0; i < nInUse; i++ ) {
yy[ i ] = (char)i;
+ }
for( i = 0; i <= last; i++ )
{
@@ -793,8 +824,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
break;
}
;
- if( zPend < 2 )
+ if( zPend < 2 ) {
break;
+ }
zPend = ( zPend - 2 ) / 2;
}
;
@@ -824,8 +856,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
mtfFreq[ RUNB ]++;
break;
}
- if( zPend < 2 )
+ if( zPend < 2 ) {
break;
+ }
zPend = ( zPend - 2 ) / 2;
}
}
@@ -847,12 +880,13 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
vec = 0;
for( n = minLen; n <= maxLen; n++ )
{
- for( i = 0; i < alphaSize; i++ )
+ for( i = 0; i < alphaSize; i++ ) {
if( length[ i ] == n )
{
code[ i ] = vec;
vec++;
}
+ }
;
vec <<= 1;
}
@@ -865,8 +899,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
last = -1;
// ch = 0;
- for( int i = 0; i < 256; i++ )
+ for( int i = 0; i < 256; i++ ) {
inUse[ i ] = false;
+ }
/*
* 20 is just a paranoia constant
@@ -910,10 +945,12 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
* set up the overshoot area for block.
*/
// if (verbosity >= 4) fprintf ( stderr, " sort initialise ...\n" );
- for( i = 0; i < NUM_OVERSHOOT_BYTES; i++ )
+ for( i = 0; i < NUM_OVERSHOOT_BYTES; i++ ) {
block[ last + i + 2 ] = block[ ( i % ( last + 1 ) ) + 1 ];
- for( i = 0; i <= last + NUM_OVERSHOOT_BYTES; i++ )
+ }
+ for( i = 0; i <= last + NUM_OVERSHOOT_BYTES; i++ ) {
quadrant[ i ] = 0;
+ }
block[ 0 ] = (char)( block[ last + 1 ] );
@@ -923,8 +960,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
* Use simpleSort(), since the full sorting mechanism
* has quite a large constant overhead.
*/
- for( i = 0; i <= last; i++ )
+ for( i = 0; i <= last; i++ ) {
zptr[ i ] = i;
+ }
firstAttempt = false;
workDone = workLimit = 0;
simpleSort( 0, last, 0 );
@@ -932,11 +970,13 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
else
{
numQSorted = 0;
- for( i = 0; i <= 255; i++ )
+ for( i = 0; i <= 255; i++ ) {
bigDone[ i ] = false;
+ }
- for( i = 0; i <= 65536; i++ )
+ for( i = 0; i <= 65536; i++ ) {
ftab[ i ] = 0;
+ }
c1 = block[ 0 ];
for( i = 0; i <= last; i++ )
@@ -946,8 +986,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
c1 = c2;
}
- for( i = 1; i <= 65536; i++ )
+ for( i = 1; i <= 65536; i++ ) {
ftab[ i ] += ftab[ i - 1 ];
+ }
c1 = block[ 1 ];
for( i = 0; i < last; i++ )
@@ -968,13 +1009,15 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
* Calculate the running order, from smallest to largest
* big bucket.
*/
- for( i = 0; i <= 255; i++ )
+ for( i = 0; i <= 255; i++ ) {
runningOrder[ i ] = i;
+ }
{
int vv;
int h = 1;
- do
+ do {
h = 3 * h + 1;
+ }
while( h <= 256 );
do
{
@@ -989,8 +1032,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
{
runningOrder[ j ] = runningOrder[ j - h ];
j = j - h;
- if( j <= ( h - 1 ) )
+ if( j <= ( h - 1 ) ) {
break;
+ }
}
runningOrder[ j ] = vv;
}
@@ -1026,8 +1070,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
{
qSort3( lo, hi, 2 );
numQSorted += ( hi - lo + 1 );
- if( workDone > workLimit && firstAttempt )
+ if( workDone > workLimit && firstAttempt ) {
return;
+ }
}
ftab[ sb ] |= SETMASK;
}
@@ -1049,28 +1094,32 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
int bbSize = ( ftab[ ( ss + 1 ) << 8 ] & CLEARMASK ) - bbStart;
int shifts = 0;
- while( ( bbSize >> shifts ) > 65534 )
+ while( ( bbSize >> shifts ) > 65534 ) {
shifts++;
+ }
for( j = 0; j < bbSize; j++ )
{
int a2update = zptr[ bbStart + j ];
int qVal = ( j >> shifts );
quadrant[ a2update ] = qVal;
- if( a2update < NUM_OVERSHOOT_BYTES )
+ if( a2update < NUM_OVERSHOOT_BYTES ) {
quadrant[ a2update + last + 1 ] = qVal;
+ }
}
- if( !( ( ( bbSize - 1 ) >> shifts ) <= 65535 ) )
+ if( !( ( ( bbSize - 1 ) >> shifts ) <= 65535 ) ) {
panic();
+ }
}
/*
* Now scan this big bucket so as to synthesise the
* sorted order for small buckets [t, ss] for all t != ss.
*/
- for( j = 0; j <= 255; j++ )
+ for( j = 0; j <= 255; j++ ) {
copy[ j ] = ftab[ ( j << 8 ) + ss ] & CLEARMASK;
+ }
for( j = ftab[ ss << 8 ] & CLEARMASK;
j < ( ftab[ ( ss + 1 ) << 8 ] & CLEARMASK ); j++ )
@@ -1083,8 +1132,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
}
}
- for( j = 0; j <= 255; j++ )
+ for( j = 0; j <= 255; j++ ) {
ftab[ ( j << 8 ) + ss ] |= SETMASK;
+ }
}
}
}
@@ -1093,13 +1143,14 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
{
int i;
nInUse = 0;
- for( i = 0; i < 256; i++ )
+ for( i = 0; i < 256; i++ ) {
if( inUse[ i ] )
{
seqToUnseq[ nInUse ] = (char)i;
unseqToSeq[ i ] = (char)nInUse;
nInUse++;
}
+ }
}
private char med3( char a, char b, char c )
@@ -1117,8 +1168,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
b = c;
c = t;
}
- if( a > b )
+ if( a > b ) {
b = a;
+ }
return b;
}
@@ -1144,8 +1196,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
int hi;
int d;
StackElem[] stack = new StackElem[ QSORT_STACK_SIZE ];
- for( int count = 0; count < QSORT_STACK_SIZE; count++ )
+ for( int count = 0; count < QSORT_STACK_SIZE; count++ ) {
stack[ count ] = new StackElem();
+ }
sp = 0;
@@ -1156,8 +1209,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
while( sp > 0 )
{
- if( sp >= QSORT_STACK_SIZE )
+ if( sp >= QSORT_STACK_SIZE ) {
panic();
+ }
sp--;
lo = stack[ sp ].ll;
@@ -1167,8 +1221,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
if( hi - lo < SMALL_THRESH || d > DEPTH_THRESH )
{
simpleSort( lo, hi, d );
- if( workDone > workLimit && firstAttempt )
+ if( workDone > workLimit && firstAttempt ) {
return;
+ }
continue;
}
@@ -1183,8 +1238,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
{
while( true )
{
- if( unLo > unHi )
+ if( unLo > unHi ) {
break;
+ }
n = ( (int)block[ zptr[ unLo ] + d + 1 ] ) - med;
if( n == 0 )
{
@@ -1197,14 +1253,16 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
continue;
}
;
- if( n > 0 )
+ if( n > 0 ) {
break;
+ }
unLo++;
}
while( true )
{
- if( unLo > unHi )
+ if( unLo > unHi ) {
break;
+ }
n = ( (int)block[ zptr[ unHi ] + d + 1 ] ) - med;
if( n == 0 )
{
@@ -1217,12 +1275,14 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
continue;
}
;
- if( n < 0 )
+ if( n < 0 ) {
break;
+ }
unHi--;
}
- if( unLo > unHi )
+ if( unLo > unHi ) {
break;
+ }
int temp = 0;
temp = zptr[ unLo ];
zptr[ unLo ] = zptr[ unHi ];
@@ -1270,8 +1330,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
int i;
int rNToGo = 0;
int rTPos = 0;
- for( i = 0; i < 256; i++ )
+ for( i = 0; i < 256; i++ ) {
inUse[ i ] = false;
+ }
for( i = 0; i <= last; i++ )
{
@@ -1279,8 +1340,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
{
rNToGo = (char)RAND_NUMS[ rTPos ];
rTPos++;
- if( rTPos == 512 )
+ if( rTPos == 512 ) {
rTPos = 0;
+ }
}
rNToGo--;
block[ i + 1 ] ^= ( ( rNToGo == 1 ) ? 1 : 0 );
@@ -1324,26 +1386,30 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
int nBytes;
alphaSize = nInUse + 2;
- for( t = 0; t < N_GROUPS; t++ )
- for( v = 0; v < alphaSize; v++ )
+ for( t = 0; t < N_GROUPS; t++ ) {
+ for( v = 0; v < alphaSize; v++ ) {
len[ t ][ v ] = (char)GREATER_ICOST;
+ }
+ }
/*
* Decide how many coding tables to use
*/
- if( nMTF <= 0 )
+ if( nMTF <= 0 ) {
panic();
+ }
- if( nMTF < 200 )
+ if( nMTF < 200 ) {
nGroups = 2;
- else if( nMTF < 600 )
+ } else if( nMTF < 600 ) {
nGroups = 3;
- else if( nMTF < 1200 )
+ } else if( nMTF < 1200 ) {
nGroups = 4;
- else if( nMTF < 2400 )
+ } else if( nMTF < 2400 ) {
nGroups = 5;
- else
+ } else {
nGroups = 6;
+ }
{
/*
* Generate an initial set of coding tables
@@ -1374,11 +1440,13 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
ge--;
}
- for( v = 0; v < alphaSize; v++ )
- if( v >= gs && v <= ge )
+ for( v = 0; v < alphaSize; v++ ) {
+ if( v >= gs && v <= ge ) {
len[ nPart - 1 ][ v ] = (char)LESSER_ICOST;
- else
+ } else {
len[ nPart - 1 ][ v ] = (char)GREATER_ICOST;
+ }
+ }
nPart--;
gs = ge + 1;
@@ -1394,12 +1462,15 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
*/
for( iter = 0; iter < N_ITERS; iter++ )
{
- for( t = 0; t < nGroups; t++ )
+ for( t = 0; t < nGroups; t++ ) {
fave[ t ] = 0;
+ }
- for( t = 0; t < nGroups; t++ )
- for( v = 0; v < alphaSize; v++ )
+ for( t = 0; t < nGroups; t++ ) {
+ for( v = 0; v < alphaSize; v++ ) {
rfreq[ t ][ v ] = 0;
+ }
+ }
nSelectors = 0;
totc = 0;
@@ -1410,18 +1481,21 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
/*
* Set group start & end marks.
*/
- if( gs >= nMTF )
+ if( gs >= nMTF ) {
break;
+ }
ge = gs + G_SIZE - 1;
- if( ge >= nMTF )
+ if( ge >= nMTF ) {
ge = nMTF - 1;
+ }
/*
* Calculate the cost of this group as coded
* by each of the coding tables.
*/
- for( t = 0; t < nGroups; t++ )
+ for( t = 0; t < nGroups; t++ ) {
cost[ t ] = 0;
+ }
if( nGroups == 6 )
{
@@ -1454,8 +1528,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
for( i = gs; i <= ge; i++ )
{
short icv = szptr[ i ];
- for( t = 0; t < nGroups; t++ )
+ for( t = 0; t < nGroups; t++ ) {
cost[ t ] += len[ t ][ icv ];
+ }
}
}
@@ -1465,12 +1540,13 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
*/
bc = 999999999;
bt = -1;
- for( t = 0; t < nGroups; t++ )
+ for( t = 0; t < nGroups; t++ ) {
if( cost[ t ] < bc )
{
bc = cost[ t ];
bt = t;
}
+ }
;
totc += bc;
fave[ bt ]++;
@@ -1480,8 +1556,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
/*
* Increment the symbol frequencies for the selected table.
*/
- for( i = gs; i <= ge; i++ )
+ for( i = gs; i <= ge; i++ ) {
rfreq[ bt ][ szptr[ i ] ]++;
+ }
gs = ge + 1;
}
@@ -1489,18 +1566,21 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
/*
* Recompute the tables based on the accumulated frequencies.
*/
- for( t = 0; t < nGroups; t++ )
+ for( t = 0; t < nGroups; t++ ) {
hbMakeCodeLengths( len[ t ], rfreq[ t ], alphaSize, 20 );
+ }
}
rfreq = null;
fave = null;
cost = null;
- if( !( nGroups < 8 ) )
+ if( !( nGroups < 8 ) ) {
panic();
- if( !( nSelectors < 32768 && nSelectors <= ( 2 + ( 900000 / G_SIZE ) ) ) )
+ }
+ if( !( nSelectors < 32768 && nSelectors <= ( 2 + ( 900000 / G_SIZE ) ) ) ) {
panic();
+ }
{
/*
* Compute MTF values for the selectors.
@@ -1509,8 +1589,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
char ll_i;
char tmp2;
char tmp;
- for( i = 0; i < nGroups; i++ )
+ for( i = 0; i < nGroups; i++ ) {
pos[ i ] = (char)i;
+ }
for( i = 0; i < nSelectors; i++ )
{
ll_i = selector[ i ];
@@ -1539,15 +1620,19 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
maxLen = 0;
for( i = 0; i < alphaSize; i++ )
{
- if( len[ t ][ i ] > maxLen )
+ if( len[ t ][ i ] > maxLen ) {
maxLen = len[ t ][ i ];
- if( len[ t ][ i ] < minLen )
+ }
+ if( len[ t ][ i ] < minLen ) {
minLen = len[ t ][ i ];
+ }
}
- if( maxLen > 20 )
+ if( maxLen > 20 ) {
panic();
- if( minLen < 1 )
+ }
+ if( minLen < 1 ) {
panic();
+ }
hbAssignCodes( code[ t ], len[ t ], minLen, maxLen, alphaSize );
}
{
@@ -1558,25 +1643,33 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
for( i = 0; i < 16; i++ )
{
inUse16[ i ] = false;
- for( j = 0; j < 16; j++ )
- if( inUse[ i * 16 + j ] )
+ for( j = 0; j < 16; j++ ) {
+ if( inUse[ i * 16 + j ] ) {
inUse16[ i ] = true;
+ }
+ }
}
nBytes = bytesOut;
- for( i = 0; i < 16; i++ )
- if( inUse16[ i ] )
+ for( i = 0; i < 16; i++ ) {
+ if( inUse16[ i ] ) {
bsW( 1, 1 );
- else
+ } else {
bsW( 1, 0 );
+ }
+ }
- for( i = 0; i < 16; i++ )
- if( inUse16[ i ] )
- for( j = 0; j < 16; j++ )
- if( inUse[ i * 16 + j ] )
+ for( i = 0; i < 16; i++ ) {
+ if( inUse16[ i ] ) {
+ for( j = 0; j < 16; j++ ) {
+ if( inUse[ i * 16 + j ] ) {
bsW( 1, 1 );
- else
+ } else {
bsW( 1, 0 );
+ }
+ }
+ }
+ }
}
@@ -1588,8 +1681,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
bsW( 15, nSelectors );
for( i = 0; i < nSelectors; i++ )
{
- for( j = 0; j < selectorMtf[ i ]; j++ )
+ for( j = 0; j < selectorMtf[ i ]; j++ ) {
bsW( 1, 1 );
+ }
bsW( 1, 0 );
}
@@ -1632,11 +1726,13 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
gs = 0;
while( true )
{
- if( gs >= nMTF )
+ if( gs >= nMTF ) {
break;
+ }
ge = gs + G_SIZE - 1;
- if( ge >= nMTF )
+ if( ge >= nMTF ) {
ge = nMTF - 1;
+ }
for( i = gs; i <= ge; i++ )
{
bsW( len[ selector[ selCtr ] ][ szptr[ i ] ],
@@ -1646,8 +1742,9 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
gs = ge + 1;
selCtr++;
}
- if( !( selCtr == nSelectors ) )
+ if( !( selCtr == nSelectors ) ) {
panic();
+ }
}
private void simpleSort( int lo, int hi, int d )
@@ -1660,12 +1757,14 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
int v;
bigN = hi - lo + 1;
- if( bigN < 2 )
+ if( bigN < 2 ) {
return;
+ }
hp = 0;
- while( incs[ hp ] < bigN )
+ while( incs[ hp ] < bigN ) {
hp++;
+ }
hp--;
for( ; hp >= 0; hp-- )
@@ -1678,16 +1777,18 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
/*
* copy 1
*/
- if( i > hi )
+ if( i > hi ) {
break;
+ }
v = zptr[ i ];
j = i;
while( fullGtU( zptr[ j - h ] + d, v + d ) )
{
zptr[ j ] = zptr[ j - h ];
j = j - h;
- if( j <= ( lo + h - 1 ) )
+ if( j <= ( lo + h - 1 ) ) {
break;
+ }
}
zptr[ j ] = v;
i++;
@@ -1695,16 +1796,18 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
/*
* copy 2
*/
- if( i > hi )
+ if( i > hi ) {
break;
+ }
v = zptr[ i ];
j = i;
while( fullGtU( zptr[ j - h ] + d, v + d ) )
{
zptr[ j ] = zptr[ j - h ];
j = j - h;
- if( j <= ( lo + h - 1 ) )
+ if( j <= ( lo + h - 1 ) ) {
break;
+ }
}
zptr[ j ] = v;
i++;
@@ -1712,22 +1815,25 @@ public class CBZip2OutputStream extends OutputStream implements BZip2Constants
/*
* copy 3
*/
- if( i > hi )
+ if( i > hi ) {
break;
+ }
v = zptr[ i ];
j = i;
while( fullGtU( zptr[ j - h ] + d, v + d ) )
{
zptr[ j ] = zptr[ j - h ];
j = j - h;
- if( j <= ( lo + h - 1 ) )
+ if( j <= ( lo + h - 1 ) ) {
break;
+ }
}
zptr[ j ] = v;
i++;
- if( workDone > workLimit && firstAttempt )
+ if( workDone > workLimit && firstAttempt ) {
return;
+ }
}
}
}
diff --git a/proposal/myrmidon/src/java/org/apache/aut/nativelib/Environment.java b/proposal/myrmidon/src/java/org/apache/aut/nativelib/Environment.java
index fe2cb02e3..cbe9c6804 100644
--- a/proposal/myrmidon/src/java/org/apache/aut/nativelib/Environment.java
+++ b/proposal/myrmidon/src/java/org/apache/aut/nativelib/Environment.java
@@ -28,12 +28,12 @@ import org.apache.tools.ant.taskdefs.exec.Execute;
*/
public final class Environment
{
- private static final String[] COMMAND_COM = new String[]{"command.com", "/c", "set"};
- private static final String[] CMD_EXE = new String[]{"cmd", "/c", "set"};
+ private final static String[] COMMAND_COM = new String[]{"command.com", "/c", "set"};
+ private final static String[] CMD_EXE = new String[]{"cmd", "/c", "set"};
// Alternatively one could use: /bin/sh -c env
- private static final String[] ENV_CMD = new String[]{"/usr/bin/env"};
- private static final String[] ENV_RAW = new String[]{"env"};
+ private final static String[] ENV_CMD = new String[]{"/usr/bin/env"};
+ private final static String[] ENV_RAW = new String[]{"env"};
private static Properties c_procEnvironment;
@@ -79,7 +79,7 @@ public final class Environment
* Get the Property object with all environment variables and
* attempt to load it if it has not already been loaded.
*/
- private synchronized static Properties getEnvironmentVariables()
+ private static synchronized Properties getEnvironmentVariables()
throws IOException, ExecException
{
if( null == c_procEnvironment )
diff --git a/proposal/myrmidon/src/java/org/apache/aut/nativelib/Os.java b/proposal/myrmidon/src/java/org/apache/aut/nativelib/Os.java
index 57aa867f2..12cc6fbe1 100644
--- a/proposal/myrmidon/src/java/org/apache/aut/nativelib/Os.java
+++ b/proposal/myrmidon/src/java/org/apache/aut/nativelib/Os.java
@@ -20,7 +20,7 @@ import org.apache.avalon.excalibur.i18n.Resources;
*/
public class Os
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( Os.class );
private final static String OS_NAME =
diff --git a/proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/LogOutputStream.java b/proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/LogOutputStream.java
index 76959b485..82d788118 100644
--- a/proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/LogOutputStream.java
+++ b/proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/LogOutputStream.java
@@ -11,7 +11,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.aut.nativelib.ExecOutputHandler;
-import org.apache.avalon.framework.logger.Logger;
+
/**
* Logs each line written to this stream to the specified
diff --git a/proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/ProcessMonitor.java b/proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/ProcessMonitor.java
index 6f0396fce..9e50cad4e 100644
--- a/proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/ProcessMonitor.java
+++ b/proposal/myrmidon/src/java/org/apache/aut/nativelib/impl/ProcessMonitor.java
@@ -32,13 +32,13 @@ class ProcessMonitor
private final static int SLEEP_TIME = 5;
//State to indicate process is still running
- private static final int STATE_RUNNING = 0;
+ private final static int STATE_RUNNING = 0;
//State to indicate process shutdown by itself
- private static final int STATE_STOPPED = 1;
+ private final static int STATE_STOPPED = 1;
//State to indicate process was terminated due to timeout
- private static final int STATE_TERMINATED = 2;
+ private final static int STATE_TERMINATED = 2;
/**
* The state of the process monitor and thus
@@ -244,7 +244,9 @@ class ProcessMonitor
try
{
final int available = input.available();
- if( 0 >= available ) return;
+ if( 0 >= available ) {
+ return;
+ }
final byte[] data = new byte[ available ];
final int read = input.read( data );
diff --git a/proposal/myrmidon/src/java/org/apache/aut/nativelib/launchers/DefaultCommandLauncher.java b/proposal/myrmidon/src/java/org/apache/aut/nativelib/launchers/DefaultCommandLauncher.java
index 91df732e7..97c1e9027 100644
--- a/proposal/myrmidon/src/java/org/apache/aut/nativelib/launchers/DefaultCommandLauncher.java
+++ b/proposal/myrmidon/src/java/org/apache/aut/nativelib/launchers/DefaultCommandLauncher.java
@@ -11,11 +11,11 @@ import java.io.File;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.util.Properties;
+
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.aut.nativelib.CommandLauncher;
-import org.apache.aut.nativelib.Environment;
+
import org.apache.aut.nativelib.ExecException;
import org.apache.aut.nativelib.ExecMetaData;
@@ -31,10 +31,10 @@ import org.apache.aut.nativelib.ExecMetaData;
public class DefaultCommandLauncher
implements CommandLauncher
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultCommandLauncher.class );
- private static final Method c_execWithCWD;
+ private final static Method c_execWithCWD;
static
{
diff --git a/proposal/myrmidon/src/java/org/apache/aut/nativelib/launchers/ExecUtil.java b/proposal/myrmidon/src/java/org/apache/aut/nativelib/launchers/ExecUtil.java
index 5c2f83a5d..6c68d951b 100644
--- a/proposal/myrmidon/src/java/org/apache/aut/nativelib/launchers/ExecUtil.java
+++ b/proposal/myrmidon/src/java/org/apache/aut/nativelib/launchers/ExecUtil.java
@@ -27,7 +27,7 @@ class ExecUtil
/**
* The file representing the current working directory.
*/
- private static final File c_cwd;
+ private final static File c_cwd;
static
{
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java
index 371104d8e..0e58586eb 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/aspect/DefaultAspectManager.java
@@ -28,7 +28,7 @@ import org.apache.myrmidon.interfaces.aspect.AspectManager;
public class DefaultAspectManager
implements AspectManager, Initializable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultAspectManager.class );
private HashMap m_aspectMap = new HashMap();
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/ATIProjectBuilder.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/ATIProjectBuilder.java
index 99afde003..4e646f55c 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/ATIProjectBuilder.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/ATIProjectBuilder.java
@@ -33,7 +33,7 @@ public class ATIProjectBuilder
extends DefaultProjectBuilder
implements Parameterizable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( ATIProjectBuilder.class );
private Parameters m_parameters;
@@ -74,11 +74,11 @@ public class ATIProjectBuilder
final String target = reactorHandler.getTarget( i );
final String data = reactorHandler.getData( i );
- if( target.equals( "xsl-param" ) )
+ if( target.equals( "xsl-param" ) ) {
handleParameter( data );
- else if( target.equals( "xsl-params" ) )
+ } else if( target.equals( "xsl-params" ) ) {
handleParameters( data, sourceID );
- else if( target.equals( "xsl-stylesheet" ) )
+ } else if( target.equals( "xsl-stylesheet" ) )
{
if( null != transformer )
{
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java
index b3dee48ba..cdafc132e 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/builder/DefaultProjectBuilder.java
@@ -17,7 +17,7 @@ import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
import org.apache.avalon.excalibur.util.StringUtil;
import org.apache.avalon.framework.CascadingException;
-import org.apache.avalon.framework.ExceptionUtil;
+
import org.apache.avalon.framework.Version;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
@@ -40,7 +40,7 @@ public class DefaultProjectBuilder
extends AbstractLogEnabled
implements ProjectBuilder
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultProjectBuilder.class );
private final static Version VERSION = new Version( 2, 0, 0 );
@@ -263,9 +263,9 @@ public class DefaultProjectBuilder
}
}
- if( name.equals( "target" ) )
+ if( name.equals( "target" ) ) {
buildTarget( project, element );
- else
+ } else
{
final String message =
REZ.getString( "ant.unknown-toplevel-element.error", name, element.getLocation() );
@@ -456,9 +456,10 @@ public class DefaultProjectBuilder
protected boolean validName( final String name )
{
- if( -1 != name.indexOf( "->" ) )
+ if( -1 != name.indexOf( "->" ) ) {
return false;
- else
+ } else {
return true;
+ }
}
}
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
index e3661c00f..e74989820 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
@@ -34,7 +34,7 @@ public class DefaultConfigurer
extends AbstractLogEnabled
implements Configurer, Composable, LogEnabled
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultConfigurer.class );
///Compile time constant to turn on extreme debugging
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java
index 75b571233..c4cf8306d 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java
@@ -13,7 +13,14 @@ import org.apache.avalon.framework.configuration.ConfigurationException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.util.*;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collection;
/**
* An object configurer which uses reflection to determine the properties
@@ -25,7 +32,7 @@ import java.util.*;
public class DefaultObjectConfigurer
implements ObjectConfigurer
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultObjectConfigurer.class );
private final Class m_class;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultPropertyConfigurer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultPropertyConfigurer.java
index 92d0275f2..55e44bcee 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultPropertyConfigurer.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultPropertyConfigurer.java
@@ -24,7 +24,7 @@ import java.lang.reflect.Method;
class DefaultPropertyConfigurer
implements PropertyConfigurer
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultPropertyConfigurer.class );
private final Class m_type;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultConverterRegistry.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultConverterRegistry.java
index 2e7c2d201..b14bfd12f 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultConverterRegistry.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultConverterRegistry.java
@@ -23,7 +23,9 @@ public class DefaultConverterRegistry
public String getConverterName( final String source, final String destination )
{
final HashMap map = (HashMap)m_mapping.get( source );
- if( null == map ) return null;
+ if( null == map ) {
+ return null;
+ }
return (String)map.get( destination );
}
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultMasterConverter.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultMasterConverter.java
index 10b9792b4..6c1ef5b51 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultMasterConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/converter/DefaultMasterConverter.java
@@ -31,7 +31,7 @@ public class DefaultMasterConverter
extends AbstractLogEnabled
implements MasterConverter, Composable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultMasterConverter.class );
private final static boolean DEBUG = false;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultDeployer.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultDeployer.java
index 6bbe8b2d5..c1de6abbd 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultDeployer.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/DefaultDeployer.java
@@ -51,7 +51,7 @@ public class DefaultDeployer
extends AbstractLogEnabled
implements Deployer, Initializable, Composable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultDeployer.class );
private final static String TYPE_DESCRIPTOR = "META-INF/ant-types.xml";
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/Deployment.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/Deployment.java
index f2616f2b8..70c6f0d5c 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/Deployment.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/deployer/Deployment.java
@@ -28,7 +28,7 @@ import org.xml.sax.XMLReader;
*/
public class Deployment
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( Deployment.class );
public final static String DESCRIPTOR_NAME = "META-INF/ant-descriptor.xml";
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
index c39a44d76..28119c077 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/embeddor/DefaultEmbeddor.java
@@ -46,7 +46,7 @@ public class DefaultEmbeddor
extends AbstractLogEnabled
implements Embeddor
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultEmbeddor.class );
private Deployer m_deployer;
@@ -499,7 +499,9 @@ public class DefaultEmbeddor
final String filename = files[ i ].getName();
int index = filename.lastIndexOf( '.' );
- if( -1 == index ) index = filename.length();
+ if( -1 == index ) {
+ index = filename.length();
+ }
final String name = filename.substring( 0, index );
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java
index c45c6483b..d6643efc0 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/AspectAwareExecutor.java
@@ -26,7 +26,7 @@ import org.apache.myrmidon.interfaces.executor.ExecutionFrame;
public class AspectAwareExecutor
extends DefaultExecutor
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( AspectAwareExecutor.class );
private final static Configuration[] EMPTY_ELEMENTS = new Configuration[ 0 ];
@@ -139,12 +139,14 @@ public class AspectAwareExecutor
final ArrayList elementList = (ArrayList)elementMap.remove( names[ i ] );
Parameters parameters = (Parameters)parameterMap.remove( names[ i ] );
- if( null == parameters ) parameters = Parameters.EMPTY_PARAMETERS;
+ if( null == parameters ) {
+ parameters = Parameters.EMPTY_PARAMETERS;
+ }
Configuration[] elements = null;
- if( null == elementList )
+ if( null == elementList ) {
elements = EMPTY_ELEMENTS;
- else
+ } else
{
elements = (Configuration[])elementList.toArray( EMPTY_ELEMENTS );
}
@@ -170,9 +172,9 @@ public class AspectAwareExecutor
Configuration[] elements = null;
- if( null == elementList )
+ if( null == elementList ) {
elements = EMPTY_ELEMENTS;
- else
+ } else
{
elements = (Configuration[])elementList.toArray( EMPTY_ELEMENTS );
}
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
index bcbee56fc..537bd6256 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/executor/DefaultExecutor.java
@@ -30,7 +30,7 @@ public class DefaultExecutor
extends AbstractLogEnabled
implements Executor, Composable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultExecutor.class );
private Configurer m_configurer;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultProject.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultProject.java
index 515118566..709004ac5 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultProject.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultProject.java
@@ -24,7 +24,7 @@ import org.apache.myrmidon.interfaces.model.TypeLib;
public class DefaultProject
implements Project
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultProject.class );
///The imports
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/role/DefaultRoleManager.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/role/DefaultRoleManager.java
index 9f8fb2495..f6b46326f 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/role/DefaultRoleManager.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/role/DefaultRoleManager.java
@@ -30,7 +30,7 @@ import org.xml.sax.XMLReader;
public class DefaultRoleManager
implements RoleManager, Initializable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultRoleManager.class );
private final static String ROLE_DESCRIPTOR = "META-INF/ant-roles.xml";
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java
index 0800a9707..94021dc74 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java
@@ -22,7 +22,7 @@ import org.apache.myrmidon.interfaces.type.TypeManager;
public class DefaultTypeManager
implements TypeManager
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultTypeManager.class );
///Parent type manager to inherit values from.
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java
index f0e5cd2e2..3bd9cae9c 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/MultiSourceTypeFactory.java
@@ -21,7 +21,7 @@ import org.apache.myrmidon.interfaces.type.TypeFactory;
public class MultiSourceTypeFactory
implements TypeFactory
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( MultiSourceTypeFactory.class );
///Parent Selector
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
index c79d47239..977a9a071 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultTaskContext.java
@@ -28,7 +28,7 @@ public class DefaultTaskContext
extends DefaultContext
implements TaskContext
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultTaskContext.class );
/**
@@ -178,9 +178,9 @@ public class DefaultTaskContext
{
checkPropertyValid( name, value );
- if( CURRENT == scope )
+ if( CURRENT == scope ) {
put( name, value );
- else if( PARENT == scope )
+ } else if( PARENT == scope )
{
if( null == getParent() )
{
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
index 101c04c43..cb291d7b7 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/DefaultWorkspace.java
@@ -52,7 +52,7 @@ public class DefaultWorkspace
extends AbstractLogEnabled
implements Workspace, Composable, Parameterizable, Initializable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultWorkspace.class );
private Executor m_executor;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/ProjectListenerSupport.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/ProjectListenerSupport.java
index ada36ef3d..03b3f7ecb 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/ProjectListenerSupport.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/workspace/ProjectListenerSupport.java
@@ -50,7 +50,9 @@ public class ProjectListenerSupport
}
}
- if( -1 == found ) return;
+ if( -1 == found ) {
+ return;
+ }
final ProjectListener[] listeners = new ProjectListener[ m_listeners.length - 1 ];
System.arraycopy( m_listeners, 0, listeners, 0, found );
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/converter/AbstractConverter.java b/proposal/myrmidon/src/java/org/apache/myrmidon/converter/AbstractConverter.java
index 2ff97b877..3e79c7cac 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/converter/AbstractConverter.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/converter/AbstractConverter.java
@@ -19,7 +19,7 @@ import org.apache.avalon.framework.context.Context;
public abstract class AbstractConverter
implements Converter
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( AbstractConverter.class );
private final Class m_source;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java
index 321d3ce02..c51b4a303 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java
@@ -9,14 +9,14 @@ package org.apache.myrmidon.framework;
import org.apache.avalon.excalibur.i18n.ResourceManager;
import org.apache.avalon.excalibur.i18n.Resources;
-import org.apache.avalon.excalibur.property.PropertyException;
-import org.apache.avalon.excalibur.property.PropertyUtil;
+
+
import org.apache.avalon.framework.component.ComponentException;
import org.apache.avalon.framework.component.ComponentManager;
import org.apache.avalon.framework.component.Composable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.context.Context;
+
import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.converter.Converter;
import org.apache.myrmidon.converter.ConverterException;
@@ -33,7 +33,7 @@ public abstract class AbstractContainerTask
extends AbstractTask
implements Composable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( AbstractContainerTask.class );
///For converting own attributes
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractTypeDef.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractTypeDef.java
index a695b26cf..d58414213 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractTypeDef.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/AbstractTypeDef.java
@@ -33,7 +33,7 @@ public abstract class AbstractTypeDef
extends AbstractTask
implements Composable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( AbstractTypeDef.class );
private File m_lib;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Condition.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Condition.java
index ba55a2dfa..dbcfe57cd 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Condition.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Condition.java
@@ -23,7 +23,7 @@ import org.apache.avalon.framework.context.ContextException;
public class Condition
implements Component
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( Condition.class );
private String m_condition;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/LogLevel.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/LogLevel.java
index 37c4e81c6..504b19191 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/LogLevel.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/LogLevel.java
@@ -22,7 +22,7 @@ public final class LogLevel
extends Enum
{
//Map for all the levels
- private static final HashMap c_levels = new HashMap();
+ private final static HashMap c_levels = new HashMap();
//standard enums for version of JVM
public final static LogLevel FATAL_ERROR = new LogLevel( "fatalError" );
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Pattern.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Pattern.java
index cc6a5a98f..1f96fb0f8 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Pattern.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/Pattern.java
@@ -19,7 +19,7 @@ import org.apache.myrmidon.api.TaskException;
public class Pattern
implements DataType
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( Pattern.class );
private String m_value;
@@ -85,7 +85,9 @@ public class Pattern
public String toString()
{
String result = "Pattern['" + m_value + "',";
- if( null != m_condition ) result = result + m_condition;
+ if( null != m_condition ) {
+ result = result + m_condition;
+ }
return result + "]";
}
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java
index 393ca5e7a..01ea31d7f 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/framework/TypeInstanceTask.java
@@ -30,7 +30,7 @@ public class TypeInstanceTask
extends AbstractContainerTask
implements Configurable
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( TypeInstanceTask.class );
private String m_id;
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java b/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java
index 4d2b49731..81ea947a1 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/frontends/CLIMain.java
@@ -50,28 +50,28 @@ import org.apache.myrmidon.listeners.ProjectListener;
public class CLIMain
extends AbstractLogEnabled
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( CLIMain.class );
- private static final String PATTERN = "[%8.8{category}] %{message}\\n%{throwable}";
+ private final static String PATTERN = "[%8.8{category}] %{message}\\n%{throwable}";
//defines for the Command Line options
- private static final int HELP_OPT = 'h';
- private static final int QUIET_OPT = 'q';
- private static final int VERBOSE_OPT = 'v';
- private static final int FILE_OPT = 'f';
- private static final int LOG_LEVEL_OPT = 'l';
- private static final int DEFINE_OPT = 'D';
- private static final int BUILDER_PARAM_OPT = 'B';
- private static final int VERSION_OPT = 1;
- private static final int LISTENER_OPT = 2;
- private static final int TASKLIB_DIR_OPT = 5;
- private static final int INCREMENTAL_OPT = 6;
- private static final int HOME_DIR_OPT = 7;
- private static final int DRY_RUN_OPT = 8;
+ private final static int HELP_OPT = 'h';
+ private final static int QUIET_OPT = 'q';
+ private final static int VERBOSE_OPT = 'v';
+ private final static int FILE_OPT = 'f';
+ private final static int LOG_LEVEL_OPT = 'l';
+ private final static int DEFINE_OPT = 'D';
+ private final static int BUILDER_PARAM_OPT = 'B';
+ private final static int VERSION_OPT = 1;
+ private final static int LISTENER_OPT = 2;
+ private final static int TASKLIB_DIR_OPT = 5;
+ private final static int INCREMENTAL_OPT = 6;
+ private final static int HOME_DIR_OPT = 7;
+ private final static int DRY_RUN_OPT = 8;
//incompatable options for info options
- private static final int[] INFO_OPT_INCOMPAT = new int[]
+ private final static int[] INFO_OPT_INCOMPAT = new int[]
{
HELP_OPT, QUIET_OPT, VERBOSE_OPT, FILE_OPT,
LOG_LEVEL_OPT, VERSION_OPT, LISTENER_OPT,
@@ -79,7 +79,7 @@ public class CLIMain
};
//incompatable options for other logging options
- private static final int[] LOG_OPT_INCOMPAT = new int[]
+ private final static int[] LOG_OPT_INCOMPAT = new int[]
{
QUIET_OPT, VERBOSE_OPT, LOG_LEVEL_OPT
};
@@ -383,7 +383,9 @@ public class CLIMain
doBuild( workspace, project, m_targets );
- if( !incremental ) break;
+ if( !incremental ) {
+ break;
+ }
final String message = REZ.getString( "repeat.notice" );
System.out.println( message );
@@ -395,7 +397,9 @@ public class CLIMain
String line = reader.readLine();
- if( line.equalsIgnoreCase( "no" ) ) break;
+ if( line.equalsIgnoreCase( "no" ) ) {
+ break;
+ }
}
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/type/DefaultTypeFactory.java b/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/type/DefaultTypeFactory.java
index 8ba278ffc..7fcd52490 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/type/DefaultTypeFactory.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/interfaces/type/DefaultTypeFactory.java
@@ -22,7 +22,7 @@ import org.apache.avalon.excalibur.i18n.Resources;
public class DefaultTypeFactory
implements TypeFactory
{
- private static final Resources REZ =
+ private final static Resources REZ =
ResourceManager.getPackageResources( DefaultTypeFactory.class );
///A Map of shortnames to classnames
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java b/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java
index ce8ba6298..49f334bf6 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/launcher/Main.java
@@ -28,7 +28,7 @@ public final class Main
* @param args the CLI arguments
* @exception Exception if an error occurs
*/
- public final static void main( final String[] args )
+ public static final void main( final String[] args )
throws Exception
{
try
@@ -69,7 +69,7 @@ public final class Main
}
}
- private final static URL[] buildURLList( final File dir )
+ private static final URL[] buildURLList( final File dir )
throws Exception
{
final ArrayList urlList = new ArrayList();
@@ -109,7 +109,7 @@ public final class Main
/**
* Finds the myrmidon.jar file in the classpath.
*/
- private final static File findInstallDir()
+ private static final File findInstallDir()
throws Exception
{
final String classpath = System.getProperty( "java.class.path" );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java b/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java
index 386654837..d2e86f2f9 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java
@@ -96,8 +96,9 @@ public class Project
*/
public String getProperty( String name )
{
- if( name == null )
+ if( name == null ) {
return null;
+ }
String property = (String)properties.get( name );
return property;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
index 0821f0ecd..eeab86340 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
@@ -13,7 +13,7 @@ import java.net.URLClassLoader;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.condition.Condition;
-import org.apache.tools.ant.types.EnumeratedAttribute;
+
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java
index ee9687cc9..330e797c0 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java
@@ -239,8 +239,9 @@ public class Get extends Task
if( is == null )
{
getLogger().info( "Can't get " + source + " to " + dest );
- if( ignoreErrors )
+ if( ignoreErrors ) {
return;
+ }
throw new TaskException( "Can't get " + source + " to " + dest );
}
@@ -250,11 +251,13 @@ public class Get extends Task
while( ( length = is.read( buffer ) ) >= 0 )
{
fos.write( buffer, 0, length );
- if( verbose )
+ if( verbose ) {
System.out.print( "." );
+ }
}
- if( verbose )
+ if( verbose ) {
System.out.println();
+ }
fos.close();
is.close();
@@ -279,8 +282,9 @@ public class Get extends Task
catch( IOException ioe )
{
getLogger().info( "Error getting " + source + " to " + dest );
- if( ignoreErrors )
+ if( ignoreErrors ) {
return;
+ }
throw new TaskException( "Error", ioe );
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
index cf74c16d5..2b88decdd 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
@@ -13,7 +13,7 @@ import java.io.PrintStream;
import java.util.ArrayList;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.AbstractTask;
-import org.apache.tools.ant.Task;
+
import org.apache.tools.ant.taskdefs.exec.Execute2;
import org.apache.tools.ant.types.Argument;
import org.apache.tools.ant.types.CommandlineJava;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
index 335aad0fd..f1b636cdb 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
@@ -149,8 +149,9 @@ public class PathConvert extends Task
elem = elem.replace( fromDirSep, toDirSep );
- if( i != 0 )
+ if( i != 0 ) {
rslt.append( m_pathSep );
+ }
rslt.append( elem );
}
@@ -209,16 +210,19 @@ public class PathConvert extends Task
throws TaskException
{
- if( m_path == null )
+ if( m_path == null ) {
throw new TaskException( "You must specify a path to convert" );
+ }
- if( m_property == null )
+ if( m_property == null ) {
throw new TaskException( "You must specify a property" );
+ }
// Must either have a target OS or both a dirSep and pathSep
- if( m_targetOS == null && m_pathSep == null && m_dirSep == null )
+ if( m_targetOS == null && m_pathSep == null && m_dirSep == null ) {
throw new TaskException( "You must specify at least one of targetOS, dirSep, or pathSep" );
+ }
// Determine the separator strings. The dirsep and pathsep attributes
// override the targetOS settings.
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
index 4b58e56bc..9efde1607 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
@@ -79,8 +79,9 @@ public class Property
setProperty( m_name, m_value );
}
- if( m_resource != null )
+ if( m_resource != null ) {
loadResource( m_resource );
+ }
}
private void validate() throws TaskException
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
index 2833b3509..12431fd8c 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
@@ -468,8 +468,9 @@ public class SQLExec
throw new SQLException( "No suitable Driver for " + url );
}
- if( !isValidRdbms( conn ) )
+ if( !isValidRdbms( conn ) ) {
return;
+ }
conn.setAutoCommit( autocommit );
@@ -563,8 +564,9 @@ public class SQLExec
*/
protected boolean isValidRdbms( Connection conn )
{
- if( rdbms == null && version == null )
+ if( rdbms == null && version == null ) {
return true;
+ }
try
{
@@ -617,8 +619,9 @@ public class SQLExec
throws SQLException
{
// Check and ignore empty statements
- if( "".equals( sql.trim() ) )
+ if( "".equals( sql.trim() ) ) {
return;
+ }
try
{
@@ -647,8 +650,9 @@ public class SQLExec
catch( SQLException e )
{
getLogger().error( "Failed to execute: " + sql );
- if( !onError.equals( "continue" ) )
+ if( !onError.equals( "continue" ) ) {
throw e;
+ }
getLogger().error( e.toString() );
}
}
@@ -726,10 +730,12 @@ public class SQLExec
{
line = line.trim();
line = "" + resolveValue( line );
- if( line.startsWith( "//" ) )
+ if( line.startsWith( "//" ) ) {
continue;
- if( line.startsWith( "--" ) )
+ }
+ if( line.startsWith( "--" ) ) {
continue;
+ }
StringTokenizer st = new StringTokenizer( line );
if( st.hasMoreTokens() )
{
@@ -746,8 +752,9 @@ public class SQLExec
// SQL defines "--" as a comment to EOL
// and in Oracle it may contain a hint
// so we cannot just remove it, instead we must end it
- if( line.indexOf( "--" ) >= 0 )
+ if( line.indexOf( "--" ) >= 0 ) {
sql += "\n";
+ }
if( delimiterType.equals( DelimiterType.NORMAL ) && sql.endsWith( delimiter ) ||
delimiterType.equals( DelimiterType.ROW ) && line.equals( delimiter ) )
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java
index 6a9ac6451..8115512a1 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java
@@ -14,9 +14,9 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.types.DirectoryScanner;
-import org.apache.tools.ant.types.EnumeratedAttribute;
-import org.apache.tools.ant.types.FileSet;
+
+
+
import org.apache.tools.ant.util.mappers.MergingMapper;
import org.apache.tools.ant.types.SourceFileScanner;
import org.apache.aut.tar.TarConstants;
@@ -304,8 +304,9 @@ public class Tar
}
finally
{
- if( input != null )
+ if( input != null ) {
input.close();
+ }
}
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
index 6c3c2b8bb..542b55c72 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
@@ -119,8 +119,9 @@ public class UpToDate extends MatchingTask implements Condition
}
// if not there then it can't be up to date
- if( _targetFile != null && !_targetFile.exists() )
+ if( _targetFile != null && !_targetFile.exists() ) {
return false;
+ }
Iterator enum = sourceFileSets.iterator();
boolean upToDate = true;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
index cae863172..0c4307d43 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
@@ -349,8 +349,9 @@ public class Zip
// before we added any files, then we must swallow this exception. Otherwise,
// the error that's reported will be the close() error, which is not the real
// cause of the problem.
- if( success )
+ if( success ) {
throw ex;
+ }
}
}
}
@@ -455,8 +456,9 @@ public class Zip
}
}
- if( !zipFile.exists() )
+ if( !zipFile.exists() ) {
return false;
+ }
final SourceFileScanner scanner = new SourceFileScanner();
setupLogger( scanner );
@@ -490,15 +492,17 @@ public class Zip
String prefix, String fullpath )
throws IOException, TaskException
{
- if( prefix.length() > 0 && fullpath.length() > 0 )
+ if( prefix.length() > 0 && fullpath.length() > 0 ) {
throw new TaskException( "Both prefix and fullpath attributes may not be set on the same fileset." );
+ }
File thisBaseDir = scanner.getBasedir();
// directories that matched include patterns
String[] dirs = scanner.getIncludedDirectories();
- if( dirs.length > 0 && fullpath.length() > 0 )
+ if( dirs.length > 0 && fullpath.length() > 0 ) {
throw new TaskException( "fullpath attribute may only be specified for filesets that specify a single file." );
+ }
for( int i = 0; i < dirs.length; i++ )
{
if( "".equals( dirs[ i ] ) )
@@ -515,8 +519,9 @@ public class Zip
// files that matched include patterns
String[] files = scanner.getIncludedFiles();
- if( files.length > 1 && fullpath.length() > 0 )
+ if( files.length > 1 && fullpath.length() > 0 ) {
throw new TaskException( "fullpath attribute may only be specified for filesets that specify a single file." );
+ }
for( int i = 0; i < files.length; i++ )
{
File f = new File( thisBaseDir, files[ i ] );
@@ -643,8 +648,9 @@ public class Zip
ZipOutputStream zOut, String prefix, String fullpath )
throws IOException, TaskException
{
- if( prefix.length() > 0 && fullpath.length() > 0 )
+ if( prefix.length() > 0 && fullpath.length() > 0 ) {
throw new TaskException( "Both prefix and fullpath attributes may not be set on the same fileset." );
+ }
ZipScanner zipScanner = (ZipScanner)ds;
File zipSrc = fs.getSrc();
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java
index 360925e8c..f1e9b5a14 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java
@@ -83,8 +83,9 @@ public class Jikes
Commandline cmd = new Commandline();
cmd.setExecutable( "jikes" );
- if( m_deprecation == true )
+ if( m_deprecation == true ) {
cmd.addArgument( "-deprecation" );
+ }
if( m_destDir != null )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecTask.java
index d66df6ca1..25544b17a 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecTask.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecTask.java
@@ -313,10 +313,12 @@ public class ExecTask
{
try
{
- if( m_ouput != null )
+ if( m_ouput != null ) {
m_ouput.close();
- if( m_byteArrayOutput != null )
+ }
+ if( m_byteArrayOutput != null ) {
m_byteArrayOutput.close();
+ }
}
catch( IOException io )
{
@@ -344,7 +346,9 @@ public class ExecTask
throws TaskException
{
// default directory to the project's base directory
- if( m_workingDirectory == null ) m_workingDirectory = getBaseDirectory();
+ if( m_workingDirectory == null ) {
+ m_workingDirectory = getBaseDirectory();
+ }
// show the command
getLogger().debug( m_command.toString() );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java
index fa41dbb9a..cd693ae0c 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java
@@ -50,8 +50,9 @@ public class Move
throws TaskException
{
String[] list = d.list();
- if( list == null )
- return;// on an io error list() can return null
+ if( list == null ) {
+ return;
+ }// on an io error list() can return null
for( int i = 0; i < list.length; i++ )
{
@@ -224,8 +225,9 @@ public class Move
protected boolean okToDelete( File d )
{
String[] list = d.list();
- if( list == null )
- return false;// maybe io error?
+ if( list == null ) {
+ return false;
+ }// maybe io error?
for( int i = 0; i < list.length; i++ )
{
@@ -233,8 +235,9 @@ public class Move
File f = new File( d, s );
if( f.isDirectory() )
{
- if( !okToDelete( f ) )
+ if( !okToDelete( f ) ) {
return false;
+ }
}
else
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
index de9f2e923..500a2130e 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
@@ -571,10 +571,12 @@ public class Javadoc
cmd.addArgument( "-classpath" );
cmd.addArgument( classpath.toString() );
- if( m_version && m_doclet == null )
+ if( m_version && m_doclet == null ) {
cmd.addArgument( "-version" );
- if( m_author && m_doclet == null )
+ }
+ if( m_author && m_doclet == null ) {
cmd.addArgument( "-author" );
+ }
if( m_doclet == null )
{
@@ -932,8 +934,9 @@ public class Javadoc
ArrayList addedPackages = new ArrayList();
String[] list = sourcePath.list();
- if( list == null )
+ if( list == null ) {
list = new String[ 0 ];
+ }
FileSet fs = new FileSet();
fs.setDefaultexcludes( m_useDefaultExcludes );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
index 45ccaf345..8c1832f82 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
@@ -195,8 +195,9 @@ public class Cab
{
String file = files.get( i ).toString();
if( new File( m_baseDir, file ).lastModified() >
- m_cabFile.lastModified() )
+ m_cabFile.lastModified() ) {
upToDate = false;
+ }
}
return upToDate;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Entry.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Entry.java
index 138e3d928..463592b64 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Entry.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Entry.java
@@ -159,8 +159,9 @@ public class Entry
GregorianCalendar value = new GregorianCalendar();
GregorianCalendar newValue = new GregorianCalendar();
- if( m_pattern == null )
+ if( m_pattern == null ) {
m_pattern = "yyyy/MM/dd HH:mm";
+ }
DateFormat fmt = new SimpleDateFormat( m_pattern );
// special case
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
index fefee9c6c..bfa2cb542 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
@@ -12,7 +12,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.StringTokenizer;
import org.apache.avalon.excalibur.util.StringUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.tools.ant.types.Commandline;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
index 2fc6ac992..af0e27683 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
@@ -89,8 +89,9 @@ public class ManifestFile extends Task
throws TaskException
{
checkParameters();
- if( isUpdate( currentMethod ) )
+ if( isUpdate( currentMethod ) ) {
readFile();
+ }
executeOperation();
writeFile();
@@ -202,8 +203,9 @@ public class ManifestFile extends Task
{
stop = true;
}
- else
+ else {
buffer.append( (char)c );
+ }
}
fis.close();
StringTokenizer lineTokens = getLineTokens( buffer );
@@ -315,8 +317,9 @@ public class ManifestFile extends Task
Entry ent = new Entry();
boolean result = false;
int res = ent.compare( this, (Entry)obj );
- if( res == 0 )
+ if( res == 0 ) {
result = true;
+ }
return result;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
index 1b8bc9577..0d5368b07 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
@@ -169,8 +169,9 @@ public class NetRexxC extends MatchingTask
public void setCompile( boolean compile )
{
this.compile = compile;
- if( !this.compile && !this.keep )
+ if( !this.compile && !this.keep ) {
this.keep = true;
+ }
}
/**
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
index c99a4452b..ca7052b13 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
@@ -46,8 +46,9 @@ public class Script extends Task
public void setSrc( String fileName )
{
File file = new File( fileName );
- if( !file.exists() )
+ if( !file.exists() ) {
throw new TaskException( "file " + fileName + " not found." );
+ }
int count = (int)file.length();
byte data[] = new byte[ count ];
@@ -139,11 +140,13 @@ public class Script extends Task
boolean isValid = key.length() > 0 &&
Character.isJavaIdentifierStart( key.charAt( 0 ) );
- for( int i = 1; isValid && i < key.length(); i++ )
+ for( int i = 1; isValid && i < key.length(); i++ ) {
isValid = Character.isJavaIdentifierPart( key.charAt( i ) );
+ }
- if( isValid )
+ if( isValid ) {
beans.put( key, dictionary.get( key ) );
+ }
}
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
index 83329ead1..af5447d46 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
@@ -420,8 +420,9 @@ public class CSharp
throws TaskException
{
//demand create pathlist
- if( _referenceFiles == null )
+ if( _referenceFiles == null ) {
_referenceFiles = new Path();
+ }
_referenceFiles.append( path );
}
@@ -461,8 +462,9 @@ public class CSharp
{
_targetType = targetType;
}
- else
+ else {
throw new TaskException( "targetType " + targetType + " is not a valid type" );
+ }
}
/**
@@ -648,7 +650,9 @@ public class CSharp
public void execute()
throws TaskException
{
- if( _srcDir == null ) _srcDir = getBaseDirectory();
+ if( _srcDir == null ) {
+ _srcDir = getBaseDirectory();
+ }
NetCommand command = new NetCommand( this, "CSC", csc_exe_name );
command.setFailOnError( getFailFailOnError() );
@@ -706,10 +710,11 @@ public class CSharp
*/
protected String getAdditionalModulesParameter()
{
- if( notEmpty( _additionalModules ) )
+ if( notEmpty( _additionalModules ) ) {
return "/addmodule:" + _additionalModules;
- else
+ } else {
return null;
+ }
}
/**
@@ -735,8 +740,9 @@ public class CSharp
s.append( DEFAULT_REFERENCE_LIST );
return new String( s );
}
- else
+ else {
return null;
+ }
}
/**
@@ -746,10 +752,11 @@ public class CSharp
*/
protected String getDefinitionsParameter()
{
- if( notEmpty( _definitions ) )
+ if( notEmpty( _definitions ) ) {
return "/define:" + _definitions;
- else
+ } else {
return null;
+ }
}
/**
@@ -759,10 +766,11 @@ public class CSharp
*/
protected String getDocFileParameter()
{
- if( _docFile != null )
+ if( _docFile != null ) {
return "/doc:" + _docFile.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -772,10 +780,11 @@ public class CSharp
*/
protected String getExtraOptionsParameter()
{
- if( _extraOptions != null && _extraOptions.length() != 0 )
+ if( _extraOptions != null && _extraOptions.length() != 0 ) {
return _extraOptions;
- else
+ } else {
return null;
+ }
}
protected String getFullPathsParameter()
@@ -810,10 +819,11 @@ public class CSharp
*/
protected String getMainClassParameter()
{
- if( _mainClass != null && _mainClass.length() != 0 )
+ if( _mainClass != null && _mainClass.length() != 0 ) {
return "/main:" + _mainClass;
- else
+ } else {
return null;
+ }
}
protected String getNoConfigParameter()
@@ -843,8 +853,9 @@ public class CSharp
File f = _outputFile;
return "/out:" + f.toString();
}
- else
+ else {
return null;
+ }
}
/**
@@ -855,16 +866,18 @@ public class CSharp
protected String getReferenceFilesParameter()
{
//bail on no references
- if( _references == null )
+ if( _references == null ) {
return null;
+ }
//iterate through the ref list & generate an entry for each
//or just rely on the fact that the toString operator does this, but
//noting that the separator is ';' on windows, ':' on unix
String refpath = _references.toString();
//bail on no references listed
- if( refpath.length() == 0 )
+ if( refpath.length() == 0 ) {
return null;
+ }
StringBuffer s = new StringBuffer( "/reference:" );
s.append( refpath );
@@ -879,10 +892,11 @@ public class CSharp
protected String getReferencesParameter()
{
//bail on no references
- if( notEmpty( _references ) )
+ if( notEmpty( _references ) ) {
return "/reference:" + _references;
- else
+ } else {
return null;
+ }
}
/**
@@ -892,10 +906,11 @@ public class CSharp
*/
protected String getTargetTypeParameter()
{
- if( notEmpty( _targetType ) )
+ if( notEmpty( _targetType ) ) {
return "/target:" + _targetType;
- else
+ } else {
return null;
+ }
}
/**
@@ -930,10 +945,11 @@ public class CSharp
*/
protected String getWin32IconParameter()
{
- if( _win32icon != null )
+ if( _win32icon != null ) {
return "/win32icon:" + _win32icon.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -943,10 +959,11 @@ public class CSharp
*/
protected String getWin32ResParameter()
{
- if( _win32res != null )
+ if( _win32res != null ) {
return "/win32res:" + _win32res.toString();
- else
+ } else {
return null;
+ }
}
/**
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
index f403610a9..8014b1a96 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
@@ -226,8 +226,9 @@ public class Ilasm
{
_targetType = targetType;
}
- else
+ else {
throw new TaskException( "targetType " + targetType + " is not a valid type" );
+ }
}
/**
@@ -305,7 +306,9 @@ public class Ilasm
public void execute()
throws TaskException
{
- if( _srcDir == null ) _srcDir = getBaseDirectory();
+ if( _srcDir == null ) {
+ _srcDir = getBaseDirectory();
+ }
//get dependencies list.
DirectoryScanner scanner = super.getDirectoryScanner( _srcDir );
@@ -372,10 +375,11 @@ public class Ilasm
*/
protected String getExtraOptionsParameter()
{
- if( _extraOptions != null && _extraOptions.length() != 0 )
+ if( _extraOptions != null && _extraOptions.length() != 0 ) {
return _extraOptions;
- else
+ } else {
return null;
+ }
}
/**
@@ -385,10 +389,11 @@ public class Ilasm
*/
protected String getKeyfileParameter()
{
- if( _keyfile != null )
+ if( _keyfile != null ) {
return "/keyfile:" + _keyfile.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -408,8 +413,9 @@ public class Ilasm
*/
protected String getOutputFileParameter()
{
- if( _outputFile == null || _outputFile.length() == 0 )
+ if( _outputFile == null || _outputFile.length() == 0 ) {
return null;
+ }
File f = _outputFile;
return "/output=" + f.toString();
}
@@ -434,14 +440,16 @@ public class Ilasm
protected String getTargetTypeParameter()
{
- if( !notEmpty( _targetType ) )
+ if( !notEmpty( _targetType ) ) {
return null;
- if( _targetType.equals( "exe" ) )
+ }
+ if( _targetType.equals( "exe" ) ) {
return "/exe";
- else if( _targetType.equals( "library" ) )
+ } else if( _targetType.equals( "library" ) ) {
return "/dll";
- else
+ } else {
return null;
+ }
}
/**
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
index 1793f516c..fe4b22053 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
@@ -26,8 +26,9 @@ import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
import javax.xml.parsers.SAXParser;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.bcel.*;
-import org.apache.bcel.classfile.*;
+
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.ClassParser;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.types.DirectoryScanner;
import org.apache.tools.ant.Project;
@@ -606,8 +607,9 @@ public class GenericDeploymentTool
while( i.hasNext() )
{
String entryName = (String)i.next();
- if( entryName.endsWith( ".class" ) )
+ if( entryName.endsWith( ".class" ) ) {
newSet.add( entryName.substring( 0, entryName.length() - ".class".length() ).replace( File.separatorChar, '/' ) );
+ }
}
set.addAll( newSet );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
index 259219b35..a6013ab61 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
@@ -943,8 +943,9 @@ public class WebsphereDeploymentTool
" " + tempdir +
" " + destJar.getPath() +
" " + getOptions();
- if( getCombinedClasspath() != null && getCombinedClasspath().toString().length() > 0 )
+ if( getCombinedClasspath() != null && getCombinedClasspath().toString().length() > 0 ) {
args += " -cp " + getCombinedClasspath();
+ }
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
index e8f7cd49a..988cdf0b3 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
@@ -43,7 +43,7 @@ import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildListener;
import org.apache.tools.ant.Project;
-import org.apache.tools.ant.util.StringUtils;
+
/**
* This is a simple grafical user interface to provide the information needed by
@@ -1544,26 +1544,33 @@ public class VAJAntToolGUI extends Frame
}
}
// MenuItems
- if( e.getSource() == VAJAntToolGUI.this.getSaveMenuItem() )
+ if( e.getSource() == VAJAntToolGUI.this.getSaveMenuItem() ) {
saveBuildInfo();
- if( e.getSource() == VAJAntToolGUI.this.getAboutMenuItem() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getAboutMenuItem() ) {
getAboutDialog().show();
- if( e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem() ) {
getMessageFrame().show();
+ }
/*
* #### About dialog ####
*/
- if( e.getSource() == VAJAntToolGUI.this.getAboutOkButton() )
+ if( e.getSource() == VAJAntToolGUI.this.getAboutOkButton() ) {
getAboutDialog().dispose();
+ }
/*
* #### Log frame ####
*/
- if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() )
+ if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() ) {
getMessageFrame().dispose();
- if( e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton() ) {
getMessageTextArea().setText( "" );
- if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() ) {
getMessageFrame().dispose();
+ }
}
catch( Throwable exc )
{
@@ -1580,12 +1587,15 @@ public class VAJAntToolGUI extends Frame
{
try
{
- if( e.getSource() == VAJAntToolGUI.this.getTargetList() )
+ if( e.getSource() == VAJAntToolGUI.this.getTargetList() ) {
getBuildButton().setEnabled( true );
- if( e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice() ) {
getBuildInfo().setOutputMessageLevel( getMessageOutputLevelChoice().getSelectedIndex() );
- if( e.getSource() == VAJAntToolGUI.this.getTargetList() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getTargetList() ) {
getBuildInfo().setTarget( getTargetList().getSelectedItem() );
+ }
}
catch( Throwable exc )
{
@@ -1600,10 +1610,12 @@ public class VAJAntToolGUI extends Frame
*/
public void propertyChange( java.beans.PropertyChangeEvent evt )
{
- if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "projectName" ) ) )
+ if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "projectName" ) ) ) {
connectProjectNameToLabel();
- if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "buildFileName" ) ) )
+ }
+ if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "buildFileName" ) ) ) {
connectBuildFileNameToTextField();
+ }
}
/**
@@ -1613,8 +1625,9 @@ public class VAJAntToolGUI extends Frame
*/
public void textValueChanged( TextEvent e )
{
- if( e.getSource() == VAJAntToolGUI.this.getBuildFileTextField() )
+ if( e.getSource() == VAJAntToolGUI.this.getBuildFileTextField() ) {
connectTextFieldToBuildFileName();
+ }
}
public void windowActivated( WindowEvent e )
@@ -1639,10 +1652,12 @@ public class VAJAntToolGUI extends Frame
dispose();
System.exit( 0 );
}
- if( e.getSource() == VAJAntToolGUI.this.getAboutDialog() )
+ if( e.getSource() == VAJAntToolGUI.this.getAboutDialog() ) {
getAboutDialog().dispose();
- if( e.getSource() == VAJAntToolGUI.this.getMessageFrame() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getMessageFrame() ) {
getMessageFrame().dispose();
+ }
}
catch( Throwable exc )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
index 7221f1378..f300241ee 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
@@ -14,7 +14,7 @@ import java.util.Hashtable;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.exec.Execute2;
-import org.apache.tools.ant.types.Argument;
+
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
index 91f944d8a..182a57fd8 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
@@ -14,8 +14,8 @@ import java.util.Hashtable;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.exec.Execute2;
-import org.apache.tools.ant.types.Argument;
-import org.apache.tools.ant.types.Commandline;
+
+
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
index e63985367..3f7c982a2 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
@@ -14,7 +14,7 @@ import java.io.PrintWriter;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.exec.Execute2;
-import org.apache.tools.ant.types.Argument;
+
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.FileUtils;
@@ -232,8 +232,9 @@ public class JDependTask
File f = new File( elements[ i ] );
// not necessary as JDepend would fail, but why loose some time?
- if( !f.exists() || !f.isDirectory() )
+ if( !f.exists() || !f.isDirectory() ) {
throw new TaskException( "\"" + f.getPath() + "\" does not represent a valid directory. JDepend would fail." );
+ }
commandline.addArgument( f.getPath() );
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
index c18eb3669..696a03e6d 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
@@ -101,10 +101,11 @@ public class JspC extends MatchingTask
public void setClasspath( Path cp )
throws TaskException
{
- if( classpath == null )
+ if( classpath == null ) {
classpath = cp;
- else
+ } else {
classpath.append( cp );
+ }
}
/**
@@ -298,8 +299,9 @@ public class JspC extends MatchingTask
public Path createClasspath()
throws TaskException
{
- if( classpath == null )
+ if( classpath == null ) {
classpath = new Path();
+ }
Path path1 = classpath;
final Path path = new Path();
path1.addPath( path );
@@ -332,9 +334,9 @@ public class JspC extends MatchingTask
// calculate where the files will end up:
File dest = null;
- if( packageName == null )
+ if( packageName == null ) {
dest = destDir;
- else
+ } else
{
String path = destDir.getPath() + File.separatorChar +
packageName.replace( '.', File.separatorChar );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
index d1b172f29..b4ef1148a 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
@@ -37,12 +37,14 @@ public class JasperC
// the project log
//FIXME
Java java = null;//(Java)( getJspc().getProject() ).createTask( "java" );
- if( getJspc().getClasspath() != null )
+ if( getJspc().getClasspath() != null ) {
java.addClasspath( getJspc().getClasspath() );
+ }
java.setClassname( "org.apache.jasper.JspC" );
String args[] = cmd.getArguments();
- for( int i = 0; i < args.length; i++ )
+ for( int i = 0; i < args.length; i++ ) {
java.addArg( new Argument( args[ i ] ) );
+ }
java.execute();
return true;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
index 650497916..d3b374017 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
@@ -13,7 +13,7 @@ import java.util.Arrays;
import java.util.Iterator;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.types.DirectoryScanner;
-import org.apache.tools.ant.Project;
+
import org.apache.tools.ant.types.FileSet;
/**
@@ -47,7 +47,7 @@ public final class BatchTest extends BaseTest
* @param filename the filename to "convert" to a classname.
* @return the classname matching the filename.
*/
- public final static String javaToClass( String filename )
+ public static final String javaToClass( String filename )
{
return filename.replace( File.separatorChar, '.' );
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java
index 674cea5d9..1da4fea99 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java
@@ -97,7 +97,7 @@ public final class DOMUtil
* parent .
* @return the cloned node that is appended to parent
*/
- public final static Node importNode( Node parent, Node child )
+ public static final Node importNode( Node parent, Node child )
{
Node copy = null;
final Document doc = parent.getOwnerDocument();
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
index 3900b105b..5f885a93f 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
@@ -665,8 +665,9 @@ public class JUnitTask extends Task
}
finally
{
- if( !propsFile.delete() )
+ if( !propsFile.delete() ) {
throw new TaskException( "Could not delete temporary properties file." );
+ }
}
return retVal;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
index d782605cc..814ea63b9 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
@@ -15,7 +15,7 @@ import java.text.NumberFormat;
import java.util.Hashtable;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
-import junit.framework.TestCase;
+
import org.apache.avalon.excalibur.util.StringUtil;
import org.apache.myrmidon.api.TaskException;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
index 4876b5bb3..c2c8d2591 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
@@ -18,7 +18,7 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
-import junit.framework.TestCase;
+
import org.apache.myrmidon.api.TaskException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
index bc171077d..0335e33c3 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
@@ -93,7 +93,7 @@ public abstract class AbstractMetamataTask
* @param dest The feature to be added to the AllArrayList attribute
* @param files The feature to be added to the AllArrayList attribute
*/
- protected final static void addAllArrayList( ArrayList dest, Iterator files )
+ protected static final void addAllArrayList( ArrayList dest, Iterator files )
{
while( files.hasNext() )
{
@@ -101,7 +101,7 @@ public abstract class AbstractMetamataTask
}
}
- protected final static File createTmpFile()
+ protected static final File createTmpFile()
{
// must be compatible with JDK 1.1 !!!!
final long rand = ( new Random( System.currentTimeMillis() ) ).nextLong();
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
index df60dfc39..33f095fb1 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
@@ -53,7 +53,7 @@ public class MParse
*
* @return Description of the Returned Value
*/
- protected final static File createTmpFile()
+ protected static final File createTmpFile()
{
// must be compatible with JDK 1.1 !!!!
final long rand = ( new Random( System.currentTimeMillis() ) ).nextLong();
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
index 2bff8fdda..485b60d01 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
@@ -703,8 +703,9 @@ public class FTP
{
File file = resolveFile( new File( dir, filename ).getPath() );
- if( m_newerOnly && isUpToDate( ftp, file, remoteResolveFile( filename ) ) )
+ if( m_newerOnly && isUpToDate( ftp, file, remoteResolveFile( filename ) ) ) {
return;
+ }
if( m_verbose )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
index edd1ca439..bcdc69235 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
@@ -113,15 +113,17 @@ public class MimeMail extends Task
)
throws MessagingException, TaskException
{
- if( ( null == addrList ) || ( addrList.trim().length() <= 0 ) )
+ if( ( null == addrList ) || ( addrList.trim().length() <= 0 ) ) {
return;
+ }
try
{
InternetAddress[] addrArray = InternetAddress.parse( addrList );
- if( ( null == addrArray ) || ( 0 == addrArray.length ) )
+ if( ( null == addrArray ) || ( 0 == addrArray.length ) ) {
throw new TaskException( "Empty " + addrUserName + " recipients list was specified" );
+ }
msg.setRecipients( recipType, addrArray );
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
index af235b609..05689e277 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
@@ -88,8 +88,9 @@ public class P4Add extends P4Base
public void setChangelist( int changelist )
throws TaskException
{
- if( changelist <= 0 )
+ if( changelist <= 0 ) {
throw new TaskException( "P4Add: Changelist# should be a positive number" );
+ }
this.m_changelist = changelist;
}
@@ -97,8 +98,9 @@ public class P4Add extends P4Base
public void setCommandlength( int len )
throws TaskException
{
- if( len <= 0 )
+ if( len <= 0 ) {
throw new TaskException( "P4Add: Commandlength should be a positive number" );
+ }
this.m_cmdLength = len;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
index ed651586f..9112283e6 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
@@ -123,12 +123,13 @@ public abstract class DefaultRmicAdapter
String stubVersion = attributes.getStubVersion();
if( null != stubVersion )
{
- if( "1.1".equals( stubVersion ) )
+ if( "1.1".equals( stubVersion ) ) {
cmd.addArgument( "-v1.1" );
- else if( "1.2".equals( stubVersion ) )
+ } else if( "1.2".equals( stubVersion ) ) {
cmd.addArgument( "-v1.2" );
- else
+ } else {
cmd.addArgument( "-vcompat" );
+ }
}
if( null != attributes.getSourceBase() )
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/GenerateKey.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/GenerateKey.java
index 7a2e8f368..d9d147fc6 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/GenerateKey.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/GenerateKey.java
@@ -11,7 +11,7 @@ import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.taskdefs.exec.Execute2;
import org.apache.tools.ant.types.Commandline;
-import org.apache.tools.ant.types.Argument;
+
import java.io.IOException;
/**
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/SignJar.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/SignJar.java
index c90082f12..a1ce4000f 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/SignJar.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/SignJar.java
@@ -19,7 +19,7 @@ import org.apache.tools.ant.types.DirectoryScanner;
import org.apache.tools.ant.taskdefs.exec.Execute2;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.types.Argument;
+
/**
* Sign a archive.
@@ -282,8 +282,9 @@ public class SignJar
private void doOneJar( final File jarSource, final File jarTarget )
throws TaskException
{
- if( isUpToDate( jarSource, jarTarget ) )
+ if( isUpToDate( jarSource, jarTarget ) ) {
return;
+ }
final StringBuffer sb = new StringBuffer();
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/Native2Ascii.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/Native2Ascii.java
index d74a4652e..00f3c3af2 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/Native2Ascii.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/Native2Ascii.java
@@ -14,7 +14,7 @@ import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.DirectoryScanner;
import org.apache.tools.ant.util.mappers.Mapper;
import org.apache.tools.ant.types.SourceFileScanner;
-import org.apache.tools.ant.types.Argument;
+
import org.apache.tools.ant.util.mappers.FileNameMapper;
import org.apache.tools.ant.util.mappers.IdentityMapper;
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java
index 40cb85196..658be5007 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java
@@ -95,8 +95,9 @@ public class ReplaceRegExp extends Task
public void setByLine( String byline )
{
Boolean res = Boolean.valueOf( byline );
- if( res == null )
+ if( res == null ) {
res = Boolean.FALSE;
+ }
this.byline = res.booleanValue();
}
@@ -113,8 +114,9 @@ public class ReplaceRegExp extends Task
public void setMatch( String match )
throws TaskException
{
- if( regex != null )
+ if( regex != null ) {
throw new TaskException( "Only one regular expression is allowed" );
+ }
regex = new RegularExpression();
regex.setPattern( match );
@@ -123,8 +125,9 @@ public class ReplaceRegExp extends Task
public void setReplace( String replace )
throws TaskException
{
- if( subs != null )
+ if( subs != null ) {
throw new TaskException( "Only one substitution expression is allowed" );
+ }
subs = new Substitution();
subs.setExpression( replace );
@@ -138,8 +141,9 @@ public class ReplaceRegExp extends Task
public RegularExpression createRegularExpression()
throws TaskException
{
- if( regex != null )
+ if( regex != null ) {
throw new TaskException( "Only one regular expression is allowed." );
+ }
regex = new RegularExpression();
return regex;
@@ -148,8 +152,9 @@ public class ReplaceRegExp extends Task
public Substitution createSubstitution()
throws TaskException
{
- if( subs != null )
+ if( subs != null ) {
throw new TaskException( "Only one substitution expression is allowed" );
+ }
subs = new Substitution();
return subs;
@@ -158,27 +163,34 @@ public class ReplaceRegExp extends Task
public void execute()
throws TaskException
{
- if( regex == null )
+ if( regex == null ) {
throw new TaskException( "No expression to match." );
- if( subs == null )
+ }
+ if( subs == null ) {
throw new TaskException( "Nothing to replace expression with." );
+ }
- if( file != null && filesets.size() > 0 )
+ if( file != null && filesets.size() > 0 ) {
throw new TaskException( "You cannot supply the 'file' attribute and filesets at the same time." );
+ }
int options = 0;
- if( flags.indexOf( 'g' ) != -1 )
+ if( flags.indexOf( 'g' ) != -1 ) {
options |= Regexp.REPLACE_ALL;
+ }
- if( flags.indexOf( 'i' ) != -1 )
+ if( flags.indexOf( 'i' ) != -1 ) {
options |= Regexp.MATCH_CASE_INSENSITIVE;
+ }
- if( flags.indexOf( 'm' ) != -1 )
+ if( flags.indexOf( 'm' ) != -1 ) {
options |= Regexp.MATCH_MULTILINE;
+ }
- if( flags.indexOf( 's' ) != -1 )
+ if( flags.indexOf( 's' ) != -1 ) {
options |= Regexp.MATCH_SINGLELINE;
+ }
if( file != null && file.exists() )
{
@@ -292,8 +304,9 @@ public class ReplaceRegExp extends Task
while( ( line = lnr.readLine() ) != null )
{
String res = doReplace( regex, subs, line, options );
- if( !res.equals( line ) )
+ if( !res.equals( line ) ) {
changes = true;
+ }
pw.println( res );
}
@@ -314,8 +327,9 @@ public class ReplaceRegExp extends Task
String buf = new String( tmpBuf );
String res = doReplace( regex, subs, buf, options );
- if( !res.equals( buf ) )
+ if( !res.equals( buf ) ) {
changes = true;
+ }
pw.println( res );
pw.flush();
@@ -340,8 +354,9 @@ public class ReplaceRegExp extends Task
{
try
{
- if( r != null )
+ if( r != null ) {
r.close();
+ }
}
catch( Exception e )
{
@@ -350,8 +365,9 @@ public class ReplaceRegExp extends Task
try
{
- if( w != null )
+ if( w != null ) {
r.close();
+ }
}
catch( Exception e )
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Rpm.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Rpm.java
index 3ef75a9e3..fdd32c04a 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Rpm.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Rpm.java
@@ -13,7 +13,7 @@ import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.taskdefs.exec.Execute2;
import org.apache.tools.ant.types.Commandline;
-import org.apache.tools.ant.types.Argument;
+
/**
* @author lucas@collab.net
@@ -93,7 +93,9 @@ public class Rpm
final Execute2 exe = new Execute2();
setupLogger( exe );
- if( m_topDir == null ) m_topDir = getBaseDirectory();
+ if( m_topDir == null ) {
+ m_topDir = getBaseDirectory();
+ }
exe.setWorkingDirectory( m_topDir );
exe.setCommandline( cmd.getCommandline() );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/Commandline.java b/proposal/myrmidon/src/main/org/apache/tools/ant/types/Commandline.java
index c8e1559d7..c45078206 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/Commandline.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/types/Commandline.java
@@ -44,8 +44,9 @@ public class Commandline
*/
public void setExecutable( final String executable )
{
- if( executable == null || executable.length() == 0 )
+ if( executable == null || executable.length() == 0 ) {
return;
+ }
m_executable = executable.replace( '/', File.separatorChar )
.replace( '\\', File.separatorChar );
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java b/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java
index cfff27502..545097a52 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java
@@ -8,10 +8,10 @@
package org.apache.tools.ant.types;
import java.io.File;
-import java.io.IOException;
-import java.net.URL;
+
+
import java.util.ArrayList;
-import java.util.Locale;
+
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.DataType;
import org.apache.tools.ant.util.FileUtils;
@@ -241,8 +241,9 @@ public class Path
final String[] list = list();
// empty path return empty string
- if( list.length == 0 )
+ if( list.length == 0 ) {
return "";
+ }
// path containing one or more elements
final StringBuffer result = new StringBuffer( list[ 0 ].toString() );
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/PathElement.java b/proposal/myrmidon/src/main/org/apache/tools/ant/types/PathElement.java
index 955cbb03a..28a6e8acb 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/PathElement.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/types/PathElement.java
@@ -9,7 +9,7 @@ package org.apache.tools.ant.types;
import java.io.File;
import org.apache.tools.ant.util.FileUtils;
-import org.apache.avalon.framework.logger.Logger;
+
import org.apache.myrmidon.api.TaskException;
/**
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/PatternSet.java b/proposal/myrmidon/src/main/org/apache/tools/ant/types/PatternSet.java
index 10d532879..306a9d421 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/PatternSet.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/types/PatternSet.java
@@ -252,10 +252,11 @@ public class PatternSet
if( fileName != null )
{
File inclFile = resolveFile( fileName );
- if( !inclFile.exists() )
+ if( !inclFile.exists() ) {
throw new TaskException( "Includesfile "
+ inclFile.getAbsolutePath()
+ " not found." );
+ }
readPatterns( inclFile, m_includeList, p );
}
}
@@ -272,10 +273,11 @@ public class PatternSet
if( fileName != null )
{
File exclFile = resolveFile( fileName );
- if( !exclFile.exists() )
+ if( !exclFile.exists() ) {
throw new TaskException( "Excludesfile "
+ exclFile.getAbsolutePath()
+ " not found." );
+ }
readPatterns( exclFile, m_excludeList, p );
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/types/SysProperties.java b/proposal/myrmidon/src/main/org/apache/tools/ant/types/SysProperties.java
index aa34aed3d..31165062c 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/types/SysProperties.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/types/SysProperties.java
@@ -55,8 +55,9 @@ public class SysProperties
throw new TaskException( ee.getMessage(), ee );
}
- if( props == null )
+ if( props == null ) {
return null;
+ }
for( int i = 0; i < props.length; i++ )
{
@@ -82,8 +83,9 @@ public class SysProperties
public void restoreSystem()
throws TaskException
{
- if( m_system == null )
+ if( m_system == null ) {
throw new TaskException( "Unbalanced nesting of SysProperties" );
+ }
try
{
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java
index 9689328fe..576f7a05e 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java
@@ -385,8 +385,9 @@ public class FileUtils
*/
public static String translateFile( final String source )
{
- if( source == null )
+ if( source == null ) {
return "";
+ }
final StringBuffer result = new StringBuffer( source );
translateFileSep( result );
@@ -422,8 +423,9 @@ public class FileUtils
throws TaskException
{
final ArrayList result = new ArrayList();
- if( source == null )
+ if( source == null ) {
return new String[ 0 ];
+ }
final String[] elements = parsePath( source );
StringBuffer element = new StringBuffer();
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/depend/Dependencies.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/depend/Dependencies.java
index c45c77552..ace1fc7c6 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/depend/Dependencies.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/depend/Dependencies.java
@@ -14,8 +14,41 @@ import java.util.Iterator;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
-import org.apache.bcel.*;
-import org.apache.bcel.classfile.*;
+
+import org.apache.bcel.classfile.Visitor;
+import org.apache.bcel.classfile.ConstantPool;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.ClassParser;
+import org.apache.bcel.classfile.Code;
+import org.apache.bcel.classfile.CodeException;
+import org.apache.bcel.classfile.ConstantClass;
+import org.apache.bcel.classfile.ConstantDouble;
+import org.apache.bcel.classfile.ConstantFieldref;
+import org.apache.bcel.classfile.ConstantFloat;
+import org.apache.bcel.classfile.ConstantInteger;
+import org.apache.bcel.classfile.ConstantInterfaceMethodref;
+import org.apache.bcel.classfile.ConstantLong;
+import org.apache.bcel.classfile.ConstantMethodref;
+import org.apache.bcel.classfile.ConstantNameAndType;
+import org.apache.bcel.classfile.Constant;
+import org.apache.bcel.classfile.ConstantString;
+import org.apache.bcel.classfile.ConstantUtf8;
+import org.apache.bcel.classfile.ConstantValue;
+import org.apache.bcel.classfile.Deprecated;
+import org.apache.bcel.classfile.ExceptionTable;
+import org.apache.bcel.classfile.Field;
+import org.apache.bcel.classfile.InnerClass;
+import org.apache.bcel.classfile.InnerClasses;
+import org.apache.bcel.classfile.Method;
+import org.apache.bcel.classfile.LineNumber;
+import org.apache.bcel.classfile.LineNumberTable;
+import org.apache.bcel.classfile.LocalVariable;
+import org.apache.bcel.classfile.LocalVariableTable;
+import org.apache.bcel.classfile.SourceFile;
+import org.apache.bcel.classfile.StackMap;
+import org.apache.bcel.classfile.StackMapEntry;
+import org.apache.bcel.classfile.Synthetic;
+import org.apache.bcel.classfile.Unknown;
public class Dependencies implements Visitor
{
@@ -63,8 +96,9 @@ public class Dependencies implements Visitor
for( int i = o; i < args.length; i++ )
{
String fileName = args[ i ].substring( 0, args[ i ].length() - ".class".length() );
- if( base != null && fileName.startsWith( base ) )
+ if( base != null && fileName.startsWith( base ) ) {
fileName = fileName.substring( base.length() );
+ }
newSet.add( fileName );
}
set.addAll( newSet );
@@ -94,8 +128,9 @@ public class Dependencies implements Visitor
public boolean accept( Object object )
{
String fileName = object + ".class";
- if( base != null )
+ if( base != null ) {
fileName = base + fileName;
+ }
return new File( fileName ).exists();
}
} );
@@ -178,8 +213,9 @@ public class Dependencies implements Visitor
public void visitConstantPool( ConstantPool obj )
{
- if( verbose )
+ if( verbose ) {
System.out.println( "visit ConstantPool" );
+ }
this.constantPool = obj;
// visit constants
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
index d0ebdee30..8c3f7f666 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
@@ -124,12 +124,15 @@ public class JakartaRegexpMatcher implements RegexpMatcher
{
int cOptions = RE.MATCH_NORMAL;
- if( RegexpUtil.hasFlag( options, MATCH_CASE_INSENSITIVE ) )
+ if( RegexpUtil.hasFlag( options, MATCH_CASE_INSENSITIVE ) ) {
cOptions |= RE.MATCH_CASEINDEPENDENT;
- if( RegexpUtil.hasFlag( options, MATCH_MULTILINE ) )
+ }
+ if( RegexpUtil.hasFlag( options, MATCH_MULTILINE ) ) {
cOptions |= RE.MATCH_MULTILINE;
- if( RegexpUtil.hasFlag( options, MATCH_SINGLELINE ) )
+ }
+ if( RegexpUtil.hasFlag( options, MATCH_SINGLELINE ) ) {
cOptions |= RE.MATCH_SINGLELINE;
+ }
return cOptions;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
index 3772ff660..343fa5483 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
@@ -71,8 +71,9 @@ public class JakartaRegexpRegexp extends JakartaRegexpMatcher implements Regexp
protected int getSubsOptions( int options )
{
int subsOptions = RE.REPLACE_FIRSTONLY;
- if( RegexpUtil.hasFlag( options, REPLACE_ALL ) )
+ if( RegexpUtil.hasFlag( options, REPLACE_ALL ) ) {
subsOptions = RE.REPLACE_ALL;
+ }
return subsOptions;
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
index 45af5c260..dbefcecf9 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
@@ -148,12 +148,15 @@ public class Jdk14RegexpMatcher implements RegexpMatcher
{
int cOptions = 0;
- if( RegexpUtil.hasFlag( options, MATCH_CASE_INSENSITIVE ) )
+ if( RegexpUtil.hasFlag( options, MATCH_CASE_INSENSITIVE ) ) {
cOptions |= Pattern.CASE_INSENSITIVE;
- if( RegexpUtil.hasFlag( options, MATCH_MULTILINE ) )
+ }
+ if( RegexpUtil.hasFlag( options, MATCH_MULTILINE ) ) {
cOptions |= Pattern.MULTILINE;
- if( RegexpUtil.hasFlag( options, MATCH_SINGLELINE ) )
+ }
+ if( RegexpUtil.hasFlag( options, MATCH_SINGLELINE ) ) {
cOptions |= Pattern.DOTALL;
+ }
return cOptions;
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
index 594f22d55..f41e6f620 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
@@ -91,8 +91,9 @@ public class Jdk14RegexpRegexp extends Jdk14RegexpMatcher implements Regexp
protected int getSubsOptions( int options )
{
int subsOptions = REPLACE_FIRST;
- if( RegexpUtil.hasFlag( options, REPLACE_ALL ) )
+ if( RegexpUtil.hasFlag( options, REPLACE_ALL ) ) {
subsOptions = REPLACE_ALL;
+ }
return subsOptions;
}
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
index ccc41cbdf..50f480ab2 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
@@ -21,9 +21,9 @@ import org.apache.myrmidon.api.TaskException;
*/
public class RegexpMatcherFactory
{
- protected static final String JAKARTA_REGEXP = "org.apache.tools.ant.util.regexp.JakartaRegexpRegexp";
- protected static final String JAKARTA_ORO = "org.apache.tools.ant.util.regexp.JakartaOroRegexp";
- protected static final String JDK14_REGEXP = "org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp";
+ protected final static String JAKARTA_REGEXP = "org.apache.tools.ant.util.regexp.JakartaRegexpRegexp";
+ protected final static String JAKARTA_ORO = "org.apache.tools.ant.util.regexp.JakartaOroRegexp";
+ protected final static String JDK14_REGEXP = "org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp";
/**
* Create a new regular expression instance.
diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
index cde75ed8b..83c56037a 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
@@ -14,12 +14,12 @@ package org.apache.tools.ant.util.regexp;
*/
public class RegexpUtil extends Object
{
- public final static boolean hasFlag( int options, int flag )
+ public static final boolean hasFlag( int options, int flag )
{
return ( ( options & flag ) > 0 );
}
- public final static int removeFlag( int options, int flag )
+ public static final int removeFlag( int options, int flag )
{
return ( options & ( 0xFFFFFFFF - flag ) );
}
diff --git a/proposal/myrmidon/src/main/org/apache/tools/mail/MailMessage.java b/proposal/myrmidon/src/main/org/apache/tools/mail/MailMessage.java
index 62580f1f4..95cca6652 100644
--- a/proposal/myrmidon/src/main/org/apache/tools/mail/MailMessage.java
+++ b/proposal/myrmidon/src/main/org/apache/tools/mail/MailMessage.java
@@ -373,12 +373,15 @@ public class MailMessage
void disconnect()
throws IOException
{
- if( out != null )
+ if( out != null ) {
out.close();
- if( in != null )
+ }
+ if( in != null ) {
in.close();
- if( socket != null )
+ }
+ if( socket != null ) {
socket.close();
+ }
}
void flushHeaders()
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java
index 386654837..d2e86f2f9 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/Project.java
@@ -96,8 +96,9 @@ public class Project
*/
public String getProperty( String name )
{
- if( name == null )
+ if( name == null ) {
return null;
+ }
String property = (String)properties.get( name );
return property;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java
index 0821f0ecd..eeab86340 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java
@@ -13,7 +13,7 @@ import java.net.URLClassLoader;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.condition.Condition;
-import org.apache.tools.ant.types.EnumeratedAttribute;
+
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Get.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Get.java
index ee9687cc9..330e797c0 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Get.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Get.java
@@ -239,8 +239,9 @@ public class Get extends Task
if( is == null )
{
getLogger().info( "Can't get " + source + " to " + dest );
- if( ignoreErrors )
+ if( ignoreErrors ) {
return;
+ }
throw new TaskException( "Can't get " + source + " to " + dest );
}
@@ -250,11 +251,13 @@ public class Get extends Task
while( ( length = is.read( buffer ) ) >= 0 )
{
fos.write( buffer, 0, length );
- if( verbose )
+ if( verbose ) {
System.out.print( "." );
+ }
}
- if( verbose )
+ if( verbose ) {
System.out.println();
+ }
fos.close();
is.close();
@@ -279,8 +282,9 @@ public class Get extends Task
catch( IOException ioe )
{
getLogger().info( "Error getting " + source + " to " + dest );
- if( ignoreErrors )
+ if( ignoreErrors ) {
return;
+ }
throw new TaskException( "Error", ioe );
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java
index cf74c16d5..2b88decdd 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Java.java
@@ -13,7 +13,7 @@ import java.io.PrintStream;
import java.util.ArrayList;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.AbstractTask;
-import org.apache.tools.ant.Task;
+
import org.apache.tools.ant.taskdefs.exec.Execute2;
import org.apache.tools.ant.types.Argument;
import org.apache.tools.ant.types.CommandlineJava;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/PathConvert.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/PathConvert.java
index 335aad0fd..f1b636cdb 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/PathConvert.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/PathConvert.java
@@ -149,8 +149,9 @@ public class PathConvert extends Task
elem = elem.replace( fromDirSep, toDirSep );
- if( i != 0 )
+ if( i != 0 ) {
rslt.append( m_pathSep );
+ }
rslt.append( elem );
}
@@ -209,16 +210,19 @@ public class PathConvert extends Task
throws TaskException
{
- if( m_path == null )
+ if( m_path == null ) {
throw new TaskException( "You must specify a path to convert" );
+ }
- if( m_property == null )
+ if( m_property == null ) {
throw new TaskException( "You must specify a property" );
+ }
// Must either have a target OS or both a dirSep and pathSep
- if( m_targetOS == null && m_pathSep == null && m_dirSep == null )
+ if( m_targetOS == null && m_pathSep == null && m_dirSep == null ) {
throw new TaskException( "You must specify at least one of targetOS, dirSep, or pathSep" );
+ }
// Determine the separator strings. The dirsep and pathsep attributes
// override the targetOS settings.
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java
index 4b58e56bc..9efde1607 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java
@@ -79,8 +79,9 @@ public class Property
setProperty( m_name, m_value );
}
- if( m_resource != null )
+ if( m_resource != null ) {
loadResource( m_resource );
+ }
}
private void validate() throws TaskException
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/SQLExec.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/SQLExec.java
index 2833b3509..12431fd8c 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/SQLExec.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/SQLExec.java
@@ -468,8 +468,9 @@ public class SQLExec
throw new SQLException( "No suitable Driver for " + url );
}
- if( !isValidRdbms( conn ) )
+ if( !isValidRdbms( conn ) ) {
return;
+ }
conn.setAutoCommit( autocommit );
@@ -563,8 +564,9 @@ public class SQLExec
*/
protected boolean isValidRdbms( Connection conn )
{
- if( rdbms == null && version == null )
+ if( rdbms == null && version == null ) {
return true;
+ }
try
{
@@ -617,8 +619,9 @@ public class SQLExec
throws SQLException
{
// Check and ignore empty statements
- if( "".equals( sql.trim() ) )
+ if( "".equals( sql.trim() ) ) {
return;
+ }
try
{
@@ -647,8 +650,9 @@ public class SQLExec
catch( SQLException e )
{
getLogger().error( "Failed to execute: " + sql );
- if( !onError.equals( "continue" ) )
+ if( !onError.equals( "continue" ) ) {
throw e;
+ }
getLogger().error( e.toString() );
}
}
@@ -726,10 +730,12 @@ public class SQLExec
{
line = line.trim();
line = "" + resolveValue( line );
- if( line.startsWith( "//" ) )
+ if( line.startsWith( "//" ) ) {
continue;
- if( line.startsWith( "--" ) )
+ }
+ if( line.startsWith( "--" ) ) {
continue;
+ }
StringTokenizer st = new StringTokenizer( line );
if( st.hasMoreTokens() )
{
@@ -746,8 +752,9 @@ public class SQLExec
// SQL defines "--" as a comment to EOL
// and in Oracle it may contain a hint
// so we cannot just remove it, instead we must end it
- if( line.indexOf( "--" ) >= 0 )
+ if( line.indexOf( "--" ) >= 0 ) {
sql += "\n";
+ }
if( delimiterType.equals( DelimiterType.NORMAL ) && sql.endsWith( delimiter ) ||
delimiterType.equals( DelimiterType.ROW ) && line.equals( delimiter ) )
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tar.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tar.java
index 6a9ac6451..8115512a1 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tar.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tar.java
@@ -14,9 +14,9 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import org.apache.myrmidon.api.TaskException;
-import org.apache.tools.ant.types.DirectoryScanner;
-import org.apache.tools.ant.types.EnumeratedAttribute;
-import org.apache.tools.ant.types.FileSet;
+
+
+
import org.apache.tools.ant.util.mappers.MergingMapper;
import org.apache.tools.ant.types.SourceFileScanner;
import org.apache.aut.tar.TarConstants;
@@ -304,8 +304,9 @@ public class Tar
}
finally
{
- if( input != null )
+ if( input != null ) {
input.close();
+ }
}
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java
index 6c3c2b8bb..542b55c72 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java
@@ -119,8 +119,9 @@ public class UpToDate extends MatchingTask implements Condition
}
// if not there then it can't be up to date
- if( _targetFile != null && !_targetFile.exists() )
+ if( _targetFile != null && !_targetFile.exists() ) {
return false;
+ }
Iterator enum = sourceFileSets.iterator();
boolean upToDate = true;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Zip.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Zip.java
index cae863172..0c4307d43 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Zip.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Zip.java
@@ -349,8 +349,9 @@ public class Zip
// before we added any files, then we must swallow this exception. Otherwise,
// the error that's reported will be the close() error, which is not the real
// cause of the problem.
- if( success )
+ if( success ) {
throw ex;
+ }
}
}
}
@@ -455,8 +456,9 @@ public class Zip
}
}
- if( !zipFile.exists() )
+ if( !zipFile.exists() ) {
return false;
+ }
final SourceFileScanner scanner = new SourceFileScanner();
setupLogger( scanner );
@@ -490,15 +492,17 @@ public class Zip
String prefix, String fullpath )
throws IOException, TaskException
{
- if( prefix.length() > 0 && fullpath.length() > 0 )
+ if( prefix.length() > 0 && fullpath.length() > 0 ) {
throw new TaskException( "Both prefix and fullpath attributes may not be set on the same fileset." );
+ }
File thisBaseDir = scanner.getBasedir();
// directories that matched include patterns
String[] dirs = scanner.getIncludedDirectories();
- if( dirs.length > 0 && fullpath.length() > 0 )
+ if( dirs.length > 0 && fullpath.length() > 0 ) {
throw new TaskException( "fullpath attribute may only be specified for filesets that specify a single file." );
+ }
for( int i = 0; i < dirs.length; i++ )
{
if( "".equals( dirs[ i ] ) )
@@ -515,8 +519,9 @@ public class Zip
// files that matched include patterns
String[] files = scanner.getIncludedFiles();
- if( files.length > 1 && fullpath.length() > 0 )
+ if( files.length > 1 && fullpath.length() > 0 ) {
throw new TaskException( "fullpath attribute may only be specified for filesets that specify a single file." );
+ }
for( int i = 0; i < files.length; i++ )
{
File f = new File( thisBaseDir, files[ i ] );
@@ -643,8 +648,9 @@ public class Zip
ZipOutputStream zOut, String prefix, String fullpath )
throws IOException, TaskException
{
- if( prefix.length() > 0 && fullpath.length() > 0 )
+ if( prefix.length() > 0 && fullpath.length() > 0 ) {
throw new TaskException( "Both prefix and fullpath attributes may not be set on the same fileset." );
+ }
ZipScanner zipScanner = (ZipScanner)ds;
File zipSrc = fs.getSrc();
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Jikes.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Jikes.java
index 360925e8c..f1e9b5a14 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Jikes.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/Jikes.java
@@ -83,8 +83,9 @@ public class Jikes
Commandline cmd = new Commandline();
cmd.setExecutable( "jikes" );
- if( m_deprecation == true )
+ if( m_deprecation == true ) {
cmd.addArgument( "-deprecation" );
+ }
if( m_destDir != null )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/exec/ExecTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/exec/ExecTask.java
index d66df6ca1..25544b17a 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/exec/ExecTask.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/exec/ExecTask.java
@@ -313,10 +313,12 @@ public class ExecTask
{
try
{
- if( m_ouput != null )
+ if( m_ouput != null ) {
m_ouput.close();
- if( m_byteArrayOutput != null )
+ }
+ if( m_byteArrayOutput != null ) {
m_byteArrayOutput.close();
+ }
}
catch( IOException io )
{
@@ -344,7 +346,9 @@ public class ExecTask
throws TaskException
{
// default directory to the project's base directory
- if( m_workingDirectory == null ) m_workingDirectory = getBaseDirectory();
+ if( m_workingDirectory == null ) {
+ m_workingDirectory = getBaseDirectory();
+ }
// show the command
getLogger().debug( m_command.toString() );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/file/Move.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/file/Move.java
index fa41dbb9a..cd693ae0c 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/file/Move.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/file/Move.java
@@ -50,8 +50,9 @@ public class Move
throws TaskException
{
String[] list = d.list();
- if( list == null )
- return;// on an io error list() can return null
+ if( list == null ) {
+ return;
+ }// on an io error list() can return null
for( int i = 0; i < list.length; i++ )
{
@@ -224,8 +225,9 @@ public class Move
protected boolean okToDelete( File d )
{
String[] list = d.list();
- if( list == null )
- return false;// maybe io error?
+ if( list == null ) {
+ return false;
+ }// maybe io error?
for( int i = 0; i < list.length; i++ )
{
@@ -233,8 +235,9 @@ public class Move
File f = new File( d, s );
if( f.isDirectory() )
{
- if( !okToDelete( f ) )
+ if( !okToDelete( f ) ) {
return false;
+ }
}
else
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
index de9f2e923..500a2130e 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
@@ -571,10 +571,12 @@ public class Javadoc
cmd.addArgument( "-classpath" );
cmd.addArgument( classpath.toString() );
- if( m_version && m_doclet == null )
+ if( m_version && m_doclet == null ) {
cmd.addArgument( "-version" );
- if( m_author && m_doclet == null )
+ }
+ if( m_author && m_doclet == null ) {
cmd.addArgument( "-author" );
+ }
if( m_doclet == null )
{
@@ -932,8 +934,9 @@ public class Javadoc
ArrayList addedPackages = new ArrayList();
String[] list = sourcePath.list();
- if( list == null )
+ if( list == null ) {
list = new String[ 0 ];
+ }
FileSet fs = new FileSet();
fs.setDefaultexcludes( m_useDefaultExcludes );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Cab.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Cab.java
index 45ccaf345..8c1832f82 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Cab.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Cab.java
@@ -195,8 +195,9 @@ public class Cab
{
String file = files.get( i ).toString();
if( new File( m_baseDir, file ).lastModified() >
- m_cabFile.lastModified() )
+ m_cabFile.lastModified() ) {
upToDate = false;
+ }
}
return upToDate;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Entry.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Entry.java
index 138e3d928..463592b64 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Entry.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Entry.java
@@ -159,8 +159,9 @@ public class Entry
GregorianCalendar value = new GregorianCalendar();
GregorianCalendar newValue = new GregorianCalendar();
- if( m_pattern == null )
+ if( m_pattern == null ) {
m_pattern = "yyyy/MM/dd HH:mm";
+ }
DateFormat fmt = new SimpleDateFormat( m_pattern );
// special case
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Javah.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Javah.java
index fefee9c6c..bfa2cb542 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Javah.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Javah.java
@@ -12,7 +12,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.StringTokenizer;
import org.apache.avalon.excalibur.util.StringUtil;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
+
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.api.AbstractTask;
import org.apache.tools.ant.types.Commandline;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ManifestFile.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
index 2fc6ac992..af0e27683 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
@@ -89,8 +89,9 @@ public class ManifestFile extends Task
throws TaskException
{
checkParameters();
- if( isUpdate( currentMethod ) )
+ if( isUpdate( currentMethod ) ) {
readFile();
+ }
executeOperation();
writeFile();
@@ -202,8 +203,9 @@ public class ManifestFile extends Task
{
stop = true;
}
- else
+ else {
buffer.append( (char)c );
+ }
}
fis.close();
StringTokenizer lineTokens = getLineTokens( buffer );
@@ -315,8 +317,9 @@ public class ManifestFile extends Task
Entry ent = new Entry();
boolean result = false;
int res = ent.compare( this, (Entry)obj );
- if( res == 0 )
+ if( res == 0 ) {
result = true;
+ }
return result;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/NetRexxC.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
index 1b8bc9577..0d5368b07 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
@@ -169,8 +169,9 @@ public class NetRexxC extends MatchingTask
public void setCompile( boolean compile )
{
this.compile = compile;
- if( !this.compile && !this.keep )
+ if( !this.compile && !this.keep ) {
this.keep = true;
+ }
}
/**
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java
index c99a4452b..ca7052b13 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Script.java
@@ -46,8 +46,9 @@ public class Script extends Task
public void setSrc( String fileName )
{
File file = new File( fileName );
- if( !file.exists() )
+ if( !file.exists() ) {
throw new TaskException( "file " + fileName + " not found." );
+ }
int count = (int)file.length();
byte data[] = new byte[ count ];
@@ -139,11 +140,13 @@ public class Script extends Task
boolean isValid = key.length() > 0 &&
Character.isJavaIdentifierStart( key.charAt( 0 ) );
- for( int i = 1; isValid && i < key.length(); i++ )
+ for( int i = 1; isValid && i < key.length(); i++ ) {
isValid = Character.isJavaIdentifierPart( key.charAt( i ) );
+ }
- if( isValid )
+ if( isValid ) {
beans.put( key, dictionary.get( key ) );
+ }
}
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
index 83329ead1..af5447d46 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
@@ -420,8 +420,9 @@ public class CSharp
throws TaskException
{
//demand create pathlist
- if( _referenceFiles == null )
+ if( _referenceFiles == null ) {
_referenceFiles = new Path();
+ }
_referenceFiles.append( path );
}
@@ -461,8 +462,9 @@ public class CSharp
{
_targetType = targetType;
}
- else
+ else {
throw new TaskException( "targetType " + targetType + " is not a valid type" );
+ }
}
/**
@@ -648,7 +650,9 @@ public class CSharp
public void execute()
throws TaskException
{
- if( _srcDir == null ) _srcDir = getBaseDirectory();
+ if( _srcDir == null ) {
+ _srcDir = getBaseDirectory();
+ }
NetCommand command = new NetCommand( this, "CSC", csc_exe_name );
command.setFailOnError( getFailFailOnError() );
@@ -706,10 +710,11 @@ public class CSharp
*/
protected String getAdditionalModulesParameter()
{
- if( notEmpty( _additionalModules ) )
+ if( notEmpty( _additionalModules ) ) {
return "/addmodule:" + _additionalModules;
- else
+ } else {
return null;
+ }
}
/**
@@ -735,8 +740,9 @@ public class CSharp
s.append( DEFAULT_REFERENCE_LIST );
return new String( s );
}
- else
+ else {
return null;
+ }
}
/**
@@ -746,10 +752,11 @@ public class CSharp
*/
protected String getDefinitionsParameter()
{
- if( notEmpty( _definitions ) )
+ if( notEmpty( _definitions ) ) {
return "/define:" + _definitions;
- else
+ } else {
return null;
+ }
}
/**
@@ -759,10 +766,11 @@ public class CSharp
*/
protected String getDocFileParameter()
{
- if( _docFile != null )
+ if( _docFile != null ) {
return "/doc:" + _docFile.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -772,10 +780,11 @@ public class CSharp
*/
protected String getExtraOptionsParameter()
{
- if( _extraOptions != null && _extraOptions.length() != 0 )
+ if( _extraOptions != null && _extraOptions.length() != 0 ) {
return _extraOptions;
- else
+ } else {
return null;
+ }
}
protected String getFullPathsParameter()
@@ -810,10 +819,11 @@ public class CSharp
*/
protected String getMainClassParameter()
{
- if( _mainClass != null && _mainClass.length() != 0 )
+ if( _mainClass != null && _mainClass.length() != 0 ) {
return "/main:" + _mainClass;
- else
+ } else {
return null;
+ }
}
protected String getNoConfigParameter()
@@ -843,8 +853,9 @@ public class CSharp
File f = _outputFile;
return "/out:" + f.toString();
}
- else
+ else {
return null;
+ }
}
/**
@@ -855,16 +866,18 @@ public class CSharp
protected String getReferenceFilesParameter()
{
//bail on no references
- if( _references == null )
+ if( _references == null ) {
return null;
+ }
//iterate through the ref list & generate an entry for each
//or just rely on the fact that the toString operator does this, but
//noting that the separator is ';' on windows, ':' on unix
String refpath = _references.toString();
//bail on no references listed
- if( refpath.length() == 0 )
+ if( refpath.length() == 0 ) {
return null;
+ }
StringBuffer s = new StringBuffer( "/reference:" );
s.append( refpath );
@@ -879,10 +892,11 @@ public class CSharp
protected String getReferencesParameter()
{
//bail on no references
- if( notEmpty( _references ) )
+ if( notEmpty( _references ) ) {
return "/reference:" + _references;
- else
+ } else {
return null;
+ }
}
/**
@@ -892,10 +906,11 @@ public class CSharp
*/
protected String getTargetTypeParameter()
{
- if( notEmpty( _targetType ) )
+ if( notEmpty( _targetType ) ) {
return "/target:" + _targetType;
- else
+ } else {
return null;
+ }
}
/**
@@ -930,10 +945,11 @@ public class CSharp
*/
protected String getWin32IconParameter()
{
- if( _win32icon != null )
+ if( _win32icon != null ) {
return "/win32icon:" + _win32icon.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -943,10 +959,11 @@ public class CSharp
*/
protected String getWin32ResParameter()
{
- if( _win32res != null )
+ if( _win32res != null ) {
return "/win32res:" + _win32res.toString();
- else
+ } else {
return null;
+ }
}
/**
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
index f403610a9..8014b1a96 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
@@ -226,8 +226,9 @@ public class Ilasm
{
_targetType = targetType;
}
- else
+ else {
throw new TaskException( "targetType " + targetType + " is not a valid type" );
+ }
}
/**
@@ -305,7 +306,9 @@ public class Ilasm
public void execute()
throws TaskException
{
- if( _srcDir == null ) _srcDir = getBaseDirectory();
+ if( _srcDir == null ) {
+ _srcDir = getBaseDirectory();
+ }
//get dependencies list.
DirectoryScanner scanner = super.getDirectoryScanner( _srcDir );
@@ -372,10 +375,11 @@ public class Ilasm
*/
protected String getExtraOptionsParameter()
{
- if( _extraOptions != null && _extraOptions.length() != 0 )
+ if( _extraOptions != null && _extraOptions.length() != 0 ) {
return _extraOptions;
- else
+ } else {
return null;
+ }
}
/**
@@ -385,10 +389,11 @@ public class Ilasm
*/
protected String getKeyfileParameter()
{
- if( _keyfile != null )
+ if( _keyfile != null ) {
return "/keyfile:" + _keyfile.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -408,8 +413,9 @@ public class Ilasm
*/
protected String getOutputFileParameter()
{
- if( _outputFile == null || _outputFile.length() == 0 )
+ if( _outputFile == null || _outputFile.length() == 0 ) {
return null;
+ }
File f = _outputFile;
return "/output=" + f.toString();
}
@@ -434,14 +440,16 @@ public class Ilasm
protected String getTargetTypeParameter()
{
- if( !notEmpty( _targetType ) )
+ if( !notEmpty( _targetType ) ) {
return null;
- if( _targetType.equals( "exe" ) )
+ }
+ if( _targetType.equals( "exe" ) ) {
return "/exe";
- else if( _targetType.equals( "library" ) )
+ } else if( _targetType.equals( "library" ) ) {
return "/dll";
- else
+ } else {
return null;
+ }
}
/**
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
index 1793f516c..fe4b22053 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
@@ -26,8 +26,9 @@ import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
import javax.xml.parsers.SAXParser;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.bcel.*;
-import org.apache.bcel.classfile.*;
+
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.ClassParser;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.types.DirectoryScanner;
import org.apache.tools.ant.Project;
@@ -606,8 +607,9 @@ public class GenericDeploymentTool
while( i.hasNext() )
{
String entryName = (String)i.next();
- if( entryName.endsWith( ".class" ) )
+ if( entryName.endsWith( ".class" ) ) {
newSet.add( entryName.substring( 0, entryName.length() - ".class".length() ).replace( File.separatorChar, '/' ) );
+ }
}
set.addAll( newSet );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
index 259219b35..a6013ab61 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
@@ -943,8 +943,9 @@ public class WebsphereDeploymentTool
" " + tempdir +
" " + destJar.getPath() +
" " + getOptions();
- if( getCombinedClasspath() != null && getCombinedClasspath().toString().length() > 0 )
+ if( getCombinedClasspath() != null && getCombinedClasspath().toString().length() > 0 ) {
args += " -cp " + getCombinedClasspath();
+ }
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
index e8f7cd49a..988cdf0b3 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
@@ -43,7 +43,7 @@ import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.BuildEvent;
import org.apache.tools.ant.BuildListener;
import org.apache.tools.ant.Project;
-import org.apache.tools.ant.util.StringUtils;
+
/**
* This is a simple grafical user interface to provide the information needed by
@@ -1544,26 +1544,33 @@ public class VAJAntToolGUI extends Frame
}
}
// MenuItems
- if( e.getSource() == VAJAntToolGUI.this.getSaveMenuItem() )
+ if( e.getSource() == VAJAntToolGUI.this.getSaveMenuItem() ) {
saveBuildInfo();
- if( e.getSource() == VAJAntToolGUI.this.getAboutMenuItem() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getAboutMenuItem() ) {
getAboutDialog().show();
- if( e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getShowLogMenuItem() ) {
getMessageFrame().show();
+ }
/*
* #### About dialog ####
*/
- if( e.getSource() == VAJAntToolGUI.this.getAboutOkButton() )
+ if( e.getSource() == VAJAntToolGUI.this.getAboutOkButton() ) {
getAboutDialog().dispose();
+ }
/*
* #### Log frame ####
*/
- if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() )
+ if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() ) {
getMessageFrame().dispose();
- if( e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getMessageClearLogButton() ) {
getMessageTextArea().setText( "" );
- if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getMessageOkButton() ) {
getMessageFrame().dispose();
+ }
}
catch( Throwable exc )
{
@@ -1580,12 +1587,15 @@ public class VAJAntToolGUI extends Frame
{
try
{
- if( e.getSource() == VAJAntToolGUI.this.getTargetList() )
+ if( e.getSource() == VAJAntToolGUI.this.getTargetList() ) {
getBuildButton().setEnabled( true );
- if( e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getMessageOutputLevelChoice() ) {
getBuildInfo().setOutputMessageLevel( getMessageOutputLevelChoice().getSelectedIndex() );
- if( e.getSource() == VAJAntToolGUI.this.getTargetList() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getTargetList() ) {
getBuildInfo().setTarget( getTargetList().getSelectedItem() );
+ }
}
catch( Throwable exc )
{
@@ -1600,10 +1610,12 @@ public class VAJAntToolGUI extends Frame
*/
public void propertyChange( java.beans.PropertyChangeEvent evt )
{
- if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "projectName" ) ) )
+ if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "projectName" ) ) ) {
connectProjectNameToLabel();
- if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "buildFileName" ) ) )
+ }
+ if( evt.getSource() == VAJAntToolGUI.this.getBuildInfo() && ( evt.getPropertyName().equals( "buildFileName" ) ) ) {
connectBuildFileNameToTextField();
+ }
}
/**
@@ -1613,8 +1625,9 @@ public class VAJAntToolGUI extends Frame
*/
public void textValueChanged( TextEvent e )
{
- if( e.getSource() == VAJAntToolGUI.this.getBuildFileTextField() )
+ if( e.getSource() == VAJAntToolGUI.this.getBuildFileTextField() ) {
connectTextFieldToBuildFileName();
+ }
}
public void windowActivated( WindowEvent e )
@@ -1639,10 +1652,12 @@ public class VAJAntToolGUI extends Frame
dispose();
System.exit( 0 );
}
- if( e.getSource() == VAJAntToolGUI.this.getAboutDialog() )
+ if( e.getSource() == VAJAntToolGUI.this.getAboutDialog() ) {
getAboutDialog().dispose();
- if( e.getSource() == VAJAntToolGUI.this.getMessageFrame() )
+ }
+ if( e.getSource() == VAJAntToolGUI.this.getMessageFrame() ) {
getMessageFrame().dispose();
+ }
}
catch( Throwable exc )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
index 7221f1378..f300241ee 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
@@ -14,7 +14,7 @@ import java.util.Hashtable;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.exec.Execute2;
-import org.apache.tools.ant.types.Argument;
+
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
index 91f944d8a..182a57fd8 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
@@ -14,8 +14,8 @@ import java.util.Hashtable;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.exec.Execute2;
-import org.apache.tools.ant.types.Argument;
-import org.apache.tools.ant.types.Commandline;
+
+
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.types.PathUtil;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
index e63985367..3f7c982a2 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
@@ -14,7 +14,7 @@ import java.io.PrintWriter;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.exec.Execute2;
-import org.apache.tools.ant.types.Argument;
+
import org.apache.tools.ant.types.CommandlineJava;
import org.apache.tools.ant.types.Path;
import org.apache.tools.ant.util.FileUtils;
@@ -232,8 +232,9 @@ public class JDependTask
File f = new File( elements[ i ] );
// not necessary as JDepend would fail, but why loose some time?
- if( !f.exists() || !f.isDirectory() )
+ if( !f.exists() || !f.isDirectory() ) {
throw new TaskException( "\"" + f.getPath() + "\" does not represent a valid directory. JDepend would fail." );
+ }
commandline.addArgument( f.getPath() );
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
index c18eb3669..696a03e6d 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
@@ -101,10 +101,11 @@ public class JspC extends MatchingTask
public void setClasspath( Path cp )
throws TaskException
{
- if( classpath == null )
+ if( classpath == null ) {
classpath = cp;
- else
+ } else {
classpath.append( cp );
+ }
}
/**
@@ -298,8 +299,9 @@ public class JspC extends MatchingTask
public Path createClasspath()
throws TaskException
{
- if( classpath == null )
+ if( classpath == null ) {
classpath = new Path();
+ }
Path path1 = classpath;
final Path path = new Path();
path1.addPath( path );
@@ -332,9 +334,9 @@ public class JspC extends MatchingTask
// calculate where the files will end up:
File dest = null;
- if( packageName == null )
+ if( packageName == null ) {
dest = destDir;
- else
+ } else
{
String path = destDir.getPath() + File.separatorChar +
packageName.replace( '.', File.separatorChar );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
index d1b172f29..b4ef1148a 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
@@ -37,12 +37,14 @@ public class JasperC
// the project log
//FIXME
Java java = null;//(Java)( getJspc().getProject() ).createTask( "java" );
- if( getJspc().getClasspath() != null )
+ if( getJspc().getClasspath() != null ) {
java.addClasspath( getJspc().getClasspath() );
+ }
java.setClassname( "org.apache.jasper.JspC" );
String args[] = cmd.getArguments();
- for( int i = 0; i < args.length; i++ )
+ for( int i = 0; i < args.length; i++ ) {
java.addArg( new Argument( args[ i ] ) );
+ }
java.execute();
return true;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
index 650497916..d3b374017 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
@@ -13,7 +13,7 @@ import java.util.Arrays;
import java.util.Iterator;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.types.DirectoryScanner;
-import org.apache.tools.ant.Project;
+
import org.apache.tools.ant.types.FileSet;
/**
@@ -47,7 +47,7 @@ public final class BatchTest extends BaseTest
* @param filename the filename to "convert" to a classname.
* @return the classname matching the filename.
*/
- public final static String javaToClass( String filename )
+ public static final String javaToClass( String filename )
{
return filename.replace( File.separatorChar, '.' );
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java
index 674cea5d9..1da4fea99 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java
@@ -97,7 +97,7 @@ public final class DOMUtil
* parent .
* @return the cloned node that is appended to parent
*/
- public final static Node importNode( Node parent, Node child )
+ public static final Node importNode( Node parent, Node child )
{
Node copy = null;
final Document doc = parent.getOwnerDocument();
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
index 3900b105b..5f885a93f 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
@@ -665,8 +665,9 @@ public class JUnitTask extends Task
}
finally
{
- if( !propsFile.delete() )
+ if( !propsFile.delete() ) {
throw new TaskException( "Could not delete temporary properties file." );
+ }
}
return retVal;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
index d782605cc..814ea63b9 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
@@ -15,7 +15,7 @@ import java.text.NumberFormat;
import java.util.Hashtable;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
-import junit.framework.TestCase;
+
import org.apache.avalon.excalibur.util.StringUtil;
import org.apache.myrmidon.api.TaskException;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
index 4876b5bb3..c2c8d2591 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
@@ -18,7 +18,7 @@ import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import junit.framework.AssertionFailedError;
import junit.framework.Test;
-import junit.framework.TestCase;
+
import org.apache.myrmidon.api.TaskException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
index bc171077d..0335e33c3 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
@@ -93,7 +93,7 @@ public abstract class AbstractMetamataTask
* @param dest The feature to be added to the AllArrayList attribute
* @param files The feature to be added to the AllArrayList attribute
*/
- protected final static void addAllArrayList( ArrayList dest, Iterator files )
+ protected static final void addAllArrayList( ArrayList dest, Iterator files )
{
while( files.hasNext() )
{
@@ -101,7 +101,7 @@ public abstract class AbstractMetamataTask
}
}
- protected final static File createTmpFile()
+ protected static final File createTmpFile()
{
// must be compatible with JDK 1.1 !!!!
final long rand = ( new Random( System.currentTimeMillis() ) ).nextLong();
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
index df60dfc39..33f095fb1 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
@@ -53,7 +53,7 @@ public class MParse
*
* @return Description of the Returned Value
*/
- protected final static File createTmpFile()
+ protected static final File createTmpFile()
{
// must be compatible with JDK 1.1 !!!!
final long rand = ( new Random( System.currentTimeMillis() ) ).nextLong();
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/net/FTP.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/net/FTP.java
index 2bff8fdda..485b60d01 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/net/FTP.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/net/FTP.java
@@ -703,8 +703,9 @@ public class FTP
{
File file = resolveFile( new File( dir, filename ).getPath() );
- if( m_newerOnly && isUpToDate( ftp, file, remoteResolveFile( filename ) ) )
+ if( m_newerOnly && isUpToDate( ftp, file, remoteResolveFile( filename ) ) ) {
return;
+ }
if( m_verbose )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
index edd1ca439..bcdc69235 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
@@ -113,15 +113,17 @@ public class MimeMail extends Task
)
throws MessagingException, TaskException
{
- if( ( null == addrList ) || ( addrList.trim().length() <= 0 ) )
+ if( ( null == addrList ) || ( addrList.trim().length() <= 0 ) ) {
return;
+ }
try
{
InternetAddress[] addrArray = InternetAddress.parse( addrList );
- if( ( null == addrArray ) || ( 0 == addrArray.length ) )
+ if( ( null == addrArray ) || ( 0 == addrArray.length ) ) {
throw new TaskException( "Empty " + addrUserName + " recipients list was specified" );
+ }
msg.setRecipients( recipType, addrArray );
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
index af235b609..05689e277 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
@@ -88,8 +88,9 @@ public class P4Add extends P4Base
public void setChangelist( int changelist )
throws TaskException
{
- if( changelist <= 0 )
+ if( changelist <= 0 ) {
throw new TaskException( "P4Add: Changelist# should be a positive number" );
+ }
this.m_changelist = changelist;
}
@@ -97,8 +98,9 @@ public class P4Add extends P4Base
public void setCommandlength( int len )
throws TaskException
{
- if( len <= 0 )
+ if( len <= 0 ) {
throw new TaskException( "P4Add: Commandlength should be a positive number" );
+ }
this.m_cmdLength = len;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
index ed651586f..9112283e6 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
@@ -123,12 +123,13 @@ public abstract class DefaultRmicAdapter
String stubVersion = attributes.getStubVersion();
if( null != stubVersion )
{
- if( "1.1".equals( stubVersion ) )
+ if( "1.1".equals( stubVersion ) ) {
cmd.addArgument( "-v1.1" );
- else if( "1.2".equals( stubVersion ) )
+ } else if( "1.2".equals( stubVersion ) ) {
cmd.addArgument( "-v1.2" );
- else
+ } else {
cmd.addArgument( "-vcompat" );
+ }
}
if( null != attributes.getSourceBase() )
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/security/GenerateKey.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/security/GenerateKey.java
index 7a2e8f368..d9d147fc6 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/security/GenerateKey.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/security/GenerateKey.java
@@ -11,7 +11,7 @@ import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.taskdefs.exec.Execute2;
import org.apache.tools.ant.types.Commandline;
-import org.apache.tools.ant.types.Argument;
+
import java.io.IOException;
/**
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/security/SignJar.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/security/SignJar.java
index c90082f12..a1ce4000f 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/security/SignJar.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/security/SignJar.java
@@ -19,7 +19,7 @@ import org.apache.tools.ant.types.DirectoryScanner;
import org.apache.tools.ant.taskdefs.exec.Execute2;
import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.FileSet;
-import org.apache.tools.ant.types.Argument;
+
/**
* Sign a archive.
@@ -282,8 +282,9 @@ public class SignJar
private void doOneJar( final File jarSource, final File jarTarget )
throws TaskException
{
- if( isUpToDate( jarSource, jarTarget ) )
+ if( isUpToDate( jarSource, jarTarget ) ) {
return;
+ }
final StringBuffer sb = new StringBuffer();
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/Native2Ascii.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/Native2Ascii.java
index d74a4652e..00f3c3af2 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/Native2Ascii.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/Native2Ascii.java
@@ -14,7 +14,7 @@ import org.apache.tools.ant.types.Commandline;
import org.apache.tools.ant.types.DirectoryScanner;
import org.apache.tools.ant.util.mappers.Mapper;
import org.apache.tools.ant.types.SourceFileScanner;
-import org.apache.tools.ant.types.Argument;
+
import org.apache.tools.ant.util.mappers.FileNameMapper;
import org.apache.tools.ant.util.mappers.IdentityMapper;
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java
index 40cb85196..658be5007 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java
@@ -95,8 +95,9 @@ public class ReplaceRegExp extends Task
public void setByLine( String byline )
{
Boolean res = Boolean.valueOf( byline );
- if( res == null )
+ if( res == null ) {
res = Boolean.FALSE;
+ }
this.byline = res.booleanValue();
}
@@ -113,8 +114,9 @@ public class ReplaceRegExp extends Task
public void setMatch( String match )
throws TaskException
{
- if( regex != null )
+ if( regex != null ) {
throw new TaskException( "Only one regular expression is allowed" );
+ }
regex = new RegularExpression();
regex.setPattern( match );
@@ -123,8 +125,9 @@ public class ReplaceRegExp extends Task
public void setReplace( String replace )
throws TaskException
{
- if( subs != null )
+ if( subs != null ) {
throw new TaskException( "Only one substitution expression is allowed" );
+ }
subs = new Substitution();
subs.setExpression( replace );
@@ -138,8 +141,9 @@ public class ReplaceRegExp extends Task
public RegularExpression createRegularExpression()
throws TaskException
{
- if( regex != null )
+ if( regex != null ) {
throw new TaskException( "Only one regular expression is allowed." );
+ }
regex = new RegularExpression();
return regex;
@@ -148,8 +152,9 @@ public class ReplaceRegExp extends Task
public Substitution createSubstitution()
throws TaskException
{
- if( subs != null )
+ if( subs != null ) {
throw new TaskException( "Only one substitution expression is allowed" );
+ }
subs = new Substitution();
return subs;
@@ -158,27 +163,34 @@ public class ReplaceRegExp extends Task
public void execute()
throws TaskException
{
- if( regex == null )
+ if( regex == null ) {
throw new TaskException( "No expression to match." );
- if( subs == null )
+ }
+ if( subs == null ) {
throw new TaskException( "Nothing to replace expression with." );
+ }
- if( file != null && filesets.size() > 0 )
+ if( file != null && filesets.size() > 0 ) {
throw new TaskException( "You cannot supply the 'file' attribute and filesets at the same time." );
+ }
int options = 0;
- if( flags.indexOf( 'g' ) != -1 )
+ if( flags.indexOf( 'g' ) != -1 ) {
options |= Regexp.REPLACE_ALL;
+ }
- if( flags.indexOf( 'i' ) != -1 )
+ if( flags.indexOf( 'i' ) != -1 ) {
options |= Regexp.MATCH_CASE_INSENSITIVE;
+ }
- if( flags.indexOf( 'm' ) != -1 )
+ if( flags.indexOf( 'm' ) != -1 ) {
options |= Regexp.MATCH_MULTILINE;
+ }
- if( flags.indexOf( 's' ) != -1 )
+ if( flags.indexOf( 's' ) != -1 ) {
options |= Regexp.MATCH_SINGLELINE;
+ }
if( file != null && file.exists() )
{
@@ -292,8 +304,9 @@ public class ReplaceRegExp extends Task
while( ( line = lnr.readLine() ) != null )
{
String res = doReplace( regex, subs, line, options );
- if( !res.equals( line ) )
+ if( !res.equals( line ) ) {
changes = true;
+ }
pw.println( res );
}
@@ -314,8 +327,9 @@ public class ReplaceRegExp extends Task
String buf = new String( tmpBuf );
String res = doReplace( regex, subs, buf, options );
- if( !res.equals( buf ) )
+ if( !res.equals( buf ) ) {
changes = true;
+ }
pw.println( res );
pw.flush();
@@ -340,8 +354,9 @@ public class ReplaceRegExp extends Task
{
try
{
- if( r != null )
+ if( r != null ) {
r.close();
+ }
}
catch( Exception e )
{
@@ -350,8 +365,9 @@ public class ReplaceRegExp extends Task
try
{
- if( w != null )
+ if( w != null ) {
r.close();
+ }
}
catch( Exception e )
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Rpm.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Rpm.java
index 3ef75a9e3..fdd32c04a 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Rpm.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/unix/Rpm.java
@@ -13,7 +13,7 @@ import org.apache.myrmidon.api.AbstractTask;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.taskdefs.exec.Execute2;
import org.apache.tools.ant.types.Commandline;
-import org.apache.tools.ant.types.Argument;
+
/**
* @author lucas@collab.net
@@ -93,7 +93,9 @@ public class Rpm
final Execute2 exe = new Execute2();
setupLogger( exe );
- if( m_topDir == null ) m_topDir = getBaseDirectory();
+ if( m_topDir == null ) {
+ m_topDir = getBaseDirectory();
+ }
exe.setWorkingDirectory( m_topDir );
exe.setCommandline( cmd.getCommandline() );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Commandline.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Commandline.java
index c8e1559d7..c45078206 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Commandline.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Commandline.java
@@ -44,8 +44,9 @@ public class Commandline
*/
public void setExecutable( final String executable )
{
- if( executable == null || executable.length() == 0 )
+ if( executable == null || executable.length() == 0 ) {
return;
+ }
m_executable = executable.replace( '/', File.separatorChar )
.replace( '\\', File.separatorChar );
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Path.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Path.java
index cfff27502..545097a52 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Path.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/Path.java
@@ -8,10 +8,10 @@
package org.apache.tools.ant.types;
import java.io.File;
-import java.io.IOException;
-import java.net.URL;
+
+
import java.util.ArrayList;
-import java.util.Locale;
+
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.DataType;
import org.apache.tools.ant.util.FileUtils;
@@ -241,8 +241,9 @@ public class Path
final String[] list = list();
// empty path return empty string
- if( list.length == 0 )
+ if( list.length == 0 ) {
return "";
+ }
// path containing one or more elements
final StringBuffer result = new StringBuffer( list[ 0 ].toString() );
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/PathElement.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/PathElement.java
index 955cbb03a..28a6e8acb 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/PathElement.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/PathElement.java
@@ -9,7 +9,7 @@ package org.apache.tools.ant.types;
import java.io.File;
import org.apache.tools.ant.util.FileUtils;
-import org.apache.avalon.framework.logger.Logger;
+
import org.apache.myrmidon.api.TaskException;
/**
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/PatternSet.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/PatternSet.java
index 10d532879..306a9d421 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/PatternSet.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/PatternSet.java
@@ -252,10 +252,11 @@ public class PatternSet
if( fileName != null )
{
File inclFile = resolveFile( fileName );
- if( !inclFile.exists() )
+ if( !inclFile.exists() ) {
throw new TaskException( "Includesfile "
+ inclFile.getAbsolutePath()
+ " not found." );
+ }
readPatterns( inclFile, m_includeList, p );
}
}
@@ -272,10 +273,11 @@ public class PatternSet
if( fileName != null )
{
File exclFile = resolveFile( fileName );
- if( !exclFile.exists() )
+ if( !exclFile.exists() ) {
throw new TaskException( "Excludesfile "
+ exclFile.getAbsolutePath()
+ " not found." );
+ }
readPatterns( exclFile, m_excludeList, p );
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/SysProperties.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/SysProperties.java
index aa34aed3d..31165062c 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/types/SysProperties.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/types/SysProperties.java
@@ -55,8 +55,9 @@ public class SysProperties
throw new TaskException( ee.getMessage(), ee );
}
- if( props == null )
+ if( props == null ) {
return null;
+ }
for( int i = 0; i < props.length; i++ )
{
@@ -82,8 +83,9 @@ public class SysProperties
public void restoreSystem()
throws TaskException
{
- if( m_system == null )
+ if( m_system == null ) {
throw new TaskException( "Unbalanced nesting of SysProperties" );
+ }
try
{
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java
index 9689328fe..576f7a05e 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileUtils.java
@@ -385,8 +385,9 @@ public class FileUtils
*/
public static String translateFile( final String source )
{
- if( source == null )
+ if( source == null ) {
return "";
+ }
final StringBuffer result = new StringBuffer( source );
translateFileSep( result );
@@ -422,8 +423,9 @@ public class FileUtils
throws TaskException
{
final ArrayList result = new ArrayList();
- if( source == null )
+ if( source == null ) {
return new String[ 0 ];
+ }
final String[] elements = parsePath( source );
StringBuffer element = new StringBuffer();
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/depend/Dependencies.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/depend/Dependencies.java
index c45c77552..ace1fc7c6 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/depend/Dependencies.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/depend/Dependencies.java
@@ -14,8 +14,41 @@ import java.util.Iterator;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.TreeSet;
-import org.apache.bcel.*;
-import org.apache.bcel.classfile.*;
+
+import org.apache.bcel.classfile.Visitor;
+import org.apache.bcel.classfile.ConstantPool;
+import org.apache.bcel.classfile.JavaClass;
+import org.apache.bcel.classfile.ClassParser;
+import org.apache.bcel.classfile.Code;
+import org.apache.bcel.classfile.CodeException;
+import org.apache.bcel.classfile.ConstantClass;
+import org.apache.bcel.classfile.ConstantDouble;
+import org.apache.bcel.classfile.ConstantFieldref;
+import org.apache.bcel.classfile.ConstantFloat;
+import org.apache.bcel.classfile.ConstantInteger;
+import org.apache.bcel.classfile.ConstantInterfaceMethodref;
+import org.apache.bcel.classfile.ConstantLong;
+import org.apache.bcel.classfile.ConstantMethodref;
+import org.apache.bcel.classfile.ConstantNameAndType;
+import org.apache.bcel.classfile.Constant;
+import org.apache.bcel.classfile.ConstantString;
+import org.apache.bcel.classfile.ConstantUtf8;
+import org.apache.bcel.classfile.ConstantValue;
+import org.apache.bcel.classfile.Deprecated;
+import org.apache.bcel.classfile.ExceptionTable;
+import org.apache.bcel.classfile.Field;
+import org.apache.bcel.classfile.InnerClass;
+import org.apache.bcel.classfile.InnerClasses;
+import org.apache.bcel.classfile.Method;
+import org.apache.bcel.classfile.LineNumber;
+import org.apache.bcel.classfile.LineNumberTable;
+import org.apache.bcel.classfile.LocalVariable;
+import org.apache.bcel.classfile.LocalVariableTable;
+import org.apache.bcel.classfile.SourceFile;
+import org.apache.bcel.classfile.StackMap;
+import org.apache.bcel.classfile.StackMapEntry;
+import org.apache.bcel.classfile.Synthetic;
+import org.apache.bcel.classfile.Unknown;
public class Dependencies implements Visitor
{
@@ -63,8 +96,9 @@ public class Dependencies implements Visitor
for( int i = o; i < args.length; i++ )
{
String fileName = args[ i ].substring( 0, args[ i ].length() - ".class".length() );
- if( base != null && fileName.startsWith( base ) )
+ if( base != null && fileName.startsWith( base ) ) {
fileName = fileName.substring( base.length() );
+ }
newSet.add( fileName );
}
set.addAll( newSet );
@@ -94,8 +128,9 @@ public class Dependencies implements Visitor
public boolean accept( Object object )
{
String fileName = object + ".class";
- if( base != null )
+ if( base != null ) {
fileName = base + fileName;
+ }
return new File( fileName ).exists();
}
} );
@@ -178,8 +213,9 @@ public class Dependencies implements Visitor
public void visitConstantPool( ConstantPool obj )
{
- if( verbose )
+ if( verbose ) {
System.out.println( "visit ConstantPool" );
+ }
this.constantPool = obj;
// visit constants
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
index d0ebdee30..8c3f7f666 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
@@ -124,12 +124,15 @@ public class JakartaRegexpMatcher implements RegexpMatcher
{
int cOptions = RE.MATCH_NORMAL;
- if( RegexpUtil.hasFlag( options, MATCH_CASE_INSENSITIVE ) )
+ if( RegexpUtil.hasFlag( options, MATCH_CASE_INSENSITIVE ) ) {
cOptions |= RE.MATCH_CASEINDEPENDENT;
- if( RegexpUtil.hasFlag( options, MATCH_MULTILINE ) )
+ }
+ if( RegexpUtil.hasFlag( options, MATCH_MULTILINE ) ) {
cOptions |= RE.MATCH_MULTILINE;
- if( RegexpUtil.hasFlag( options, MATCH_SINGLELINE ) )
+ }
+ if( RegexpUtil.hasFlag( options, MATCH_SINGLELINE ) ) {
cOptions |= RE.MATCH_SINGLELINE;
+ }
return cOptions;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
index 3772ff660..343fa5483 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
@@ -71,8 +71,9 @@ public class JakartaRegexpRegexp extends JakartaRegexpMatcher implements Regexp
protected int getSubsOptions( int options )
{
int subsOptions = RE.REPLACE_FIRSTONLY;
- if( RegexpUtil.hasFlag( options, REPLACE_ALL ) )
+ if( RegexpUtil.hasFlag( options, REPLACE_ALL ) ) {
subsOptions = RE.REPLACE_ALL;
+ }
return subsOptions;
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
index 45af5c260..dbefcecf9 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
@@ -148,12 +148,15 @@ public class Jdk14RegexpMatcher implements RegexpMatcher
{
int cOptions = 0;
- if( RegexpUtil.hasFlag( options, MATCH_CASE_INSENSITIVE ) )
+ if( RegexpUtil.hasFlag( options, MATCH_CASE_INSENSITIVE ) ) {
cOptions |= Pattern.CASE_INSENSITIVE;
- if( RegexpUtil.hasFlag( options, MATCH_MULTILINE ) )
+ }
+ if( RegexpUtil.hasFlag( options, MATCH_MULTILINE ) ) {
cOptions |= Pattern.MULTILINE;
- if( RegexpUtil.hasFlag( options, MATCH_SINGLELINE ) )
+ }
+ if( RegexpUtil.hasFlag( options, MATCH_SINGLELINE ) ) {
cOptions |= Pattern.DOTALL;
+ }
return cOptions;
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
index 594f22d55..f41e6f620 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
@@ -91,8 +91,9 @@ public class Jdk14RegexpRegexp extends Jdk14RegexpMatcher implements Regexp
protected int getSubsOptions( int options )
{
int subsOptions = REPLACE_FIRST;
- if( RegexpUtil.hasFlag( options, REPLACE_ALL ) )
+ if( RegexpUtil.hasFlag( options, REPLACE_ALL ) ) {
subsOptions = REPLACE_ALL;
+ }
return subsOptions;
}
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
index ccc41cbdf..50f480ab2 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
@@ -21,9 +21,9 @@ import org.apache.myrmidon.api.TaskException;
*/
public class RegexpMatcherFactory
{
- protected static final String JAKARTA_REGEXP = "org.apache.tools.ant.util.regexp.JakartaRegexpRegexp";
- protected static final String JAKARTA_ORO = "org.apache.tools.ant.util.regexp.JakartaOroRegexp";
- protected static final String JDK14_REGEXP = "org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp";
+ protected final static String JAKARTA_REGEXP = "org.apache.tools.ant.util.regexp.JakartaRegexpRegexp";
+ protected final static String JAKARTA_ORO = "org.apache.tools.ant.util.regexp.JakartaOroRegexp";
+ protected final static String JDK14_REGEXP = "org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp";
/**
* Create a new regular expression instance.
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/RegexpUtil.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/RegexpUtil.java
index cde75ed8b..83c56037a 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/RegexpUtil.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/util/regexp/RegexpUtil.java
@@ -14,12 +14,12 @@ package org.apache.tools.ant.util.regexp;
*/
public class RegexpUtil extends Object
{
- public final static boolean hasFlag( int options, int flag )
+ public static final boolean hasFlag( int options, int flag )
{
return ( ( options & flag ) > 0 );
}
- public final static int removeFlag( int options, int flag )
+ public static final int removeFlag( int options, int flag )
{
return ( options & ( 0xFFFFFFFF - flag ) );
}
diff --git a/proposal/myrmidon/src/todo/org/apache/tools/mail/MailMessage.java b/proposal/myrmidon/src/todo/org/apache/tools/mail/MailMessage.java
index 62580f1f4..95cca6652 100644
--- a/proposal/myrmidon/src/todo/org/apache/tools/mail/MailMessage.java
+++ b/proposal/myrmidon/src/todo/org/apache/tools/mail/MailMessage.java
@@ -373,12 +373,15 @@ public class MailMessage
void disconnect()
throws IOException
{
- if( out != null )
+ if( out != null ) {
out.close();
- if( in != null )
+ }
+ if( in != null ) {
in.close();
- if( socket != null )
+ }
+ if( socket != null ) {
socket.close();
+ }
}
void flushHeaders()