sbailliez 02/01/20 09:35:02
Modified:
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata
AbstractMetamataTask.java MParse.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional
Cab.java Entry.java Javah.java ManifestFile.java
NetRexxC.java Script.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
Available.java Get.java Java.java PathConvert.java
Property.java SQLExec.java Tar.java UpToDate.java
Zip.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit
BatchTest.java DOMUtil.java JUnitTask.java
PlainJUnitResultFormatter.java
XMLJUnitResultFormatter.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb
GenericDeploymentTool.java
WebsphereDeploymentTool.java
proposal/myrmidon/src/main/org/apache/tools/ant/types
Commandline.java Path.java PathElement.java
PatternSet.java SysProperties.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet
CSharp.java Ilasm.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic
DefaultRmicAdapter.java
proposal/myrmidon/src/main/org/apache/tools/ant/util/depend
Dependencies.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec
ExecTask.java
proposal/myrmidon/src/main/org/apache/tools/ant/util
FileUtils.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text
Native2Ascii.java ReplaceRegExp.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net
FTP.java MimeMail.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security
GenerateKey.java SignJar.java
proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp
JakartaRegexpMatcher.java JakartaRegexpRegexp.java
Jdk14RegexpMatcher.java Jdk14RegexpRegexp.java
RegexpMatcherFactory.java RegexpUtil.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers
JasperC.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc
JavaCC.java JJTree.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc
Javadoc.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend
JDependTask.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers
Jikes.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp
JspC.java
proposal/myrmidon/src/main/org/apache/tools/mail
MailMessage.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file
Move.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce
P4Add.java
proposal/myrmidon/src/main/org/apache/tools/ant Project.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix
Rpm.java
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide
VAJAntToolGUI.java
Log:
- Fix order of modifiers
- Fix duplicate/unecessary imports
- Fix single if/else and loop without block
Revision Changes Path
1.21 +2 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
Index: AbstractMetamataTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- AbstractMetamataTask.java 20 Jan 2002 02:36:21 -0000 1.20
+++ AbstractMetamataTask.java 20 Jan 2002 17:34:59 -0000 1.21
@@ -93,7 +93,7 @@
* @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 @@
}
}
- 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();
1.20 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
Index: MParse.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- MParse.java 20 Jan 2002 02:36:21 -0000 1.19
+++ MParse.java 20 Jan 2002 17:34:59 -0000 1.20
@@ -53,7 +53,7 @@
*
* @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();
1.21 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java
Index: Cab.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Cab.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- Cab.java 20 Jan 2002 02:36:21 -0000 1.20
+++ Cab.java 20 Jan 2002 17:34:59 -0000 1.21
@@ -195,8 +195,9 @@
{
String file = files.get( i ).toString();
if( new File( m_baseDir, file ).lastModified() >
- m_cabFile.lastModified() )
+ m_cabFile.lastModified() ) {
upToDate = false;
+ }
}
return upToDate;
}
1.2 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Entry.java
Index: Entry.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Entry.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Entry.java 6 Jan 2002 02:14:32 -0000 1.1
+++ Entry.java 20 Jan 2002 17:34:59 -0000 1.2
@@ -159,8 +159,9 @@
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
1.20 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
Index: Javah.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Javah.java 20 Jan 2002 02:11:43 -0000 1.19
+++ Javah.java 20 Jan 2002 17:34:59 -0000 1.20
@@ -12,7 +12,7 @@
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;
1.10 +6 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
Index: ManifestFile.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ManifestFile.java 6 Jan 2002 02:15:18 -0000 1.9
+++ ManifestFile.java 20 Jan 2002 17:34:59 -0000 1.10
@@ -89,8 +89,9 @@
throws TaskException
{
checkParameters();
- if( isUpdate( currentMethod ) )
+ if( isUpdate( currentMethod ) ) {
readFile();
+ }
executeOperation();
writeFile();
@@ -202,8 +203,9 @@
{
stop = true;
}
- else
+ else {
buffer.append( (char)c );
+ }
}
fis.close();
StringTokenizer lineTokens = getLineTokens( buffer );
@@ -315,8 +317,9 @@
Entry ent = new Entry();
boolean result = false;
int res = ent.compare( this, (Entry)obj );
- if( res == 0 )
+ if( res == 0 ) {
result = true;
+ }
return result;
}
1.13 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java
Index: NetRexxC.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/NetRexxC.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- NetRexxC.java 12 Jan 2002 23:54:23 -0000 1.12
+++ NetRexxC.java 20 Jan 2002 17:34:59 -0000 1.13
@@ -169,8 +169,9 @@
public void setCompile( boolean compile )
{
this.compile = compile;
- if( !this.compile && !this.keep )
+ if( !this.compile && !this.keep ) {
this.keep = true;
+ }
}
/**
1.13 +6 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java
Index: Script.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Script.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Script.java 6 Jan 2002 02:13:47 -0000 1.12
+++ Script.java 20 Jan 2002 17:34:59 -0000 1.13
@@ -46,8 +46,9 @@
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 @@
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 ) );
+ }
}
}
}
1.19 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
Index: Available.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Available.java 20 Jan 2002 09:53:53 -0000 1.18
+++ Available.java 20 Jan 2002 17:35:00 -0000 1.19
@@ -13,7 +13,7 @@
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;
1.14 +8 -4
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java
Index: Get.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Get.java 1 Jan 2002 06:22:30 -0000 1.13
+++ Get.java 20 Jan 2002 17:35:00 -0000 1.14
@@ -239,8 +239,9 @@
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 @@
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 @@
catch( IOException ioe )
{
getLogger().info( "Error getting " + source + " to " + dest );
- if( ignoreErrors )
+ if( ignoreErrors ) {
return;
+ }
throw new TaskException( "Error", ioe );
}
}
1.25 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
Index: Java.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- Java.java 20 Jan 2002 02:11:42 -0000 1.24
+++ Java.java 20 Jan 2002 17:35:00 -0000 1.25
@@ -13,7 +13,7 @@
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;
1.13 +8 -4
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
Index: PathConvert.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- PathConvert.java 17 Jan 2002 08:04:54 -0000 1.12
+++ PathConvert.java 20 Jan 2002 17:35:00 -0000 1.13
@@ -149,8 +149,9 @@
elem = elem.replace( fromDirSep, toDirSep );
- if( i != 0 )
+ if( i != 0 ) {
rslt.append( m_pathSep );
+ }
rslt.append( elem );
}
@@ -209,16 +210,19 @@
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.
1.27 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
Index: Property.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- Property.java 20 Jan 2002 09:54:08 -0000 1.26
+++ Property.java 20 Jan 2002 17:35:00 -0000 1.27
@@ -79,8 +79,9 @@
setProperty( m_name, m_value );
}
- if( m_resource != null )
+ if( m_resource != null ) {
loadResource( m_resource );
+ }
}
private void validate() throws TaskException
1.22 +14 -7
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
Index: SQLExec.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- SQLExec.java 20 Jan 2002 09:54:08 -0000 1.21
+++ SQLExec.java 20 Jan 2002 17:35:00 -0000 1.22
@@ -468,8 +468,9 @@
throw new SQLException( "No suitable Driver for " + url );
}
- if( !isValidRdbms( conn ) )
+ if( !isValidRdbms( conn ) ) {
return;
+ }
conn.setAutoCommit( autocommit );
@@ -563,8 +564,9 @@
*/
protected boolean isValidRdbms( Connection conn )
{
- if( rdbms == null && version == null )
+ if( rdbms == null && version == null ) {
return true;
+ }
try
{
@@ -617,8 +619,9 @@
throws SQLException
{
// Check and ignore empty statements
- if( "".equals( sql.trim() ) )
+ if( "".equals( sql.trim() ) ) {
return;
+ }
try
{
@@ -647,8 +650,9 @@
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 @@
{
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 @@
// 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 ) )
1.19 +5 -4
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java
Index: Tar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- Tar.java 20 Jan 2002 02:36:20 -0000 1.18
+++ Tar.java 20 Jan 2002 17:35:00 -0000 1.19
@@ -14,9 +14,9 @@
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 @@
}
finally
{
- if( input != null )
+ if( input != null ) {
input.close();
+ }
}
}
}
1.18 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
Index: UpToDate.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- UpToDate.java 20 Jan 2002 02:36:20 -0000 1.17
+++ UpToDate.java 20 Jan 2002 17:35:00 -0000 1.18
@@ -119,8 +119,9 @@
}
// 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;
1.18 +12 -6
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java
Index: Zip.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Zip.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- Zip.java 20 Jan 2002 02:36:20 -0000 1.17
+++ Zip.java 20 Jan 2002 17:35:00 -0000 1.18
@@ -349,8 +349,9 @@
// 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 @@
}
}
- if( !zipFile.exists() )
+ if( !zipFile.exists() ) {
return false;
+ }
final SourceFileScanner scanner = new SourceFileScanner();
setupLogger( scanner );
@@ -490,15 +492,17 @@
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 @@
// 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 @@
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();
1.9 +2 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java
Index: BatchTest.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/BatchTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- BatchTest.java 13 Jan 2002 00:02:30 -0000 1.8
+++ BatchTest.java 20 Jan 2002 17:35:00 -0000 1.9
@@ -13,7 +13,7 @@
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 @@
* @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, '.' );
}
1.6 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java
Index: DOMUtil.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/DOMUtil.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DOMUtil.java 6 Jan 2002 02:28:02 -0000 1.5
+++ DOMUtil.java 20 Jan 2002 17:35:00 -0000 1.6
@@ -97,7 +97,7 @@
* <tt>parent</tt> .
* @return the cloned node that is appended to <tt>parent</tt>
*/
- 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();
1.30 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
Index: JUnitTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- JUnitTask.java 20 Jan 2002 09:58:35 -0000 1.29
+++ JUnitTask.java 20 Jan 2002 17:35:00 -0000 1.30
@@ -665,8 +665,9 @@
}
finally
{
- if( !propsFile.delete() )
+ if( !propsFile.delete() ) {
throw new TaskException( "Could not delete temporary
properties file." );
+ }
}
return retVal;
1.5 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java
Index: PlainJUnitResultFormatter.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/PlainJUnitResultFormatter.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PlainJUnitResultFormatter.java 30 Dec 2001 09:25:51 -0000 1.4
+++ PlainJUnitResultFormatter.java 20 Jan 2002 17:35:00 -0000 1.5
@@ -15,7 +15,7 @@
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;
1.9 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java
Index: XMLJUnitResultFormatter.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- XMLJUnitResultFormatter.java 14 Jan 2002 00:59:40 -0000 1.8
+++ XMLJUnitResultFormatter.java 20 Jan 2002 17:35:00 -0000 1.9
@@ -18,7 +18,7 @@
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;
1.16 +5 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java
Index: GenericDeploymentTool.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/GenericDeploymentTool.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- GenericDeploymentTool.java 20 Jan 2002 09:58:35 -0000 1.15
+++ GenericDeploymentTool.java 20 Jan 2002 17:35:00 -0000 1.16
@@ -26,8 +26,9 @@
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 @@
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 );
1.16 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
Index: WebsphereDeploymentTool.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- WebsphereDeploymentTool.java 20 Jan 2002 09:58:35 -0000 1.15
+++ WebsphereDeploymentTool.java 20 Jan 2002 17:35:00 -0000 1.16
@@ -943,8 +943,9 @@
" " + tempdir +
" " + destJar.getPath() +
" " + getOptions();
- if( getCombinedClasspath() != null &&
getCombinedClasspath().toString().length() > 0 )
+ if( getCombinedClasspath() != null &&
getCombinedClasspath().toString().length() > 0 ) {
args += " -cp " + getCombinedClasspath();
+ }
1.12 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Commandline.java
Index: Commandline.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Commandline.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- Commandline.java 20 Jan 2002 02:36:21 -0000 1.11
+++ Commandline.java 20 Jan 2002 17:35:00 -0000 1.12
@@ -44,8 +44,9 @@
*/
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 );
}
1.20 +5 -4
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java
Index: Path.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Path.java 20 Jan 2002 09:55:47 -0000 1.19
+++ Path.java 20 Jan 2002 17:35:00 -0000 1.20
@@ -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 @@
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() );
1.3 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/PathElement.java
Index: PathElement.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/PathElement.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PathElement.java 19 Jan 2002 07:26:22 -0000 1.2
+++ PathElement.java 20 Jan 2002 17:35:00 -0000 1.3
@@ -9,7 +9,7 @@
import java.io.File;
import org.apache.tools.ant.util.FileUtils;
-import org.apache.avalon.framework.logger.Logger;
+
import org.apache.myrmidon.api.TaskException;
/**
1.11 +4 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/PatternSet.java
Index: PatternSet.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/PatternSet.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- PatternSet.java 13 Jan 2002 05:38:01 -0000 1.10
+++ PatternSet.java 20 Jan 2002 17:35:00 -0000 1.11
@@ -252,10 +252,11 @@
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 @@
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 );
}
}
1.3 +4 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/SysProperties.java
Index: SysProperties.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/SysProperties.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SysProperties.java 12 Jan 2002 05:01:23 -0000 1.2
+++ SysProperties.java 20 Jan 2002 17:35:00 -0000 1.3
@@ -55,8 +55,9 @@
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 void restoreSystem()
throws TaskException
{
- if( m_system == null )
+ if( m_system == null ) {
throw new TaskException( "Unbalanced nesting of SysProperties" );
+ }
try
{
1.13 +42 -25
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
Index: CSharp.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- CSharp.java 20 Jan 2002 09:58:35 -0000 1.12
+++ CSharp.java 20 Jan 2002 17:35:01 -0000 1.13
@@ -420,8 +420,9 @@
throws TaskException
{
//demand create pathlist
- if( _referenceFiles == null )
+ if( _referenceFiles == null ) {
_referenceFiles = new Path();
+ }
_referenceFiles.append( path );
}
@@ -461,8 +462,9 @@
{
_targetType = targetType;
}
- else
+ else {
throw new TaskException( "targetType " + targetType + " is not a
valid type" );
+ }
}
/**
@@ -648,7 +650,9 @@
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 @@
*/
protected String getAdditionalModulesParameter()
{
- if( notEmpty( _additionalModules ) )
+ if( notEmpty( _additionalModules ) ) {
return "/addmodule:" + _additionalModules;
- else
+ } else {
return null;
+ }
}
/**
@@ -735,8 +740,9 @@
s.append( DEFAULT_REFERENCE_LIST );
return new String( s );
}
- else
+ else {
return null;
+ }
}
/**
@@ -746,10 +752,11 @@
*/
protected String getDefinitionsParameter()
{
- if( notEmpty( _definitions ) )
+ if( notEmpty( _definitions ) ) {
return "/define:" + _definitions;
- else
+ } else {
return null;
+ }
}
/**
@@ -759,10 +766,11 @@
*/
protected String getDocFileParameter()
{
- if( _docFile != null )
+ if( _docFile != null ) {
return "/doc:" + _docFile.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -772,10 +780,11 @@
*/
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 @@
*/
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 @@
File f = _outputFile;
return "/out:" + f.toString();
}
- else
+ else {
return null;
+ }
}
/**
@@ -855,16 +866,18 @@
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 @@
protected String getReferencesParameter()
{
//bail on no references
- if( notEmpty( _references ) )
+ if( notEmpty( _references ) ) {
return "/reference:" + _references;
- else
+ } else {
return null;
+ }
}
/**
@@ -892,10 +906,11 @@
*/
protected String getTargetTypeParameter()
{
- if( notEmpty( _targetType ) )
+ if( notEmpty( _targetType ) ) {
return "/target:" + _targetType;
- else
+ } else {
return null;
+ }
}
/**
@@ -930,10 +945,11 @@
*/
protected String getWin32IconParameter()
{
- if( _win32icon != null )
+ if( _win32icon != null ) {
return "/win32icon:" + _win32icon.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -943,10 +959,11 @@
*/
protected String getWin32ResParameter()
{
- if( _win32res != null )
+ if( _win32res != null ) {
return "/win32res:" + _win32res.toString();
- else
+ } else {
return null;
+ }
}
/**
1.10 +19 -11
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
Index: Ilasm.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Ilasm.java 12 Jan 2002 23:51:07 -0000 1.9
+++ Ilasm.java 20 Jan 2002 17:35:01 -0000 1.10
@@ -226,8 +226,9 @@
{
_targetType = targetType;
}
- else
+ else {
throw new TaskException( "targetType " + targetType + " is not a
valid type" );
+ }
}
/**
@@ -305,7 +306,9 @@
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 @@
*/
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 @@
*/
protected String getKeyfileParameter()
{
- if( _keyfile != null )
+ if( _keyfile != null ) {
return "/keyfile:" + _keyfile.toString();
- else
+ } else {
return null;
+ }
}
/**
@@ -408,8 +413,9 @@
*/
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 @@
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;
+ }
}
/**
1.13 +4 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
Index: DefaultRmicAdapter.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- DefaultRmicAdapter.java 20 Jan 2002 02:11:44 -0000 1.12
+++ DefaultRmicAdapter.java 20 Jan 2002 17:35:01 -0000 1.13
@@ -123,12 +123,13 @@
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() )
1.4 +41 -5
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/depend/Dependencies.java
Index: Dependencies.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/depend/Dependencies.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Dependencies.java 23 Dec 2001 06:32:30 -0000 1.3
+++ Dependencies.java 20 Jan 2002 17:35:01 -0000 1.4
@@ -14,8 +14,41 @@
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 @@
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 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 void visitConstantPool( ConstantPool obj )
{
- if( verbose )
+ if( verbose ) {
System.out.println( "visit ConstantPool" );
+ }
this.constantPool = obj;
// visit constants
1.18 +7 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecTask.java
Index: ExecTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecTask.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ExecTask.java 20 Jan 2002 03:23:55 -0000 1.17
+++ ExecTask.java 20 Jan 2002 17:35:01 -0000 1.18
@@ -313,10 +313,12 @@
{
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 @@
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() );
1.18 +5 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java
Index: FileUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/FileUtils.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- FileUtils.java 20 Jan 2002 09:54:46 -0000 1.17
+++ FileUtils.java 20 Jan 2002 17:35:01 -0000 1.18
@@ -32,7 +32,7 @@
* @author [EMAIL PROTECTED]
* @author <a href="mailto:[EMAIL PROTECTED]">Conor MacNeill</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stefan Bodewig</a>
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
*/
public class FileUtils
{
@@ -385,8 +385,9 @@
*/
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 @@
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();
1.6 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/Native2Ascii.java
Index: Native2Ascii.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/Native2Ascii.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Native2Ascii.java 20 Jan 2002 02:36:21 -0000 1.5
+++ Native2Ascii.java 20 Jan 2002 17:35:01 -0000 1.6
@@ -14,7 +14,7 @@
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;
1.5 +32 -16
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java
Index: ReplaceRegExp.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/ReplaceRegExp.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ReplaceRegExp.java 12 Jan 2002 23:42:21 -0000 1.4
+++ ReplaceRegExp.java 20 Jan 2002 17:35:01 -0000 1.5
@@ -95,8 +95,9 @@
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 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 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 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 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 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 @@
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 @@
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 @@
{
try
{
- if( r != null )
+ if( r != null ) {
r.close();
+ }
}
catch( Exception e )
{
@@ -350,8 +365,9 @@
try
{
- if( w != null )
+ if( w != null ) {
r.close();
+ }
}
catch( Exception e )
{
1.13 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
Index: FTP.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- FTP.java 12 Jan 2002 23:38:00 -0000 1.12
+++ FTP.java 20 Jan 2002 17:35:01 -0000 1.13
@@ -703,8 +703,9 @@
{
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 )
{
1.13 +4 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java
Index: MimeMail.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/net/MimeMail.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- MimeMail.java 14 Jan 2002 00:59:41 -0000 1.12
+++ MimeMail.java 20 Jan 2002 17:35:01 -0000 1.13
@@ -113,15 +113,17 @@
)
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 );
}
1.5 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/GenerateKey.java
Index: GenerateKey.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/GenerateKey.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- GenerateKey.java 20 Jan 2002 02:11:45 -0000 1.4
+++ GenerateKey.java 20 Jan 2002 17:35:01 -0000 1.5
@@ -11,7 +11,7 @@
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;
/**
1.6 +3 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/SignJar.java
Index: SignJar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/security/SignJar.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SignJar.java 20 Jan 2002 02:11:45 -0000 1.5
+++ SignJar.java 20 Jan 2002 17:35:01 -0000 1.6
@@ -19,7 +19,7 @@
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 @@
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();
1.5 +6 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java
Index: JakartaRegexpMatcher.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpMatcher.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JakartaRegexpMatcher.java 23 Dec 2001 06:32:30 -0000 1.4
+++ JakartaRegexpMatcher.java 20 Jan 2002 17:35:01 -0000 1.5
@@ -124,12 +124,15 @@
{
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;
}
1.5 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java
Index: JakartaRegexpRegexp.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/JakartaRegexpRegexp.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JakartaRegexpRegexp.java 23 Dec 2001 06:32:30 -0000 1.4
+++ JakartaRegexpRegexp.java 20 Jan 2002 17:35:01 -0000 1.5
@@ -71,8 +71,9 @@
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;
}
}
1.6 +6 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java
Index: Jdk14RegexpMatcher.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpMatcher.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Jdk14RegexpMatcher.java 23 Dec 2001 06:32:30 -0000 1.5
+++ Jdk14RegexpMatcher.java 20 Jan 2002 17:35:01 -0000 1.6
@@ -148,12 +148,15 @@
{
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;
}
1.4 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
Index: Jdk14RegexpRegexp.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Jdk14RegexpRegexp.java 23 Dec 2001 06:32:30 -0000 1.3
+++ Jdk14RegexpRegexp.java 20 Jan 2002 17:35:01 -0000 1.4
@@ -91,8 +91,9 @@
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;
}
}
1.6 +3 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java
Index: RegexpMatcherFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpMatcherFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RegexpMatcherFactory.java 4 Jan 2002 09:27:37 -0000 1.5
+++ RegexpMatcherFactory.java 20 Jan 2002 17:35:01 -0000 1.6
@@ -21,9 +21,9 @@
*/
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.
1.3 +2 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java
Index: RegexpUtil.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/util/regexp/RegexpUtil.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RegexpUtil.java 23 Dec 2001 06:32:30 -0000 1.2
+++ RegexpUtil.java 20 Jan 2002 17:35:01 -0000 1.3
@@ -14,12 +14,12 @@
*/
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 ) );
}
1.11 +4 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java
Index: JasperC.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/compilers/JasperC.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- JasperC.java 20 Jan 2002 02:36:21 -0000 1.10
+++ JasperC.java 20 Jan 2002 17:35:02 -0000 1.11
@@ -37,12 +37,14 @@
// 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;
}
1.16 +2 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java
Index: JavaCC.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JavaCC.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- JavaCC.java 20 Jan 2002 09:58:35 -0000 1.15
+++ JavaCC.java 20 Jan 2002 17:35:02 -0000 1.16
@@ -14,8 +14,8 @@
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;
1.21 +1 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java
Index: JJTree.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- JJTree.java 20 Jan 2002 09:58:35 -0000 1.20
+++ JJTree.java 20 Jan 2002 17:35:02 -0000 1.21
@@ -14,7 +14,7 @@
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;
1.17 +6 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java
Index: Javadoc.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/javadoc/Javadoc.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- Javadoc.java 20 Jan 2002 02:36:20 -0000 1.16
+++ Javadoc.java 20 Jan 2002 17:35:02 -0000 1.17
@@ -571,10 +571,12 @@
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 @@
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 );
1.20 +3 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java
Index: JDependTask.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- JDependTask.java 20 Jan 2002 02:11:43 -0000 1.19
+++ JDependTask.java 20 Jan 2002 17:35:02 -0000 1.20
@@ -14,7 +14,7 @@
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 @@
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() );
}
1.11 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java
Index: Jikes.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Jikes.java 20 Jan 2002 02:11:42 -0000 1.10
+++ Jikes.java 20 Jan 2002 17:35:02 -0000 1.11
@@ -83,8 +83,9 @@
Commandline cmd = new Commandline();
cmd.setExecutable( "jikes" );
- if( m_deprecation == true )
+ if( m_deprecation == true ) {
cmd.addArgument( "-deprecation" );
+ }
if( m_destDir != null )
{
1.16 +8 -6
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
Index: JspC.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- JspC.java 15 Jan 2002 09:51:09 -0000 1.15
+++ JspC.java 20 Jan 2002 17:35:02 -0000 1.16
@@ -56,7 +56,7 @@
* </a>
* @author <a href="mailto:[EMAIL PROTECTED]">Stefan Bodewig</a>
* @author <a href="mailto:[EMAIL PROTECTED]">J D Glanville</a>
- * @version $Revision: 1.15 $ $Date: 2002/01/15 09:51:09 $
+ * @version $Revision: 1.16 $ $Date: 2002/01/20 17:35:02 $
*/
public class JspC extends MatchingTask
{
@@ -101,10 +101,11 @@
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 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 @@
// 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 );
1.5 +6 -3
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/mail/MailMessage.java
Index: MailMessage.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/mail/MailMessage.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MailMessage.java 23 Dec 2001 06:35:02 -0000 1.4
+++ MailMessage.java 20 Jan 2002 17:35:02 -0000 1.5
@@ -373,12 +373,15 @@
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()
1.13 +8 -5
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java
Index: Move.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/file/Move.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Move.java 1 Jan 2002 09:13:45 -0000 1.12
+++ Move.java 20 Jan 2002 17:35:02 -0000 1.13
@@ -50,8 +50,9 @@
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 @@
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 @@
File f = new File( d, s );
if( f.isDirectory() )
{
- if( !okToDelete( f ) )
+ if( !okToDelete( f ) ) {
return false;
+ }
}
else
{
1.10 +4 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java
Index: P4Add.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Add.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- P4Add.java 12 Jan 2002 23:53:15 -0000 1.9
+++ P4Add.java 20 Jan 2002 17:35:02 -0000 1.10
@@ -88,8 +88,9 @@
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 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;
}
1.21 +2 -1
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java
Index: Project.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- Project.java 30 Dec 2001 09:15:37 -0000 1.20
+++ Project.java 20 Jan 2002 17:35:02 -0000 1.21
@@ -96,8 +96,9 @@
*/
public String getProperty( String name )
{
- if( name == null )
+ if( name == null ) {
return null;
+ }
String property = (String)properties.get( name );
return property;
}
1.9 +4 -2
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Rpm.java
Index: Rpm.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/unix/Rpm.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Rpm.java 20 Jan 2002 02:36:21 -0000 1.8
+++ Rpm.java 20 Jan 2002 17:35:02 -0000 1.9
@@ -13,7 +13,7 @@
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 [EMAIL PROTECTED]
@@ -93,7 +93,9 @@
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() );
1.9 +31 -16
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java
Index: VAJAntToolGUI.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJAntToolGUI.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- VAJAntToolGUI.java 30 Dec 2001 03:44:05 -0000 1.8
+++ VAJAntToolGUI.java 20 Jan 2002 17:35:02 -0000 1.9
@@ -43,7 +43,7 @@
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 @@
}
}
// 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 @@
{
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 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 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 @@
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 )
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>