Browse Source

BuildException -> TaskException

Removed uneeded imports.

Processed code through style formatter.

Yay - down to 272 errors!!!!!!!!!!!!!!!!!!!!!


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270168 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
afd11ba3a8
76 changed files with 226 additions and 106 deletions
  1. +4
    -4
      proposal/myrmidon/src/main/org/apache/tools/ant/AntClassLoader.java
  2. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/BuildEvent.java
  3. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/BuildListener.java
  4. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/BuildLogger.java
  5. +18
    -11
      proposal/myrmidon/src/main/org/apache/tools/ant/DefaultLogger.java
  6. +4
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/DemuxOutputStream.java
  7. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java
  8. +3
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/PathTokenizer.java
  9. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/ProjectHelper.java
  10. +5
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/RuntimeConfigurable.java
  11. +5
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/Target.java
  12. +0
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/Task.java
  13. +4
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java
  14. +5
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java
  15. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java
  16. +3
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/BZip2.java
  17. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Copy.java
  18. +6
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Delete.java
  19. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java
  20. +4
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Execute.java
  21. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  22. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GUnzip.java
  23. +3
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GZip.java
  24. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java
  25. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
  26. +3
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/LogStreamHandler.java
  27. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java
  28. +8
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java
  29. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Pack.java
  30. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
  31. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java
  32. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java
  33. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java
  34. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  35. +4
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/types/FileList.java
  36. +6
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/types/Substitution.java
  37. +3
    -3
      proposal/myrmidon/src/main/org/apache/tools/ant/types/ZipFileSet.java
  38. +3
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/util/SourceFileScanner.java
  39. +4
    -4
      proposal/myrmidon/src/todo/org/apache/tools/ant/AntClassLoader.java
  40. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/BuildEvent.java
  41. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/BuildListener.java
  42. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/BuildLogger.java
  43. +18
    -11
      proposal/myrmidon/src/todo/org/apache/tools/ant/DefaultLogger.java
  44. +4
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/DemuxOutputStream.java
  45. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java
  46. +3
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/PathTokenizer.java
  47. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/ProjectHelper.java
  48. +5
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/RuntimeConfigurable.java
  49. +5
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/Target.java
  50. +0
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/Task.java
  51. +4
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java
  52. +5
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java
  53. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/BUnzip2.java
  54. +3
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/BZip2.java
  55. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Copy.java
  56. +6
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Delete.java
  57. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java
  58. +4
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Execute.java
  59. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java
  60. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GUnzip.java
  61. +3
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GZip.java
  62. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GenerateKey.java
  63. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javac.java
  64. +3
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/LogStreamHandler.java
  65. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Manifest.java
  66. +8
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java
  67. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Pack.java
  68. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java
  69. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/PumpStreamHandler.java
  70. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java
  71. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tar.java
  72. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java
  73. +4
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileList.java
  74. +6
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/Substitution.java
  75. +3
    -3
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/ZipFileSet.java
  76. +3
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/util/SourceFileScanner.java

+ 4
- 4
proposal/myrmidon/src/main/org/apache/tools/ant/AntClassLoader.java View File

@@ -128,7 +128,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener
* value of ${build.sysclasspath}
*/
public AntClassLoader( Project project, Path classpath )
throws TaskException
throws TaskException
{
parent = AntClassLoader.class.getClassLoader();
this.project = project;
@@ -163,7 +163,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener
*/
public AntClassLoader( ClassLoader parent, Project project, Path classpath,
boolean parentFirst )
throws TaskException
throws TaskException
{
this( project, classpath );
if( parent != null )
@@ -184,7 +184,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener
* be consulted before trying to load the a class through this loader.
*/
public AntClassLoader( Project project, Path classpath, boolean parentFirst )
throws TaskException
throws TaskException
{
this( null, project, classpath, parentFirst );
}
@@ -539,7 +539,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener
* Reset the current thread's context loader to its original value
*/
public void resetThreadContextLoader()
throws TaskException
throws TaskException
{
if( isContextLoaderSaved &&
getContextClassLoader != null && setContextClassLoader != null )


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/BuildEvent.java View File

@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.util.EventObject;

public class BuildEvent extends EventObject


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/BuildListener.java View File

@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.util.EventListener;

/**


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/BuildLogger.java View File

@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.io.PrintStream;

/**


+ 18
- 11
proposal/myrmidon/src/main/org/apache/tools/ant/DefaultLogger.java View File

@@ -6,9 +6,8 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import org.apache.tools.ant.util.StringUtils;

/**
@@ -36,14 +35,14 @@ public class DefaultLogger implements BuildLogger
if( minutes > 0 )
{
return Long.toString( minutes ) + " minute"
+ ( minutes == 1 ? " " : "s " )
+ Long.toString( seconds % 60 ) + " second"
+ ( seconds % 60 == 1 ? "" : "s" );
+ ( minutes == 1 ? " " : "s " )
+ Long.toString( seconds % 60 ) + " second"
+ ( seconds % 60 == 1 ? "" : "s" );
}
else
{
return Long.toString( seconds ) + " second"
+ ( seconds % 60 == 1 ? "" : "s" );
+ ( seconds % 60 == 1 ? "" : "s" );
}

}
@@ -137,7 +136,7 @@ public class DefaultLogger implements BuildLogger
}
message.append( StringUtils.LINE_SEP );
message.append( "Total time: "
+ formatTime( System.currentTimeMillis() - startTime ) );
+ formatTime( System.currentTimeMillis() - startTime ) );

String msg = message.toString();
if( error == null )
@@ -193,7 +192,9 @@ public class DefaultLogger implements BuildLogger
}
}

public void targetFinished( BuildEvent event ) { }
public void targetFinished( BuildEvent event )
{
}

public void targetStarted( BuildEvent event )
{
@@ -205,9 +206,13 @@ public class DefaultLogger implements BuildLogger
}
}

public void taskFinished( BuildEvent event ) { }
public void taskFinished( BuildEvent event )
{
}

public void taskStarted( BuildEvent event ) { }
public void taskStarted( BuildEvent event )
{
}

/**
* Empty implementation which allows subclasses to receive the same output
@@ -215,6 +220,8 @@ public class DefaultLogger implements BuildLogger
*
* @param message Description of Parameter
*/
protected void log( String message ) { }
protected void log( String message )
{
}

}

+ 4
- 5
proposal/myrmidon/src/main/org/apache/tools/ant/DemuxOutputStream.java View File

@@ -6,12 +6,12 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Hashtable;


/**
* Logs content written by a thread and forwards the buffers onto the project
* object which will forward the content to the appropriate task
@@ -24,7 +24,7 @@ public class DemuxOutputStream extends OutputStream
private final static int MAX_SIZE = 1024;

private Hashtable buffers = new Hashtable();
// private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
// private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
private boolean skip = false;
private boolean isErrorStream;
private Project project;
@@ -76,7 +76,7 @@ public class DemuxOutputStream extends OutputStream
public void write( int cc )
throws IOException
{
final byte c = ( byte )cc;
final byte c = (byte)cc;
if( ( c == '\n' ) || ( c == '\r' ) )
{
if( !skip )
@@ -96,7 +96,6 @@ public class DemuxOutputStream extends OutputStream
skip = ( c == '\r' );
}


/**
* Converts the buffer to a string and sends it to <code>processLine</code>
*/
@@ -110,7 +109,7 @@ public class DemuxOutputStream extends OutputStream
private ByteArrayOutputStream getBuffer()
{
Thread current = Thread.currentThread();
ByteArrayOutputStream buffer = ( ByteArrayOutputStream )buffers.get( current );
ByteArrayOutputStream buffer = (ByteArrayOutputStream)buffers.get( current );
if( buffer == null )
{
buffer = new ByteArrayOutputStream();


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -765,7 +765,7 @@ public class IntrospectionHelper implements BuildListener
{
final File file =
FileUtils.newFileUtils().resolveFile( p.getBaseDir(), value );
m.invoke( parent, new File[]{ file } );
m.invoke( parent, new File[]{file} );
}

};


+ 3
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/PathTokenizer.java View File

@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.io.File;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
@@ -66,8 +67,8 @@ public class PathTokenizer
}

if( token.length() == 1 && Character.isLetter( token.charAt( 0 ) )
&& dosStyleFilesystem
&& tokenizer.hasMoreTokens() )
&& dosStyleFilesystem
&& tokenizer.hasMoreTokens() )
{
// we are on a dos style system so this path could be a drive
// spec. We look at the next token


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/ProjectHelper.java View File

@@ -184,7 +184,7 @@ public class ProjectHelper
if( endName < 0 )
{
throw new TaskException( "Syntax error in property: "
+ value );
+ value );
}
String propertyName = value.substring( pos + 2, endName );
fragments.addElement( null );


+ 5
- 5
proposal/myrmidon/src/main/org/apache/tools/ant/RuntimeConfigurable.java View File

@@ -6,12 +6,13 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.util.Enumeration;
import java.util.Locale;
import java.util.Vector;
import org.apache.myrmidon.api.TaskException;
import org.xml.sax.AttributeList;
import org.xml.sax.helpers.AttributeListImpl;
import org.apache.myrmidon.api.TaskException;

/**
* Wrapper class that holds the attributes of a Task (or elements nested below
@@ -95,7 +96,6 @@ public class RuntimeConfigurable
addText( new String( buf, start, end ) );
}


/**
* Configure the wrapped element and all children.
*
@@ -121,10 +121,10 @@ public class RuntimeConfigurable
Enumeration enum = children.elements();
while( enum.hasMoreElements() )
{
RuntimeConfigurable child = ( RuntimeConfigurable )enum.nextElement();
RuntimeConfigurable child = (RuntimeConfigurable)enum.nextElement();
if( child.wrappedObject instanceof Task )
{
Task childTask = ( Task )child.wrappedObject;
Task childTask = (Task)child.wrappedObject;
childTask.setRuntimeConfigurableWrapper( child );
childTask.maybeConfigure();
}
@@ -154,7 +154,7 @@ public class RuntimeConfigurable
*/
RuntimeConfigurable getChild( int index )
{
return ( RuntimeConfigurable )children.elementAt( index );
return (RuntimeConfigurable)children.elementAt( index );
}

}

+ 5
- 5
proposal/myrmidon/src/main/org/apache/tools/ant/Target.java View File

@@ -44,8 +44,8 @@ public class Target implements TaskContainer
if( token.equals( "" ) || token.equals( "," ) )
{
throw new TaskException( "Syntax Error: Depend attribute " +
"for target \"" + getName() +
"\" has an empty string for dependency." );
"for target \"" + getName() +
"\" has an empty string for dependency." );
}

addDependency( token );
@@ -58,8 +58,8 @@ public class Target implements TaskContainer
if( !tok.hasMoreTokens() || !token.equals( "," ) )
{
throw new TaskException( "Syntax Error: Depend attribute " +
"for target \"" + getName() +
"\" ends with a , character" );
"for target \"" + getName() +
"\" ends with a , character" );
}
}
}
@@ -228,7 +228,7 @@ public class Target implements TaskContainer
}

private boolean testUnlessCondition()
throws TaskException
throws TaskException
{
if( "".equals( unlessCondition ) )
{


+ 0
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/Task.java View File

@@ -7,9 +7,7 @@
*/
package org.apache.tools.ant;

import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.util.FileUtils;

public abstract class Task
extends ProjectComponent


+ 4
- 5
proposal/myrmidon/src/main/org/apache/tools/ant/TaskAdapter.java View File

@@ -6,11 +6,10 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import org.apache.myrmidon.api.TaskException;


/**
* Use introspection to "adapt" an arbitrary Bean ( not extending Task, but with
* similar patterns).
@@ -34,7 +33,7 @@ public class TaskAdapter extends Task
* @param project Description of Parameter
*/
public static void checkTaskClass( final Class taskClass, final Project project )
throws TaskException
throws TaskException
{
// don't have to check for interface, since then
// taskClass would be abstract too.
@@ -101,7 +100,7 @@ public class TaskAdapter extends Task
catch( Exception ex )
{
log( "Error setting project in " + proxy.getClass(),
Project.MSG_ERR );
Project.MSG_ERR );
throw new BuildException( "Error", ex );
}

@@ -109,7 +108,7 @@ public class TaskAdapter extends Task
try
{
Class c = proxy.getClass();
executeM = c.getMethod( "execute", new Class[0] );
executeM = c.getMethod( "execute", new Class[ 0 ] );
if( executeM == null )
{
log( "No public execute() in " + proxy.getClass(), Project.MSG_ERR );


+ 5
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Available.java View File

@@ -51,11 +51,13 @@ public class Available
}

public void setClasspath( Path classpath )
throws TaskException
{
createClasspath().append( classpath );
}

public void setClasspathRef( Reference r )
throws TaskException
{
createClasspath().setRefid( r );
}
@@ -66,6 +68,7 @@ public class Available
}

public void setFilepath( Path filepath )
throws TaskException
{
createFilepath().append( filepath );
}
@@ -91,6 +94,7 @@ public class Available
}

public Path createClasspath()
throws TaskException
{
if( this.classpath == null )
{
@@ -100,6 +104,7 @@ public class Available
}

public Path createFilepath()
throws TaskException
{
if( this.filepath == null )
{


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java View File

@@ -32,6 +32,7 @@ public class BUnzip2 extends Unpack
}

protected void extract()
throws TaskException
{
if( source.lastModified() > dest.lastModified() )
{


+ 3
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/BZip2.java View File

@@ -20,9 +20,11 @@ import org.apache.tools.bzip2.CBZip2OutputStream;
* @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
*/

public class BZip2 extends Pack
public class BZip2
extends Pack
{
protected void pack()
throws TaskException
{
CBZip2OutputStream zOut = null;
try


+ 2
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Copy.java View File

@@ -294,6 +294,7 @@ public class Copy extends Task

protected void buildMap( File fromDir, File toDir, String[] names,
FileNameMapper mapper, Hashtable map )
throws TaskException
{

String[] toCopy = null;
@@ -413,6 +414,7 @@ public class Copy extends Task
* @param dirs Description of Parameter
*/
protected void scan( File fromDir, File toDir, String[] files, String[] dirs )
throws TaskException
{
FileNameMapper mapper = null;
if( mapperElement != null )


+ 6
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Delete.java View File

@@ -73,6 +73,7 @@ public class Delete extends MatchingTask
* @param excludes the string containing the exclude patterns
*/
public void setExcludes( String excludes )
throws TaskException
{
usedMatchingTask = true;
super.setExcludes( excludes );
@@ -85,6 +86,7 @@ public class Delete extends MatchingTask
* patterns from.
*/
public void setExcludesfile( File excludesfile )
throws TaskException
{
usedMatchingTask = true;
super.setExcludesfile( excludesfile );
@@ -127,6 +129,7 @@ public class Delete extends MatchingTask
* @param includes the string containing the include patterns
*/
public void setIncludes( String includes )
throws TaskException
{
usedMatchingTask = true;
super.setIncludes( includes );
@@ -139,6 +142,7 @@ public class Delete extends MatchingTask
* patterns from.
*/
public void setIncludesfile( File includesfile )
throws TaskException
{
usedMatchingTask = true;
super.setIncludesfile( includesfile );
@@ -195,6 +199,7 @@ public class Delete extends MatchingTask
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
throws TaskException
{
usedMatchingTask = true;
return super.createExclude();
@@ -206,6 +211,7 @@ public class Delete extends MatchingTask
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
throws TaskException
{
usedMatchingTask = true;
return super.createInclude();


+ 1
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecTask.java View File

@@ -229,7 +229,7 @@ public class ExecTask extends Task
* @exception IOException Description of Exception
*/
protected final void runExecute( Execute exe )
throws IOException
throws IOException, TaskException
{
int err = -1;// assume the worst



+ 4
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -179,6 +179,7 @@ public class Execute
* @return The ProcEnvironment value
*/
public static synchronized Vector getProcEnvironment()
throws TaskException
{
if( procEnvironment != null )
return procEnvironment;
@@ -405,6 +406,7 @@ public class Execute
* @return the environment used to create a subprocess
*/
public String[] getEnvironment()
throws TaskException
{
if( env == null || newEnvironment )
return env;
@@ -505,6 +507,7 @@ public class Execute
* @return the patched environment
*/
private String[] patchEnvironment()
throws TaskException
{
Vector osEnv = (Vector)getProcEnvironment().clone();
for( int i = 0; i < env.length; i++ )
@@ -681,7 +684,7 @@ public class Execute
* @exception IOException Description of Exception
*/
public Process exec( Project project, String[] cmd, String[] env, File workingDir )
throws IOException
throws IOException, TaskException
{
try
{


+ 2
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -305,6 +305,7 @@ public class ExecuteOn extends ExecTask
* @return The Dirs value
*/
protected String[] getDirs( File baseDir, DirectoryScanner ds )
throws TaskException
{
if( mapper != null )
{
@@ -327,6 +328,7 @@ public class ExecuteOn extends ExecTask
* @return The Files value
*/
protected String[] getFiles( File baseDir, DirectoryScanner ds )
throws TaskException
{
if( mapper != null )
{


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GUnzip.java View File

@@ -32,6 +32,7 @@ public class GUnzip extends Unpack
}

protected void extract()
throws TaskException
{
if( source.lastModified() > dest.lastModified() )
{


+ 3
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GZip.java View File

@@ -20,10 +20,11 @@ import org.apache.myrmidon.api.TaskException;
* @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
* @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
*/
public class GZip extends Pack
public class GZip
extends Pack
{
protected void pack()
throws TaskException
{
GZIPOutputStream zOut = null;
try


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java View File

@@ -49,6 +49,7 @@ public class GenerateKey extends Task
}

public void setDname( final String dname )
throws TaskException
{
if( null != expandedDname )
{


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java View File

@@ -849,6 +849,7 @@ public class Javac extends MatchingTask
* @param files Description of Parameter
*/
protected void scanDir( File srcDir, File destDir, String files[] )
throws TaskException
{
GlobPatternMapper m = new GlobPatternMapper();
m.setFrom( "*.java" );


+ 3
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/LogStreamHandler.java View File

@@ -16,9 +16,9 @@ import org.apache.tools.ant.Task;
*
* @author thomas.haas@softwired-inc.com
*/
public class LogStreamHandler extends PumpStreamHandler
public class LogStreamHandler
extends PumpStreamHandler
{

/**
* Creates a new instance of this class.
*
@@ -33,6 +33,7 @@ public class LogStreamHandler extends PumpStreamHandler
}

public void stop()
throws TaskException
{
super.stop();
try


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java View File

@@ -361,6 +361,7 @@ public class Manifest extends Task
catch( IOException e )
{
throw new TaskException( "Failed to write " + manifestFile

e );
}
finally


+ 8
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/MatchingTask.java View File

@@ -50,6 +50,7 @@ public abstract class MatchingTask extends Task
* @param excludes the string containing the exclude patterns
*/
public void setExcludes( String excludes )
throws TaskException
{
fileset.setExcludes( excludes );
}
@@ -61,6 +62,7 @@ public abstract class MatchingTask extends Task
* patterns from.
*/
public void setExcludesfile( File excludesfile )
throws TaskException
{
fileset.setExcludesfile( excludesfile );
}
@@ -72,6 +74,7 @@ public abstract class MatchingTask extends Task
* @param includes the string containing the include patterns
*/
public void setIncludes( String includes )
throws TaskException
{
fileset.setIncludes( includes );
}
@@ -83,6 +86,7 @@ public abstract class MatchingTask extends Task
* patterns from.
*/
public void setIncludesfile( File includesfile )
throws TaskException
{
fileset.setIncludesfile( includesfile );
}
@@ -93,6 +97,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
throws TaskException
{
return fileset.createExclude();
}
@@ -103,6 +108,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExcludesFile()
throws TaskException
{
return fileset.createExcludesFile();
}
@@ -113,6 +119,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
throws TaskException
{
return fileset.createInclude();
}
@@ -123,6 +130,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createIncludesFile()
throws TaskException
{
return fileset.createIncludesFile();
}


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Pack.java View File

@@ -62,6 +62,7 @@ public abstract class Pack extends Task
}

private void validate()
throws TaskException
{
if( zipFile == null )
{


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java View File

@@ -225,6 +225,7 @@ public class Property extends Task
}

protected void loadEnvironment( String prefix )
throws TaskException
{
Properties props = new Properties();
if( !prefix.endsWith( "." ) )


+ 2
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java View File

@@ -10,6 +10,7 @@ package org.apache.tools.ant.taskdefs;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.myrmidon.api.TaskException;

/**
* Copies standard output and error of subprocesses to standard output and error
@@ -63,6 +64,7 @@ public class PumpStreamHandler implements ExecuteStreamHandler
}

public void stop()
throws TaskException
{
try
{


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java View File

@@ -607,6 +607,7 @@ public class Rmic extends MatchingTask
*/
protected void scanDir( File baseDir, String files[],
FileNameMapper mapper )
throws TaskException
{

String[] newFiles = files;


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java View File

@@ -212,6 +212,7 @@ public class Tar extends MatchingTask
}

protected boolean archiveIsUpToDate( String[] files )
throws TaskException
{
SourceFileScanner sfs = new SourceFileScanner( this );
MergingMapper mm = new MergingMapper();


+ 1
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java View File

@@ -161,6 +161,7 @@ public class UpToDate extends MatchingTask implements Condition
}

protected boolean scanDir( File srcDir, String files[] )
throws TaskException
{
SourceFileScanner sfs = new SourceFileScanner( this );
FileNameMapper mapper = null;


+ 4
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/types/FileList.java View File

@@ -52,6 +52,7 @@ public class FileList extends DataType
}

public void setFiles( String filenames )
throws TaskException
{
if( isReference() )
{
@@ -88,6 +89,7 @@ public class FileList extends DataType
}

public File getDir( Project p )
throws TaskException
{
if( isReference() )
{
@@ -103,6 +105,7 @@ public class FileList extends DataType
* @return The Files value
*/
public String[] getFiles( Project p )
throws TaskException
{
if( isReference() )
{
@@ -132,6 +135,7 @@ public class FileList extends DataType
* @return The Ref value
*/
protected FileList getRef( Project p )
throws TaskException
{
if( !checked )
{


+ 6
- 2
proposal/myrmidon/src/main/org/apache/tools/ant/types/Substitution.java View File

@@ -22,7 +22,8 @@ import org.apache.tools.ant.Project;
* mattinger@mindless.com</a>
* @see org.apache.oro.text.regex.Perl5Substitition
*/
public class Substitution extends DataType
public class Substitution
extends DataType
{
public final static String DATA_TYPE_NAME = "substitition";

@@ -45,9 +46,12 @@ public class Substitution extends DataType
* @return The Expression value
*/
public String getExpression( Project p )
throws TaskException
{
if( isReference() )
{
return getRef( p ).getExpression( p );
}

return expression;
}
@@ -60,6 +64,7 @@ public class Substitution extends DataType
* @return The Ref value
*/
public Substitution getRef( Project p )
throws TaskException
{
if( !checked )
{
@@ -79,5 +84,4 @@ public class Substitution extends DataType
return (Substitution)o;
}
}

}

+ 3
- 3
proposal/myrmidon/src/main/org/apache/tools/ant/types/ZipFileSet.java View File

@@ -27,9 +27,9 @@ import org.apache.tools.ant.Project;
*
* @author Don Ferguson <a href="mailto:don@bea.com">don@bea.com</a>
*/
public class ZipFileSet extends FileSet
public class ZipFileSet
extends FileSet
{

private File srcFile = null;
private String prefix = "";
private String fullpath = "";
@@ -84,6 +84,7 @@ public class ZipFileSet extends FileSet
* @param srcFile The zip file from which to extract entries.
*/
public void setSrc( File srcFile )
throws TaskException
{
if( hasDir )
{
@@ -153,5 +154,4 @@ public class ZipFileSet extends FileSet
{
return srcFile;
}

}

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

@@ -9,6 +9,7 @@ package org.apache.tools.ant.util;

import java.io.File;
import java.util.Vector;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Os;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@@ -53,6 +54,7 @@ public class SourceFileScanner
*/
public String[] restrict( String[] files, File srcDir, File destDir,
FileNameMapper mapper )
throws TaskException
{

long now = ( new java.util.Date() ).getTime();
@@ -146,6 +148,7 @@ public class SourceFileScanner
*/
public File[] restrictAsFiles( String[] files, File srcDir, File destDir,
FileNameMapper mapper )
throws TaskException
{
String[] res = restrict( files, srcDir, destDir, mapper );
File[] result = new File[ res.length ];


+ 4
- 4
proposal/myrmidon/src/todo/org/apache/tools/ant/AntClassLoader.java View File

@@ -128,7 +128,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener
* value of ${build.sysclasspath}
*/
public AntClassLoader( Project project, Path classpath )
throws TaskException
throws TaskException
{
parent = AntClassLoader.class.getClassLoader();
this.project = project;
@@ -163,7 +163,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener
*/
public AntClassLoader( ClassLoader parent, Project project, Path classpath,
boolean parentFirst )
throws TaskException
throws TaskException
{
this( project, classpath );
if( parent != null )
@@ -184,7 +184,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener
* be consulted before trying to load the a class through this loader.
*/
public AntClassLoader( Project project, Path classpath, boolean parentFirst )
throws TaskException
throws TaskException
{
this( null, project, classpath, parentFirst );
}
@@ -539,7 +539,7 @@ public class AntClassLoader extends ClassLoader implements BuildListener
* Reset the current thread's context loader to its original value
*/
public void resetThreadContextLoader()
throws TaskException
throws TaskException
{
if( isContextLoaderSaved &&
getContextClassLoader != null && setContextClassLoader != null )


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/BuildEvent.java View File

@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.util.EventObject;

public class BuildEvent extends EventObject


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/BuildListener.java View File

@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.util.EventListener;

/**


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/BuildLogger.java View File

@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.io.PrintStream;

/**


+ 18
- 11
proposal/myrmidon/src/todo/org/apache/tools/ant/DefaultLogger.java View File

@@ -6,9 +6,8 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import org.apache.tools.ant.util.StringUtils;

/**
@@ -36,14 +35,14 @@ public class DefaultLogger implements BuildLogger
if( minutes > 0 )
{
return Long.toString( minutes ) + " minute"
+ ( minutes == 1 ? " " : "s " )
+ Long.toString( seconds % 60 ) + " second"
+ ( seconds % 60 == 1 ? "" : "s" );
+ ( minutes == 1 ? " " : "s " )
+ Long.toString( seconds % 60 ) + " second"
+ ( seconds % 60 == 1 ? "" : "s" );
}
else
{
return Long.toString( seconds ) + " second"
+ ( seconds % 60 == 1 ? "" : "s" );
+ ( seconds % 60 == 1 ? "" : "s" );
}

}
@@ -137,7 +136,7 @@ public class DefaultLogger implements BuildLogger
}
message.append( StringUtils.LINE_SEP );
message.append( "Total time: "
+ formatTime( System.currentTimeMillis() - startTime ) );
+ formatTime( System.currentTimeMillis() - startTime ) );

String msg = message.toString();
if( error == null )
@@ -193,7 +192,9 @@ public class DefaultLogger implements BuildLogger
}
}

public void targetFinished( BuildEvent event ) { }
public void targetFinished( BuildEvent event )
{
}

public void targetStarted( BuildEvent event )
{
@@ -205,9 +206,13 @@ public class DefaultLogger implements BuildLogger
}
}

public void taskFinished( BuildEvent event ) { }
public void taskFinished( BuildEvent event )
{
}

public void taskStarted( BuildEvent event ) { }
public void taskStarted( BuildEvent event )
{
}

/**
* Empty implementation which allows subclasses to receive the same output
@@ -215,6 +220,8 @@ public class DefaultLogger implements BuildLogger
*
* @param message Description of Parameter
*/
protected void log( String message ) { }
protected void log( String message )
{
}

}

+ 4
- 5
proposal/myrmidon/src/todo/org/apache/tools/ant/DemuxOutputStream.java View File

@@ -6,12 +6,12 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Hashtable;


/**
* Logs content written by a thread and forwards the buffers onto the project
* object which will forward the content to the appropriate task
@@ -24,7 +24,7 @@ public class DemuxOutputStream extends OutputStream
private final static int MAX_SIZE = 1024;

private Hashtable buffers = new Hashtable();
// private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
// private ByteArrayOutputStream buffer = new ByteArrayOutputStream();
private boolean skip = false;
private boolean isErrorStream;
private Project project;
@@ -76,7 +76,7 @@ public class DemuxOutputStream extends OutputStream
public void write( int cc )
throws IOException
{
final byte c = ( byte )cc;
final byte c = (byte)cc;
if( ( c == '\n' ) || ( c == '\r' ) )
{
if( !skip )
@@ -96,7 +96,6 @@ public class DemuxOutputStream extends OutputStream
skip = ( c == '\r' );
}


/**
* Converts the buffer to a string and sends it to <code>processLine</code>
*/
@@ -110,7 +109,7 @@ public class DemuxOutputStream extends OutputStream
private ByteArrayOutputStream getBuffer()
{
Thread current = Thread.currentThread();
ByteArrayOutputStream buffer = ( ByteArrayOutputStream )buffers.get( current );
ByteArrayOutputStream buffer = (ByteArrayOutputStream)buffers.get( current );
if( buffer == null )
{
buffer = new ByteArrayOutputStream();


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/IntrospectionHelper.java View File

@@ -765,7 +765,7 @@ public class IntrospectionHelper implements BuildListener
{
final File file =
FileUtils.newFileUtils().resolveFile( p.getBaseDir(), value );
m.invoke( parent, new File[]{ file } );
m.invoke( parent, new File[]{file} );
}

};


+ 3
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/PathTokenizer.java View File

@@ -6,6 +6,7 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.io.File;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
@@ -66,8 +67,8 @@ public class PathTokenizer
}

if( token.length() == 1 && Character.isLetter( token.charAt( 0 ) )
&& dosStyleFilesystem
&& tokenizer.hasMoreTokens() )
&& dosStyleFilesystem
&& tokenizer.hasMoreTokens() )
{
// we are on a dos style system so this path could be a drive
// spec. We look at the next token


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/ProjectHelper.java View File

@@ -184,7 +184,7 @@ public class ProjectHelper
if( endName < 0 )
{
throw new TaskException( "Syntax error in property: "
+ value );
+ value );
}
String propertyName = value.substring( pos + 2, endName );
fragments.addElement( null );


+ 5
- 5
proposal/myrmidon/src/todo/org/apache/tools/ant/RuntimeConfigurable.java View File

@@ -6,12 +6,13 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.util.Enumeration;
import java.util.Locale;
import java.util.Vector;
import org.apache.myrmidon.api.TaskException;
import org.xml.sax.AttributeList;
import org.xml.sax.helpers.AttributeListImpl;
import org.apache.myrmidon.api.TaskException;

/**
* Wrapper class that holds the attributes of a Task (or elements nested below
@@ -95,7 +96,6 @@ public class RuntimeConfigurable
addText( new String( buf, start, end ) );
}


/**
* Configure the wrapped element and all children.
*
@@ -121,10 +121,10 @@ public class RuntimeConfigurable
Enumeration enum = children.elements();
while( enum.hasMoreElements() )
{
RuntimeConfigurable child = ( RuntimeConfigurable )enum.nextElement();
RuntimeConfigurable child = (RuntimeConfigurable)enum.nextElement();
if( child.wrappedObject instanceof Task )
{
Task childTask = ( Task )child.wrappedObject;
Task childTask = (Task)child.wrappedObject;
childTask.setRuntimeConfigurableWrapper( child );
childTask.maybeConfigure();
}
@@ -154,7 +154,7 @@ public class RuntimeConfigurable
*/
RuntimeConfigurable getChild( int index )
{
return ( RuntimeConfigurable )children.elementAt( index );
return (RuntimeConfigurable)children.elementAt( index );
}

}

+ 5
- 5
proposal/myrmidon/src/todo/org/apache/tools/ant/Target.java View File

@@ -44,8 +44,8 @@ public class Target implements TaskContainer
if( token.equals( "" ) || token.equals( "," ) )
{
throw new TaskException( "Syntax Error: Depend attribute " +
"for target \"" + getName() +
"\" has an empty string for dependency." );
"for target \"" + getName() +
"\" has an empty string for dependency." );
}

addDependency( token );
@@ -58,8 +58,8 @@ public class Target implements TaskContainer
if( !tok.hasMoreTokens() || !token.equals( "," ) )
{
throw new TaskException( "Syntax Error: Depend attribute " +
"for target \"" + getName() +
"\" ends with a , character" );
"for target \"" + getName() +
"\" ends with a , character" );
}
}
}
@@ -228,7 +228,7 @@ public class Target implements TaskContainer
}

private boolean testUnlessCondition()
throws TaskException
throws TaskException
{
if( "".equals( unlessCondition ) )
{


+ 0
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/Task.java View File

@@ -7,9 +7,7 @@
*/
package org.apache.tools.ant;

import java.io.File;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.util.FileUtils;

public abstract class Task
extends ProjectComponent


+ 4
- 5
proposal/myrmidon/src/todo/org/apache/tools/ant/TaskAdapter.java View File

@@ -6,11 +6,10 @@
* the LICENSE file.
*/
package org.apache.tools.ant;

import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import org.apache.myrmidon.api.TaskException;


/**
* Use introspection to "adapt" an arbitrary Bean ( not extending Task, but with
* similar patterns).
@@ -34,7 +33,7 @@ public class TaskAdapter extends Task
* @param project Description of Parameter
*/
public static void checkTaskClass( final Class taskClass, final Project project )
throws TaskException
throws TaskException
{
// don't have to check for interface, since then
// taskClass would be abstract too.
@@ -101,7 +100,7 @@ public class TaskAdapter extends Task
catch( Exception ex )
{
log( "Error setting project in " + proxy.getClass(),
Project.MSG_ERR );
Project.MSG_ERR );
throw new BuildException( "Error", ex );
}

@@ -109,7 +108,7 @@ public class TaskAdapter extends Task
try
{
Class c = proxy.getClass();
executeM = c.getMethod( "execute", new Class[0] );
executeM = c.getMethod( "execute", new Class[ 0 ] );
if( executeM == null )
{
log( "No public execute() in " + proxy.getClass(), Project.MSG_ERR );


+ 5
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Available.java View File

@@ -51,11 +51,13 @@ public class Available
}

public void setClasspath( Path classpath )
throws TaskException
{
createClasspath().append( classpath );
}

public void setClasspathRef( Reference r )
throws TaskException
{
createClasspath().setRefid( r );
}
@@ -66,6 +68,7 @@ public class Available
}

public void setFilepath( Path filepath )
throws TaskException
{
createFilepath().append( filepath );
}
@@ -91,6 +94,7 @@ public class Available
}

public Path createClasspath()
throws TaskException
{
if( this.classpath == null )
{
@@ -100,6 +104,7 @@ public class Available
}

public Path createFilepath()
throws TaskException
{
if( this.filepath == null )
{


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/BUnzip2.java View File

@@ -32,6 +32,7 @@ public class BUnzip2 extends Unpack
}

protected void extract()
throws TaskException
{
if( source.lastModified() > dest.lastModified() )
{


+ 3
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/BZip2.java View File

@@ -20,9 +20,11 @@ import org.apache.tools.bzip2.CBZip2OutputStream;
* @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
*/

public class BZip2 extends Pack
public class BZip2
extends Pack
{
protected void pack()
throws TaskException
{
CBZip2OutputStream zOut = null;
try


+ 2
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Copy.java View File

@@ -294,6 +294,7 @@ public class Copy extends Task

protected void buildMap( File fromDir, File toDir, String[] names,
FileNameMapper mapper, Hashtable map )
throws TaskException
{

String[] toCopy = null;
@@ -413,6 +414,7 @@ public class Copy extends Task
* @param dirs Description of Parameter
*/
protected void scan( File fromDir, File toDir, String[] files, String[] dirs )
throws TaskException
{
FileNameMapper mapper = null;
if( mapperElement != null )


+ 6
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Delete.java View File

@@ -73,6 +73,7 @@ public class Delete extends MatchingTask
* @param excludes the string containing the exclude patterns
*/
public void setExcludes( String excludes )
throws TaskException
{
usedMatchingTask = true;
super.setExcludes( excludes );
@@ -85,6 +86,7 @@ public class Delete extends MatchingTask
* patterns from.
*/
public void setExcludesfile( File excludesfile )
throws TaskException
{
usedMatchingTask = true;
super.setExcludesfile( excludesfile );
@@ -127,6 +129,7 @@ public class Delete extends MatchingTask
* @param includes the string containing the include patterns
*/
public void setIncludes( String includes )
throws TaskException
{
usedMatchingTask = true;
super.setIncludes( includes );
@@ -139,6 +142,7 @@ public class Delete extends MatchingTask
* patterns from.
*/
public void setIncludesfile( File includesfile )
throws TaskException
{
usedMatchingTask = true;
super.setIncludesfile( includesfile );
@@ -195,6 +199,7 @@ public class Delete extends MatchingTask
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
throws TaskException
{
usedMatchingTask = true;
return super.createExclude();
@@ -206,6 +211,7 @@ public class Delete extends MatchingTask
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
throws TaskException
{
usedMatchingTask = true;
return super.createInclude();


+ 1
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecTask.java View File

@@ -229,7 +229,7 @@ public class ExecTask extends Task
* @exception IOException Description of Exception
*/
protected final void runExecute( Execute exe )
throws IOException
throws IOException, TaskException
{
int err = -1;// assume the worst



+ 4
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Execute.java View File

@@ -179,6 +179,7 @@ public class Execute
* @return The ProcEnvironment value
*/
public static synchronized Vector getProcEnvironment()
throws TaskException
{
if( procEnvironment != null )
return procEnvironment;
@@ -405,6 +406,7 @@ public class Execute
* @return the environment used to create a subprocess
*/
public String[] getEnvironment()
throws TaskException
{
if( env == null || newEnvironment )
return env;
@@ -505,6 +507,7 @@ public class Execute
* @return the patched environment
*/
private String[] patchEnvironment()
throws TaskException
{
Vector osEnv = (Vector)getProcEnvironment().clone();
for( int i = 0; i < env.length; i++ )
@@ -681,7 +684,7 @@ public class Execute
* @exception IOException Description of Exception
*/
public Process exec( Project project, String[] cmd, String[] env, File workingDir )
throws IOException
throws IOException, TaskException
{
try
{


+ 2
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java View File

@@ -305,6 +305,7 @@ public class ExecuteOn extends ExecTask
* @return The Dirs value
*/
protected String[] getDirs( File baseDir, DirectoryScanner ds )
throws TaskException
{
if( mapper != null )
{
@@ -327,6 +328,7 @@ public class ExecuteOn extends ExecTask
* @return The Files value
*/
protected String[] getFiles( File baseDir, DirectoryScanner ds )
throws TaskException
{
if( mapper != null )
{


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GUnzip.java View File

@@ -32,6 +32,7 @@ public class GUnzip extends Unpack
}

protected void extract()
throws TaskException
{
if( source.lastModified() > dest.lastModified() )
{


+ 3
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GZip.java View File

@@ -20,10 +20,11 @@ import org.apache.myrmidon.api.TaskException;
* @author Jon S. Stevens <a href="mailto:jon@clearink.com">jon@clearink.com</a>
* @author <a href="mailto:umagesh@rediffmail.com">Magesh Umasankar</a>
*/
public class GZip extends Pack
public class GZip
extends Pack
{
protected void pack()
throws TaskException
{
GZIPOutputStream zOut = null;
try


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/GenerateKey.java View File

@@ -49,6 +49,7 @@ public class GenerateKey extends Task
}

public void setDname( final String dname )
throws TaskException
{
if( null != expandedDname )
{


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javac.java View File

@@ -849,6 +849,7 @@ public class Javac extends MatchingTask
* @param files Description of Parameter
*/
protected void scanDir( File srcDir, File destDir, String files[] )
throws TaskException
{
GlobPatternMapper m = new GlobPatternMapper();
m.setFrom( "*.java" );


+ 3
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/LogStreamHandler.java View File

@@ -16,9 +16,9 @@ import org.apache.tools.ant.Task;
*
* @author thomas.haas@softwired-inc.com
*/
public class LogStreamHandler extends PumpStreamHandler
public class LogStreamHandler
extends PumpStreamHandler
{

/**
* Creates a new instance of this class.
*
@@ -33,6 +33,7 @@ public class LogStreamHandler extends PumpStreamHandler
}

public void stop()
throws TaskException
{
super.stop();
try


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Manifest.java View File

@@ -361,6 +361,7 @@ public class Manifest extends Task
catch( IOException e )
{
throw new TaskException( "Failed to write " + manifestFile

e );
}
finally


+ 8
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/MatchingTask.java View File

@@ -50,6 +50,7 @@ public abstract class MatchingTask extends Task
* @param excludes the string containing the exclude patterns
*/
public void setExcludes( String excludes )
throws TaskException
{
fileset.setExcludes( excludes );
}
@@ -61,6 +62,7 @@ public abstract class MatchingTask extends Task
* patterns from.
*/
public void setExcludesfile( File excludesfile )
throws TaskException
{
fileset.setExcludesfile( excludesfile );
}
@@ -72,6 +74,7 @@ public abstract class MatchingTask extends Task
* @param includes the string containing the include patterns
*/
public void setIncludes( String includes )
throws TaskException
{
fileset.setIncludes( includes );
}
@@ -83,6 +86,7 @@ public abstract class MatchingTask extends Task
* patterns from.
*/
public void setIncludesfile( File includesfile )
throws TaskException
{
fileset.setIncludesfile( includesfile );
}
@@ -93,6 +97,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExclude()
throws TaskException
{
return fileset.createExclude();
}
@@ -103,6 +108,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createExcludesFile()
throws TaskException
{
return fileset.createExcludesFile();
}
@@ -113,6 +119,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createInclude()
throws TaskException
{
return fileset.createInclude();
}
@@ -123,6 +130,7 @@ public abstract class MatchingTask extends Task
* @return Description of the Returned Value
*/
public PatternSet.NameEntry createIncludesFile()
throws TaskException
{
return fileset.createIncludesFile();
}


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Pack.java View File

@@ -62,6 +62,7 @@ public abstract class Pack extends Task
}

private void validate()
throws TaskException
{
if( zipFile == null )
{


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java View File

@@ -225,6 +225,7 @@ public class Property extends Task
}

protected void loadEnvironment( String prefix )
throws TaskException
{
Properties props = new Properties();
if( !prefix.endsWith( "." ) )


+ 2
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/PumpStreamHandler.java View File

@@ -10,6 +10,7 @@ package org.apache.tools.ant.taskdefs;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.myrmidon.api.TaskException;

/**
* Copies standard output and error of subprocesses to standard output and error
@@ -63,6 +64,7 @@ public class PumpStreamHandler implements ExecuteStreamHandler
}

public void stop()
throws TaskException
{
try
{


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java View File

@@ -607,6 +607,7 @@ public class Rmic extends MatchingTask
*/
protected void scanDir( File baseDir, String files[],
FileNameMapper mapper )
throws TaskException
{

String[] newFiles = files;


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tar.java View File

@@ -212,6 +212,7 @@ public class Tar extends MatchingTask
}

protected boolean archiveIsUpToDate( String[] files )
throws TaskException
{
SourceFileScanner sfs = new SourceFileScanner( this );
MergingMapper mm = new MergingMapper();


+ 1
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java View File

@@ -161,6 +161,7 @@ public class UpToDate extends MatchingTask implements Condition
}

protected boolean scanDir( File srcDir, String files[] )
throws TaskException
{
SourceFileScanner sfs = new SourceFileScanner( this );
FileNameMapper mapper = null;


+ 4
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/types/FileList.java View File

@@ -52,6 +52,7 @@ public class FileList extends DataType
}

public void setFiles( String filenames )
throws TaskException
{
if( isReference() )
{
@@ -88,6 +89,7 @@ public class FileList extends DataType
}

public File getDir( Project p )
throws TaskException
{
if( isReference() )
{
@@ -103,6 +105,7 @@ public class FileList extends DataType
* @return The Files value
*/
public String[] getFiles( Project p )
throws TaskException
{
if( isReference() )
{
@@ -132,6 +135,7 @@ public class FileList extends DataType
* @return The Ref value
*/
protected FileList getRef( Project p )
throws TaskException
{
if( !checked )
{


+ 6
- 2
proposal/myrmidon/src/todo/org/apache/tools/ant/types/Substitution.java View File

@@ -22,7 +22,8 @@ import org.apache.tools.ant.Project;
* mattinger@mindless.com</a>
* @see org.apache.oro.text.regex.Perl5Substitition
*/
public class Substitution extends DataType
public class Substitution
extends DataType
{
public final static String DATA_TYPE_NAME = "substitition";

@@ -45,9 +46,12 @@ public class Substitution extends DataType
* @return The Expression value
*/
public String getExpression( Project p )
throws TaskException
{
if( isReference() )
{
return getRef( p ).getExpression( p );
}

return expression;
}
@@ -60,6 +64,7 @@ public class Substitution extends DataType
* @return The Ref value
*/
public Substitution getRef( Project p )
throws TaskException
{
if( !checked )
{
@@ -79,5 +84,4 @@ public class Substitution extends DataType
return (Substitution)o;
}
}

}

+ 3
- 3
proposal/myrmidon/src/todo/org/apache/tools/ant/types/ZipFileSet.java View File

@@ -27,9 +27,9 @@ import org.apache.tools.ant.Project;
*
* @author Don Ferguson <a href="mailto:don@bea.com">don@bea.com</a>
*/
public class ZipFileSet extends FileSet
public class ZipFileSet
extends FileSet
{

private File srcFile = null;
private String prefix = "";
private String fullpath = "";
@@ -84,6 +84,7 @@ public class ZipFileSet extends FileSet
* @param srcFile The zip file from which to extract entries.
*/
public void setSrc( File srcFile )
throws TaskException
{
if( hasDir )
{
@@ -153,5 +154,4 @@ public class ZipFileSet extends FileSet
{
return srcFile;
}

}

+ 3
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/util/SourceFileScanner.java View File

@@ -9,6 +9,7 @@ package org.apache.tools.ant.util;

import java.io.File;
import java.util.Vector;
import org.apache.myrmidon.api.TaskException;
import org.apache.myrmidon.framework.Os;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.Task;
@@ -53,6 +54,7 @@ public class SourceFileScanner
*/
public String[] restrict( String[] files, File srcDir, File destDir,
FileNameMapper mapper )
throws TaskException
{

long now = ( new java.util.Date() ).getTime();
@@ -146,6 +148,7 @@ public class SourceFileScanner
*/
public File[] restrictAsFiles( String[] files, File srcDir, File destDir,
FileNameMapper mapper )
throws TaskException
{
String[] res = restrict( files, srcDir, destDir, mapper );
File[] result = new File[ res.length ];


Loading…
Cancel
Save