Browse Source

BuildException -> TaskException

39 errors to go
39 errors to go
hey ho we're merry now for theres
39 errors to go


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270170 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 23 years ago
parent
commit
b400039e78
98 changed files with 272 additions and 92 deletions
  1. +6
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/ProjectComponent.java
  2. +4
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/TaskContainer.java
  3. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Chmod.java
  4. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Ear.java
  5. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Echo.java
  6. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/ExecuteOn.java
  7. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Exit.java
  8. +2
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Expand.java
  9. +9
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/FixCRLF.java
  10. +0
    -11
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
  11. +15
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
  12. +5
    -5
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Manifest.java
  13. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Move.java
  14. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Parallel.java
  15. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Patch.java
  16. +5
    -4
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/PathConvert.java
  17. +4
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Property.java
  18. +0
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java
  19. +5
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
  20. +3
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tar.java
  21. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
  22. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Untar.java
  23. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/UpToDate.java
  24. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/War.java
  25. +4
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
  26. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  27. +3
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition/Http.java
  28. +3
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/condition/Socket.java
  29. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
  30. +4
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java
  31. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java
  32. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java
  33. +3
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
  34. +4
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
  35. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  36. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
  37. +2
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
  38. +3
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
  39. +7
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
  40. +4
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
  41. +1
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
  42. +2
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
  43. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
  44. +1
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java
  45. +5
    -0
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
  46. +2
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java
  47. +0
    -6
      proposal/myrmidon/src/main/org/apache/tools/ant/types/DataType.java
  48. +4
    -1
      proposal/myrmidon/src/main/org/apache/tools/ant/util/FileNameMapper.java
  49. +3
    -2
      proposal/myrmidon/src/main/org/apache/tools/ant/util/RegexpPatternMapper.java
  50. +6
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/ProjectComponent.java
  51. +4
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/TaskContainer.java
  52. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Chmod.java
  53. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Ear.java
  54. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Echo.java
  55. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/ExecuteOn.java
  56. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Exit.java
  57. +2
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Expand.java
  58. +9
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/FixCRLF.java
  59. +0
    -11
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javac.java
  60. +15
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Javadoc.java
  61. +5
    -5
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Manifest.java
  62. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Move.java
  63. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Parallel.java
  64. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Patch.java
  65. +5
    -4
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/PathConvert.java
  66. +4
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Property.java
  67. +0
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java
  68. +5
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/SQLExec.java
  69. +3
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tar.java
  70. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Tstamp.java
  71. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Untar.java
  72. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/UpToDate.java
  73. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/War.java
  74. +4
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/XSLTProcess.java
  75. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  76. +3
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/condition/Http.java
  77. +3
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/condition/Socket.java
  78. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Rpm.java
  79. +4
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/XMLValidateTask.java
  80. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java
  81. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java
  82. +3
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java
  83. +4
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
  84. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/CSharp.java
  85. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/Ilasm.java
  86. +2
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/dotnet/NetCommand.java
  87. +3
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java
  88. +7
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java
  89. +4
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java
  90. +1
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java
  91. +2
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java
  92. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java
  93. +1
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java
  94. +5
    -0
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
  95. +2
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/rmic/RmicAdapter.java
  96. +0
    -6
      proposal/myrmidon/src/todo/org/apache/tools/ant/types/DataType.java
  97. +4
    -1
      proposal/myrmidon/src/todo/org/apache/tools/ant/util/FileNameMapper.java
  98. +3
    -2
      proposal/myrmidon/src/todo/org/apache/tools/ant/util/RegexpPatternMapper.java

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

@@ -46,6 +46,12 @@ public abstract class ProjectComponent
return project; return project;
} }


public void execute()
throws TaskException
{
//HACK: NOOP execute - should be deleted in the future!
}

protected File resolveFile( final String name ) protected File resolveFile( final String name )
throws TaskException throws TaskException
{ {


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

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


import org.apache.myrmidon.api.TaskException;

/** /**
* Interface for objects which can contain tasks <p> * Interface for objects which can contain tasks <p>
* *
@@ -23,6 +25,7 @@ public interface TaskContainer
* *
* @param task the task to be added to this container * @param task the task to be added to this container
*/ */
void addTask( Task task );
void addTask( Task task )
throws TaskException;
} }



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

@@ -32,6 +32,7 @@ public class Chmod extends ExecuteOn
private boolean havePerm = false; private boolean havePerm = false;


public Chmod() public Chmod()
throws TaskException
{ {
super.setExecutable( "chmod" ); super.setExecutable( "chmod" );
super.setParallel( true ); super.setParallel( true );


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

@@ -34,6 +34,7 @@ public class Ear extends Jar
} }


public void setAppxml( File descr ) public void setAppxml( File descr )
throws TaskException
{ {
deploymentDescriptor = descr; deploymentDescriptor = descr;
if( !deploymentDescriptor.exists() ) if( !deploymentDescriptor.exists() )


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

@@ -106,6 +106,7 @@ public class Echo extends Task
* @param msg The feature to be added to the Text attribute * @param msg The feature to be added to the Text attribute
*/ */
public void addText( String msg ) public void addText( String msg )
throws TaskException
{ {
message += project.replaceProperties( msg ); message += project.replaceProperties( msg );
} }


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

@@ -167,6 +167,7 @@ public class ExecuteOn extends ExecTask
* @return The Commandline value * @return The Commandline value
*/ */
protected String[] getCommandline( String[] srcFiles, File[] baseDirs ) protected String[] getCommandline( String[] srcFiles, File[] baseDirs )
throws TaskException
{ {
Vector targets = new Vector(); Vector targets = new Vector();
if( targetFilePos != null ) if( targetFilePos != null )


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

@@ -41,6 +41,7 @@ public class Exit extends Task
* @param msg The feature to be added to the Text attribute * @param msg The feature to be added to the Text attribute
*/ */
public void addText( String msg ) public void addText( String msg )
throws TaskException
{ {
message += project.replaceProperties( msg ); message += project.replaceProperties( msg );
} }


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

@@ -151,6 +151,7 @@ public class Expand extends MatchingTask
* This method is to be overridden by extending unarchival tasks. * This method is to be overridden by extending unarchival tasks.
*/ */
protected void expandFile( FileUtils fileUtils, File srcF, File dir ) protected void expandFile( FileUtils fileUtils, File srcF, File dir )
throws TaskException
{ {
ZipInputStream zis = null; ZipInputStream zis = null;
try try
@@ -192,7 +193,7 @@ public class Expand extends MatchingTask
InputStream compressedInputStream, InputStream compressedInputStream,
String entryName, String entryName,
Date entryDate, boolean isDirectory ) Date entryDate, boolean isDirectory )
throws IOException
throws IOException, TaskException
{ {


if( patternsets != null && patternsets.size() > 0 ) if( patternsets != null && patternsets.size() > 0 )


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

@@ -455,6 +455,7 @@ public class FixCRLF extends MatchingTask
*/ */
private void notInConstant( OneLiner.BufferLine bufline, int end, private void notInConstant( OneLiner.BufferLine bufline, int end,
BufferedWriter outWriter ) BufferedWriter outWriter )
throws TaskException
{ {
// N.B. both column and string index are zero-based // N.B. both column and string index are zero-based
// Process a string not part of a constant; // Process a string not part of a constant;
@@ -922,7 +923,14 @@ public class FixCRLF extends MatchingTask
} }
BufferLine tmpLine = BufferLine tmpLine =
new BufferLine( line.toString(), eolStr.toString() ); new BufferLine( line.toString(), eolStr.toString() );
nextLine();
try
{
nextLine();
}
catch( TaskException e )
{
throw new NoSuchElementException();
}
return tmpLine; return tmpLine;
} }




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

@@ -831,17 +831,6 @@ public class Javac extends MatchingTask
"javac1.4".equals( compiler ); "javac1.4".equals( compiler );
} }


/**
* Recreate src
*
* @return a nested src element.
*/
protected Path recreateSrc()
{
src = null;
return createSrc();
}

/** /**
* Clear the list of files to be compiled and copied.. * Clear the list of files to be compiled and copied..
*/ */


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

@@ -116,11 +116,13 @@ public class Javadoc extends Task
* @param r The new BootClasspathRef value * @param r The new BootClasspathRef value
*/ */
public void setBootClasspathRef( Reference r ) public void setBootClasspathRef( Reference r )
throws TaskException
{ {
createBootclasspath().setRefid( r ); createBootclasspath().setRefid( r );
} }


public void setBootclasspath( Path src ) public void setBootclasspath( Path src )
throws TaskException
{ {
if( bootclasspath == null ) if( bootclasspath == null )
{ {
@@ -145,6 +147,7 @@ public class Javadoc extends Task
} }


public void setClasspath( Path src ) public void setClasspath( Path src )
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
{ {
@@ -162,6 +165,7 @@ public class Javadoc extends Task
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -209,6 +213,7 @@ public class Javadoc extends Task
} }


public void setDocletPathRef( Reference r ) public void setDocletPathRef( Reference r )
throws TaskException
{ {
if( doclet == null ) if( doclet == null )
{ {
@@ -445,6 +450,7 @@ public class Javadoc extends Task
} }


public void setSourcepath( Path src ) public void setSourcepath( Path src )
throws TaskException
{ {
if( sourcePath == null ) if( sourcePath == null )
{ {
@@ -462,6 +468,7 @@ public class Javadoc extends Task
* @param r The new SourcepathRef value * @param r The new SourcepathRef value
*/ */
public void setSourcepathRef( Reference r ) public void setSourcepathRef( Reference r )
throws TaskException
{ {
createSourcepath().setRefid( r ); createSourcepath().setRefid( r );
} }
@@ -557,11 +564,13 @@ public class Javadoc extends Task
} }


public void addSource( SourceFile sf ) public void addSource( SourceFile sf )
throws TaskException
{ {
sourceFiles.addElement( sf ); sourceFiles.addElement( sf );
} }


public Path createBootclasspath() public Path createBootclasspath()
throws TaskException
{ {
if( bootclasspath == null ) if( bootclasspath == null )
{ {
@@ -571,6 +580,7 @@ public class Javadoc extends Task
} }


public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
{ {
@@ -600,6 +610,7 @@ public class Javadoc extends Task
} }


public Path createSourcepath() public Path createSourcepath()
throws TaskException
{ {
if( sourcePath == null ) if( sourcePath == null )
{ {
@@ -956,6 +967,7 @@ public class Javadoc extends Task
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected String expand( String content ) protected String expand( String content )
throws TaskException
{ {
return project.replaceProperties( content ); return project.replaceProperties( content );
} }
@@ -1242,6 +1254,7 @@ public class Javadoc extends Task
} }


public void setPath( Path path ) public void setPath( Path path )
throws TaskException
{ {
if( this.path == null ) if( this.path == null )
{ {
@@ -1259,6 +1272,7 @@ public class Javadoc extends Task
* @param r The new PathRef value * @param r The new PathRef value
*/ */
public void setPathRef( Reference r ) public void setPathRef( Reference r )
throws TaskException
{ {
createPath().setRefid( r ); createPath().setRefid( r );
} }
@@ -1287,6 +1301,7 @@ public class Javadoc extends Task
} }


public Path createPath() public Path createPath()
throws TaskException
{ {
if( path == null ) if( path == null )
{ {


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

@@ -109,7 +109,7 @@ public class Manifest extends Task
* @throws IOException if the manifest cannot be read from the reader. * @throws IOException if the manifest cannot be read from the reader.
*/ */
public Manifest( Reader r ) public Manifest( Reader r )
throws ManifestException, IOException
throws ManifestException, TaskException, IOException
{ {
BufferedReader reader = new BufferedReader( r ); BufferedReader reader = new BufferedReader( r );
// This should be the manifest version // This should be the manifest version
@@ -239,7 +239,7 @@ public class Manifest extends Task
} }


public void addConfiguredAttribute( Attribute attribute ) public void addConfiguredAttribute( Attribute attribute )
throws ManifestException
throws ManifestException, TaskException
{ {
mainSection.addConfiguredAttribute( attribute ); mainSection.addConfiguredAttribute( attribute );
} }
@@ -417,7 +417,7 @@ public class Manifest extends Task
{ {
write( new PrintWriter( sw ) ); write( new PrintWriter( sw ) );
} }
catch( IOException e )
catch( Exception e )
{ {
return null; return null;
} }
@@ -431,7 +431,7 @@ public class Manifest extends Task
* @throws IOException if the manifest cannot be written * @throws IOException if the manifest cannot be written
*/ */
public void write( PrintWriter writer ) public void write( PrintWriter writer )
throws IOException
throws IOException, TaskException
{ {
writer.println( ATTRIBUTE_MANIFEST_VERSION + ": " + manifestVersion ); writer.println( ATTRIBUTE_MANIFEST_VERSION + ": " + manifestVersion );
String signatureVersion = mainSection.getAttributeValue( ATTRIBUTE_SIGNATURE_VERSION ); String signatureVersion = mainSection.getAttributeValue( ATTRIBUTE_SIGNATURE_VERSION );
@@ -862,7 +862,7 @@ public class Manifest extends Task
* @throws IOException if the section cannot be read from the reader. * @throws IOException if the section cannot be read from the reader.
*/ */
public String read( BufferedReader reader ) public String read( BufferedReader reader )
throws ManifestException, IOException
throws ManifestException, IOException, TaskException
{ {
Attribute attribute = null; Attribute attribute = null;
while( true ) while( true )


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

@@ -47,6 +47,7 @@ public class Move extends Copy
* @param d Description of Parameter * @param d Description of Parameter
*/ */
protected void deleteDir( File d ) protected void deleteDir( File d )
throws TaskException
{ {
String[] list = d.list(); String[] list = d.list();
if( list == null ) if( list == null )
@@ -77,6 +78,7 @@ public class Move extends Copy
//************************************************************************ //************************************************************************


protected void doFileOperations() protected void doFileOperations()
throws TaskException
{ {
//Attempt complete directory renames, if any, first. //Attempt complete directory renames, if any, first.
if( completeDirMap.size() > 0 ) if( completeDirMap.size() > 0 )


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

@@ -98,11 +98,13 @@ public class Parallel extends Task
{ {
firstException = t; firstException = t;
} }
/*
if( t instanceof TaskException && if( t instanceof TaskException &&
firstLocation == Location.UNKNOWN_LOCATION ) firstLocation == Location.UNKNOWN_LOCATION )
{ {
firstLocation = ( (TaskException)t ).getLocation(); firstLocation = ( (TaskException)t ).getLocation();
} }
*/
exceptionMessage.append( lSep ); exceptionMessage.append( lSep );
exceptionMessage.append( t.getMessage() ); exceptionMessage.append( t.getMessage() );
} }


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

@@ -68,6 +68,7 @@ public class Patch extends Task
* @param file The new Patchfile value * @param file The new Patchfile value
*/ */
public void setPatchfile( File file ) public void setPatchfile( File file )
throws TaskException
{ {
if( !file.exists() ) if( !file.exists() )
{ {


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

@@ -77,6 +77,7 @@ public class PathConvert extends Task
* @param r The new Refid value * @param r The new Refid value
*/ */
public void setRefid( Reference r ) public void setRefid( Reference r )
throws TaskException
{ {
if( path != null ) if( path != null )
throw noChildrenAllowed(); throw noChildrenAllowed();
@@ -90,8 +91,8 @@ public class PathConvert extends Task
* @param target The new Targetos value * @param target The new Targetos value
*/ */
public void setTargetos( String target ) public void setTargetos( String target )
throws TaskException
{ {

targetOS = target.toLowerCase(); targetOS = target.toLowerCase();


if( !targetOS.equals( "windows" ) && !target.equals( "unix" ) && if( !targetOS.equals( "windows" ) && !target.equals( "unix" ) &&
@@ -139,8 +140,8 @@ public class PathConvert extends Task
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createPath() public Path createPath()
throws TaskException
{ {

if( isReference() ) if( isReference() )
throw noChildrenAllowed(); throw noChildrenAllowed();


@@ -159,7 +160,6 @@ public class PathConvert extends Task
public void execute() public void execute()
throws TaskException throws TaskException
{ {

// If we are a reference, the create a Path from the reference // If we are a reference, the create a Path from the reference
if( isReference() ) if( isReference() )
{ {
@@ -238,8 +238,8 @@ public class PathConvert extends Task
* @return String Updated element * @return String Updated element
*/ */
private String mapElement( String elem ) private String mapElement( String elem )
throws TaskException
{ {

int size = prefixMap.size(); int size = prefixMap.size();


if( size != 0 ) if( size != 0 )
@@ -365,6 +365,7 @@ public class PathConvert extends Task
* @return String Updated path element after mapping * @return String Updated path element after mapping
*/ */
public String apply( String elem ) public String apply( String elem )
throws TaskException
{ {
if( from == null || to == null ) if( from == null || to == null )
{ {


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

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


public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -66,6 +67,7 @@ public class Property extends Task
} }


public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -136,6 +138,7 @@ public class Property extends Task
} }


public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -192,6 +195,7 @@ public class Property extends Task
} }


protected void addProperties( Properties props ) protected void addProperties( Properties props )
throws TaskException
{ {
resolveAllProperties( props ); resolveAllProperties( props );
Enumeration e = props.keys(); Enumeration e = props.keys();


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

@@ -682,7 +682,6 @@ public class Rmic extends MatchingTask
{ {
String msg = "Failed to copy " + oldFile + " to " + String msg = "Failed to copy " + oldFile + " to " +
newFile + " due to " + ioe.getMessage(); newFile + " due to " + ioe.getMessage();
newFile + " due to " + ioe.getMessage();
throw new TaskException( msg, ioe ); throw new TaskException( msg, ioe );
} }
} }


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

@@ -171,6 +171,7 @@ public class SQLExec extends Task
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -188,6 +189,7 @@ public class SQLExec extends Task
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -364,6 +366,7 @@ public class SQLExec extends Task
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -739,7 +742,7 @@ public class SQLExec extends Task
} }


protected void runStatements( Reader reader, PrintStream out ) protected void runStatements( Reader reader, PrintStream out )
throws SQLException, IOException
throws SQLException, IOException, TaskException
{ {
String sql = ""; String sql = "";
String line = ""; String line = "";
@@ -845,7 +848,7 @@ public class SQLExec extends Task
} }


private void runTransaction( PrintStream out ) private void runTransaction( PrintStream out )
throws IOException, SQLException
throws IOException, SQLException, TaskException
{ {
if( tSqlCommand.length() != 0 ) if( tSqlCommand.length() != 0 )
{ {


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

@@ -222,7 +222,7 @@ public class Tar extends MatchingTask


protected void tarFile( File file, TarOutputStream tOut, String vPath, protected void tarFile( File file, TarOutputStream tOut, String vPath,
TarFileSet tarFileSet ) TarFileSet tarFileSet )
throws IOException
throws IOException, TaskException
{ {
FileInputStream fIn = null; FileInputStream fIn = null;


@@ -341,6 +341,7 @@ public class Tar extends MatchingTask
* for the project. * for the project.
*/ */
public String[] getFiles( Project p ) public String[] getFiles( Project p )
throws TaskException
{ {
if( files == null ) if( files == null )
{ {
@@ -380,7 +381,6 @@ public class Tar extends MatchingTask
*/ */
public static class TarLongFileMode extends EnumeratedAttribute public static class TarLongFileMode extends EnumeratedAttribute
{ {

// permissable values for longfile attribute // permissable values for longfile attribute
public final static String WARN = "warn"; public final static String WARN = "warn";
public final static String FAIL = "fail"; public final static String FAIL = "fail";
@@ -391,6 +391,7 @@ public class Tar extends MatchingTask
private final String[] validModes = {WARN, FAIL, TRUNCATE, GNU, OMIT}; private final String[] validModes = {WARN, FAIL, TRUNCATE, GNU, OMIT};


public TarLongFileMode() public TarLongFileMode()
throws TaskException
{ {
super(); super();
setValue( WARN ); setValue( WARN );


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

@@ -153,6 +153,7 @@ public class Tstamp extends Task
} }


public void setLocale( String locale ) public void setLocale( String locale )
throws TaskException
{ {
StringTokenizer st = new StringTokenizer( locale, " \t\n\r\f," ); StringTokenizer st = new StringTokenizer( locale, " \t\n\r\f," );
try try
@@ -207,6 +208,7 @@ public class Tstamp extends Task
} }


public void execute( Project project, Date date, Location location ) public void execute( Project project, Date date, Location location )
throws TaskException
{ {
if( propertyName == null ) if( propertyName == null )
{ {


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

@@ -26,6 +26,7 @@ public class Untar extends Expand
{ {


protected void expandFile( FileUtils fileUtils, File srcF, File dir ) protected void expandFile( FileUtils fileUtils, File srcF, File dir )
throws TaskException
{ {
TarInputStream tis = null; TarInputStream tis = null;
try try


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

@@ -107,6 +107,7 @@ public class UpToDate extends MatchingTask implements Condition
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public boolean eval() public boolean eval()
throws TaskException
{ {
if( sourceFileSets.size() == 0 ) if( sourceFileSets.size() == 0 )
{ {


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

@@ -33,6 +33,7 @@ public class War extends Jar
} }


public void setWebxml( File descr ) public void setWebxml( File descr )
throws TaskException
{ {
deploymentDescriptor = descr; deploymentDescriptor = descr;
if( !deploymentDescriptor.exists() ) if( !deploymentDescriptor.exists() )


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

@@ -91,6 +91,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
createClasspath().append( classpath ); createClasspath().append( classpath );
} }
@@ -102,6 +103,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
}//-- setSourceDir }//-- setSourceDir
@@ -191,6 +193,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
{ {
@@ -279,6 +282,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger
} }


protected XSLTLiaison getLiaison() protected XSLTLiaison getLiaison()
throws TaskException
{ {
// if processor wasn't specified, see if TraX is available. If not, // if processor wasn't specified, see if TraX is available. If not,
// default it to xslp or xalan, depending on which is in the classpath // default it to xslp or xalan, depending on which is in the classpath


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

@@ -384,6 +384,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected int executeExternalCompile( String[] args, int firstFileName ) protected int executeExternalCompile( String[] args, int firstFileName )
throws TaskException
{ {
String[] commandArray = null; String[] commandArray = null;
File tmpFile = null; File tmpFile = null;


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

@@ -21,7 +21,9 @@ import org.apache.tools.ant.ProjectComponent;
* *
* @author <a href="mailto:denis@network365.com">Denis Hennessy</a> * @author <a href="mailto:denis@network365.com">Denis Hennessy</a>
*/ */
public class Http extends ProjectComponent implements Condition
public class Http
extends ProjectComponent
implements Condition
{ {
String spec = null; String spec = null;




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

@@ -18,7 +18,9 @@ import org.apache.tools.ant.ProjectComponent;
* *
* @author <a href="mailto:denis@network365.com">Denis Hennessy</a> * @author <a href="mailto:denis@network365.com">Denis Hennessy</a>
*/ */
public class Socket extends ProjectComponent implements Condition
public class Socket
extends ProjectComponent
implements Condition
{ {
String server = null; String server = null;
int port = 0; int port = 0;


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

@@ -100,6 +100,7 @@ public class Rpm extends Task
} }


public void setSpecFile( String sf ) public void setSpecFile( String sf )
throws TaskException
{ {
if( ( sf == null ) || ( sf.trim().equals( "" ) ) ) if( ( sf == null ) || ( sf.trim().equals( "" ) ) )
{ {


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

@@ -109,8 +109,8 @@ public class XMLValidateTask extends Task
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {

if( this.classpath == null ) if( this.classpath == null )
{ {
this.classpath = classpath; this.classpath = classpath;
@@ -126,6 +126,7 @@ public class XMLValidateTask extends Task
* @see #setClasspath * @see #setClasspath
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -202,6 +203,7 @@ public class XMLValidateTask extends Task
* @see #setClasspath * @see #setClasspath
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -319,6 +321,7 @@ public class XMLValidateTask extends Task
* parse the file * parse the file
*/ */
private void doValidate( File afile ) private void doValidate( File afile )
throws TaskException
{ {
try try
{ {


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

@@ -119,7 +119,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler
* @exception IOException Description of Exception * @exception IOException Description of Exception
*/ */
public void setProcessOutputStream( InputStream is ) public void setProcessOutputStream( InputStream is )
throws IOException
throws TaskException, IOException
{ {


String buffer = ""; String buffer = "";


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

@@ -107,6 +107,7 @@ public abstract class Continuus extends Task
} }


protected int run( Commandline cmd, ExecuteStreamHandler handler ) protected int run( Commandline cmd, ExecuteStreamHandler handler )
throws TaskException
{ {
try try
{ {


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

@@ -13,6 +13,7 @@ import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.taskdefs.LogStreamHandler; import org.apache.tools.ant.taskdefs.LogStreamHandler;
import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.Commandline;
import java.io.IOException;


/** /**
* A base class for creating tasks for executing commands on ClearCase. <p> * A base class for creating tasks for executing commands on ClearCase. <p>
@@ -103,6 +104,7 @@ public abstract class ClearCase extends Task
} }


protected int run( Commandline cmd ) protected int run( Commandline cmd )
throws TaskException
{ {
try try
{ {
@@ -113,7 +115,7 @@ public abstract class ClearCase extends Task
exe.setCommandline( cmd.getCommandline() ); exe.setCommandline( cmd.getCommandline() );
return exe.execute(); return exe.execute();
} }
catch( java.io.IOException e )
catch( IOException e )
{ {
throw new TaskException( "Error", e ); throw new TaskException( "Error", e );
} }


+ 4
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java View File

@@ -105,6 +105,7 @@ public class Depend extends MatchingTask
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( dependClasspath == null ) if( dependClasspath == null )
{ {
@@ -122,6 +123,7 @@ public class Depend extends MatchingTask
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -178,6 +180,7 @@ public class Depend extends MatchingTask
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( dependClasspath == null ) if( dependClasspath == null )
{ {
@@ -359,6 +362,7 @@ public class Depend extends MatchingTask
* @return a vector containing the classes to analyse. * @return a vector containing the classes to analyse.
*/ */
private Vector getClassFiles( Path classLocations ) private Vector getClassFiles( Path classLocations )
throws TaskException
{ {
// break the classLocations into its components. // break the classLocations into its components.
String[] classLocationsList = classLocations.list(); String[] classLocationsList = classLocations.list();


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

@@ -280,6 +280,7 @@ public class CSharp
*/ */


public CSharp() public CSharp()
throws TaskException
{ {
Clear(); Clear();
setIncludes( csc_file_pattern ); setIncludes( csc_file_pattern );
@@ -417,6 +418,7 @@ public class CSharp
* @param path another path to append * @param path another path to append
*/ */
public void setReferenceFiles( Path path ) public void setReferenceFiles( Path path )
throws TaskException
{ {
//demand create pathlist //demand create pathlist
if( _referenceFiles == null ) if( _referenceFiles == null )


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

@@ -119,6 +119,7 @@ public class Ilasm
* constructor inits everything and set up the search pattern * constructor inits everything and set up the search pattern
*/ */
public Ilasm() public Ilasm()
throws TaskException
{ {
Clear(); Clear();
setIncludes( file_pattern ); setIncludes( file_pattern );


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

@@ -76,6 +76,7 @@ public class NetCommand
*/ */


public NetCommand( Task owner, String title, String program ) public NetCommand( Task owner, String title, String program )
throws TaskException
{ {
_owner = owner; _owner = owner;
_title = title; _title = title;
@@ -196,6 +197,7 @@ public class NetCommand
* set up the command sequence.. * set up the command sequence..
*/ */
protected void prepareExecutor() protected void prepareExecutor()
throws TaskException
{ {
// default directory to the project's base directory // default directory to the project's base directory
File dir = _owner.getProject().getBaseDir(); File dir = _owner.getProject().getBaseDir();


+ 3
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java View File

@@ -55,6 +55,7 @@ public class BorlandGenerateClient extends Task
Path classpath; Path classpath;


public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -67,6 +68,7 @@ public class BorlandGenerateClient extends Task
} }


public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -92,6 +94,7 @@ public class BorlandGenerateClient extends Task
} }


public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {


+ 7
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java View File

@@ -59,6 +59,7 @@ public class JlinkTask extends MatchingTask
* @param addfiles The new Addfiles value * @param addfiles The new Addfiles value
*/ */
public void setAddfiles( Path addfiles ) public void setAddfiles( Path addfiles )
throws TaskException
{ {
if( this.addfiles == null ) if( this.addfiles == null )
{ {
@@ -86,6 +87,7 @@ public class JlinkTask extends MatchingTask
* @param mergefiles The new Mergefiles value * @param mergefiles The new Mergefiles value
*/ */
public void setMergefiles( Path mergefiles ) public void setMergefiles( Path mergefiles )
throws TaskException
{ {
if( this.mergefiles == null ) if( this.mergefiles == null )
{ {
@@ -113,6 +115,7 @@ public class JlinkTask extends MatchingTask
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createAddfiles() public Path createAddfiles()
throws TaskException
{ {
if( this.addfiles == null ) if( this.addfiles == null )
{ {
@@ -128,6 +131,7 @@ public class JlinkTask extends MatchingTask
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createMergefiles() public Path createMergefiles()
throws TaskException
{ {
if( this.mergefiles == null ) if( this.mergefiles == null )
{ {
@@ -179,11 +183,13 @@ public class JlinkTask extends MatchingTask
} }


private boolean haveAddFiles() private boolean haveAddFiles()
throws TaskException
{ {
return haveEntries( addfiles ); return haveEntries( addfiles );
} }


private boolean haveEntries( Path p ) private boolean haveEntries( Path p )
throws TaskException
{ {
if( p == null ) if( p == null )
{ {
@@ -197,9 +203,9 @@ public class JlinkTask extends MatchingTask
} }


private boolean haveMergeFiles() private boolean haveMergeFiles()
throws TaskException
{ {
return haveEntries( mergefiles ); return haveEntries( mergefiles );
} }

} }



+ 4
- 0
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java View File

@@ -101,6 +101,7 @@ public class JspC extends MatchingTask
* @param cp The new Classpath value * @param cp The new Classpath value
*/ */
public void setClasspath( Path cp ) public void setClasspath( Path cp )
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
classpath = cp; classpath = cp;
@@ -114,6 +115,7 @@ public class JspC extends MatchingTask
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -187,6 +189,7 @@ public class JspC extends MatchingTask
* @param srcDir The new Srcdir value * @param srcDir The new Srcdir value
*/ */
public void setSrcdir( Path srcDir ) public void setSrcdir( Path srcDir )
throws TaskException
{ {
if( src == null ) if( src == null )
{ {
@@ -309,6 +312,7 @@ public class JspC extends MatchingTask
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
classpath = new Path( project ); classpath = new Path( project );


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

@@ -74,6 +74,7 @@ public class WLJspc extends MatchingTask
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( compileClasspath == null ) if( compileClasspath == null )
{ {
@@ -92,7 +93,6 @@ public class WLJspc extends MatchingTask
*/ */
public void setDest( File dirName ) public void setDest( File dirName )
{ {

destinationDirectory = dirName; destinationDirectory = dirName;
} }




+ 2
- 1
proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java View File

@@ -319,7 +319,7 @@ public class Pvcs extends org.apache.tools.ant.Task
* build... * build...
*/ */
public void execute() public void execute()
throws org.apache.tools.ant.TaskException
throws TaskException
{ {
Project aProj = getProject(); Project aProj = getProject();
int result = 0; int result = 0;
@@ -446,6 +446,7 @@ public class Pvcs extends org.apache.tools.ant.Task
} }


protected int runCmd( Commandline cmd, ExecuteStreamHandler out ) protected int runCmd( Commandline cmd, ExecuteStreamHandler out )
throws TaskException
{ {
try try
{ {


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

@@ -200,6 +200,7 @@ public abstract class MSVSS extends Task
} }


protected int run( Commandline cmd ) protected int run( Commandline cmd )
throws TaskException
{ {
try try
{ {


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

@@ -141,6 +141,7 @@ public class MSVSSHISTORY extends MSVSS
* @param attr The new Style value * @param attr The new Style value
*/ */
public void setStyle( BriefCodediffNofile attr ) public void setStyle( BriefCodediffNofile attr )
throws TaskException
{ {
String option = attr.getValue(); String option = attr.getValue();
if( option.equals( "brief" ) ) if( option.equals( "brief" ) )


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

@@ -10,6 +10,7 @@ package org.apache.tools.ant.taskdefs.rmic;
import java.io.File; import java.io.File;
import java.util.Random; import java.util.Random;
import java.util.Vector; import java.util.Vector;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Rmic; import org.apache.tools.ant.taskdefs.Rmic;
import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.Commandline;
@@ -51,6 +52,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter
* @return The Classpath value * @return The Classpath value
*/ */
public Path getClasspath() public Path getClasspath()
throws TaskException
{ {
return getCompileClasspath(); return getCompileClasspath();
} }
@@ -77,6 +79,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected Commandline setupRmicCommand() protected Commandline setupRmicCommand()
throws TaskException
{ {
return setupRmicCommand( null ); return setupRmicCommand( null );
} }
@@ -88,6 +91,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected Commandline setupRmicCommand( String[] options ) protected Commandline setupRmicCommand( String[] options )
throws TaskException
{ {
Commandline cmd = new Commandline(); Commandline cmd = new Commandline();


@@ -178,6 +182,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter
* @return The CompileClasspath value * @return The CompileClasspath value
*/ */
protected Path getCompileClasspath() protected Path getCompileClasspath()
throws TaskException
{ {
// add dest dir to classpath so that previously compiled and // add dest dir to classpath so that previously compiled and
// untouched classes are on classpath // untouched classes are on classpath


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

@@ -57,5 +57,6 @@ public interface RmicAdapter
* *
* @return The Classpath value * @return The Classpath value
*/ */
Path getClasspath();
Path getClasspath()
throws TaskException;
} }

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

@@ -92,12 +92,6 @@ public abstract class DataType
return ref != null; return ref != null;
} }


public void execute()
throws TaskException
{
//HACK: NOOP execute - should be deleted in the future!
}

/** /**
* Performs the check for circular references and returns the referenced * Performs the check for circular references and returns the referenced
* object. * object.


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

@@ -7,6 +7,8 @@
*/ */
package org.apache.tools.ant.util; package org.apache.tools.ant.util;


import org.apache.myrmidon.api.TaskException;

/** /**
* Interface to be used by SourceFileScanner. <p> * Interface to be used by SourceFileScanner. <p>
* *
@@ -27,7 +29,8 @@ public interface FileNameMapper
* *
* @param from The new From value * @param from The new From value
*/ */
void setFrom( String from );
void setFrom( String from )
throws TaskException;


/** /**
* Sets the to part of the transformation rule. * Sets the to part of the transformation rule.


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

@@ -69,9 +69,9 @@ public class RegexpPatternMapper implements FileNameMapper
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public String[] mapFileName( String sourceFileName ) public String[] mapFileName( String sourceFileName )
throws TaskException
{ {
if( reg == null || to == null
|| !reg.matches( sourceFileName ) )
if( reg == null || to == null || !reg.matches( sourceFileName ) )
{ {
return null; return null;
} }
@@ -86,6 +86,7 @@ public class RegexpPatternMapper implements FileNameMapper
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected String replaceReferences( String source ) protected String replaceReferences( String source )
throws TaskException
{ {
Vector v = reg.getGroups( source ); Vector v = reg.getGroups( source );




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

@@ -46,6 +46,12 @@ public abstract class ProjectComponent
return project; return project;
} }


public void execute()
throws TaskException
{
//HACK: NOOP execute - should be deleted in the future!
}

protected File resolveFile( final String name ) protected File resolveFile( final String name )
throws TaskException throws TaskException
{ {


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

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


import org.apache.myrmidon.api.TaskException;

/** /**
* Interface for objects which can contain tasks <p> * Interface for objects which can contain tasks <p>
* *
@@ -23,6 +25,7 @@ public interface TaskContainer
* *
* @param task the task to be added to this container * @param task the task to be added to this container
*/ */
void addTask( Task task );
void addTask( Task task )
throws TaskException;
} }



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

@@ -32,6 +32,7 @@ public class Chmod extends ExecuteOn
private boolean havePerm = false; private boolean havePerm = false;


public Chmod() public Chmod()
throws TaskException
{ {
super.setExecutable( "chmod" ); super.setExecutable( "chmod" );
super.setParallel( true ); super.setParallel( true );


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

@@ -34,6 +34,7 @@ public class Ear extends Jar
} }


public void setAppxml( File descr ) public void setAppxml( File descr )
throws TaskException
{ {
deploymentDescriptor = descr; deploymentDescriptor = descr;
if( !deploymentDescriptor.exists() ) if( !deploymentDescriptor.exists() )


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

@@ -106,6 +106,7 @@ public class Echo extends Task
* @param msg The feature to be added to the Text attribute * @param msg The feature to be added to the Text attribute
*/ */
public void addText( String msg ) public void addText( String msg )
throws TaskException
{ {
message += project.replaceProperties( msg ); message += project.replaceProperties( msg );
} }


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

@@ -167,6 +167,7 @@ public class ExecuteOn extends ExecTask
* @return The Commandline value * @return The Commandline value
*/ */
protected String[] getCommandline( String[] srcFiles, File[] baseDirs ) protected String[] getCommandline( String[] srcFiles, File[] baseDirs )
throws TaskException
{ {
Vector targets = new Vector(); Vector targets = new Vector();
if( targetFilePos != null ) if( targetFilePos != null )


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

@@ -41,6 +41,7 @@ public class Exit extends Task
* @param msg The feature to be added to the Text attribute * @param msg The feature to be added to the Text attribute
*/ */
public void addText( String msg ) public void addText( String msg )
throws TaskException
{ {
message += project.replaceProperties( msg ); message += project.replaceProperties( msg );
} }


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

@@ -151,6 +151,7 @@ public class Expand extends MatchingTask
* This method is to be overridden by extending unarchival tasks. * This method is to be overridden by extending unarchival tasks.
*/ */
protected void expandFile( FileUtils fileUtils, File srcF, File dir ) protected void expandFile( FileUtils fileUtils, File srcF, File dir )
throws TaskException
{ {
ZipInputStream zis = null; ZipInputStream zis = null;
try try
@@ -192,7 +193,7 @@ public class Expand extends MatchingTask
InputStream compressedInputStream, InputStream compressedInputStream,
String entryName, String entryName,
Date entryDate, boolean isDirectory ) Date entryDate, boolean isDirectory )
throws IOException
throws IOException, TaskException
{ {


if( patternsets != null && patternsets.size() > 0 ) if( patternsets != null && patternsets.size() > 0 )


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

@@ -455,6 +455,7 @@ public class FixCRLF extends MatchingTask
*/ */
private void notInConstant( OneLiner.BufferLine bufline, int end, private void notInConstant( OneLiner.BufferLine bufline, int end,
BufferedWriter outWriter ) BufferedWriter outWriter )
throws TaskException
{ {
// N.B. both column and string index are zero-based // N.B. both column and string index are zero-based
// Process a string not part of a constant; // Process a string not part of a constant;
@@ -922,7 +923,14 @@ public class FixCRLF extends MatchingTask
} }
BufferLine tmpLine = BufferLine tmpLine =
new BufferLine( line.toString(), eolStr.toString() ); new BufferLine( line.toString(), eolStr.toString() );
nextLine();
try
{
nextLine();
}
catch( TaskException e )
{
throw new NoSuchElementException();
}
return tmpLine; return tmpLine;
} }




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

@@ -831,17 +831,6 @@ public class Javac extends MatchingTask
"javac1.4".equals( compiler ); "javac1.4".equals( compiler );
} }


/**
* Recreate src
*
* @return a nested src element.
*/
protected Path recreateSrc()
{
src = null;
return createSrc();
}

/** /**
* Clear the list of files to be compiled and copied.. * Clear the list of files to be compiled and copied..
*/ */


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

@@ -116,11 +116,13 @@ public class Javadoc extends Task
* @param r The new BootClasspathRef value * @param r The new BootClasspathRef value
*/ */
public void setBootClasspathRef( Reference r ) public void setBootClasspathRef( Reference r )
throws TaskException
{ {
createBootclasspath().setRefid( r ); createBootclasspath().setRefid( r );
} }


public void setBootclasspath( Path src ) public void setBootclasspath( Path src )
throws TaskException
{ {
if( bootclasspath == null ) if( bootclasspath == null )
{ {
@@ -145,6 +147,7 @@ public class Javadoc extends Task
} }


public void setClasspath( Path src ) public void setClasspath( Path src )
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
{ {
@@ -162,6 +165,7 @@ public class Javadoc extends Task
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -209,6 +213,7 @@ public class Javadoc extends Task
} }


public void setDocletPathRef( Reference r ) public void setDocletPathRef( Reference r )
throws TaskException
{ {
if( doclet == null ) if( doclet == null )
{ {
@@ -445,6 +450,7 @@ public class Javadoc extends Task
} }


public void setSourcepath( Path src ) public void setSourcepath( Path src )
throws TaskException
{ {
if( sourcePath == null ) if( sourcePath == null )
{ {
@@ -462,6 +468,7 @@ public class Javadoc extends Task
* @param r The new SourcepathRef value * @param r The new SourcepathRef value
*/ */
public void setSourcepathRef( Reference r ) public void setSourcepathRef( Reference r )
throws TaskException
{ {
createSourcepath().setRefid( r ); createSourcepath().setRefid( r );
} }
@@ -557,11 +564,13 @@ public class Javadoc extends Task
} }


public void addSource( SourceFile sf ) public void addSource( SourceFile sf )
throws TaskException
{ {
sourceFiles.addElement( sf ); sourceFiles.addElement( sf );
} }


public Path createBootclasspath() public Path createBootclasspath()
throws TaskException
{ {
if( bootclasspath == null ) if( bootclasspath == null )
{ {
@@ -571,6 +580,7 @@ public class Javadoc extends Task
} }


public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
{ {
@@ -600,6 +610,7 @@ public class Javadoc extends Task
} }


public Path createSourcepath() public Path createSourcepath()
throws TaskException
{ {
if( sourcePath == null ) if( sourcePath == null )
{ {
@@ -956,6 +967,7 @@ public class Javadoc extends Task
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected String expand( String content ) protected String expand( String content )
throws TaskException
{ {
return project.replaceProperties( content ); return project.replaceProperties( content );
} }
@@ -1242,6 +1254,7 @@ public class Javadoc extends Task
} }


public void setPath( Path path ) public void setPath( Path path )
throws TaskException
{ {
if( this.path == null ) if( this.path == null )
{ {
@@ -1259,6 +1272,7 @@ public class Javadoc extends Task
* @param r The new PathRef value * @param r The new PathRef value
*/ */
public void setPathRef( Reference r ) public void setPathRef( Reference r )
throws TaskException
{ {
createPath().setRefid( r ); createPath().setRefid( r );
} }
@@ -1287,6 +1301,7 @@ public class Javadoc extends Task
} }


public Path createPath() public Path createPath()
throws TaskException
{ {
if( path == null ) if( path == null )
{ {


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

@@ -109,7 +109,7 @@ public class Manifest extends Task
* @throws IOException if the manifest cannot be read from the reader. * @throws IOException if the manifest cannot be read from the reader.
*/ */
public Manifest( Reader r ) public Manifest( Reader r )
throws ManifestException, IOException
throws ManifestException, TaskException, IOException
{ {
BufferedReader reader = new BufferedReader( r ); BufferedReader reader = new BufferedReader( r );
// This should be the manifest version // This should be the manifest version
@@ -239,7 +239,7 @@ public class Manifest extends Task
} }


public void addConfiguredAttribute( Attribute attribute ) public void addConfiguredAttribute( Attribute attribute )
throws ManifestException
throws ManifestException, TaskException
{ {
mainSection.addConfiguredAttribute( attribute ); mainSection.addConfiguredAttribute( attribute );
} }
@@ -417,7 +417,7 @@ public class Manifest extends Task
{ {
write( new PrintWriter( sw ) ); write( new PrintWriter( sw ) );
} }
catch( IOException e )
catch( Exception e )
{ {
return null; return null;
} }
@@ -431,7 +431,7 @@ public class Manifest extends Task
* @throws IOException if the manifest cannot be written * @throws IOException if the manifest cannot be written
*/ */
public void write( PrintWriter writer ) public void write( PrintWriter writer )
throws IOException
throws IOException, TaskException
{ {
writer.println( ATTRIBUTE_MANIFEST_VERSION + ": " + manifestVersion ); writer.println( ATTRIBUTE_MANIFEST_VERSION + ": " + manifestVersion );
String signatureVersion = mainSection.getAttributeValue( ATTRIBUTE_SIGNATURE_VERSION ); String signatureVersion = mainSection.getAttributeValue( ATTRIBUTE_SIGNATURE_VERSION );
@@ -862,7 +862,7 @@ public class Manifest extends Task
* @throws IOException if the section cannot be read from the reader. * @throws IOException if the section cannot be read from the reader.
*/ */
public String read( BufferedReader reader ) public String read( BufferedReader reader )
throws ManifestException, IOException
throws ManifestException, IOException, TaskException
{ {
Attribute attribute = null; Attribute attribute = null;
while( true ) while( true )


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

@@ -47,6 +47,7 @@ public class Move extends Copy
* @param d Description of Parameter * @param d Description of Parameter
*/ */
protected void deleteDir( File d ) protected void deleteDir( File d )
throws TaskException
{ {
String[] list = d.list(); String[] list = d.list();
if( list == null ) if( list == null )
@@ -77,6 +78,7 @@ public class Move extends Copy
//************************************************************************ //************************************************************************


protected void doFileOperations() protected void doFileOperations()
throws TaskException
{ {
//Attempt complete directory renames, if any, first. //Attempt complete directory renames, if any, first.
if( completeDirMap.size() > 0 ) if( completeDirMap.size() > 0 )


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

@@ -98,11 +98,13 @@ public class Parallel extends Task
{ {
firstException = t; firstException = t;
} }
/*
if( t instanceof TaskException && if( t instanceof TaskException &&
firstLocation == Location.UNKNOWN_LOCATION ) firstLocation == Location.UNKNOWN_LOCATION )
{ {
firstLocation = ( (TaskException)t ).getLocation(); firstLocation = ( (TaskException)t ).getLocation();
} }
*/
exceptionMessage.append( lSep ); exceptionMessage.append( lSep );
exceptionMessage.append( t.getMessage() ); exceptionMessage.append( t.getMessage() );
} }


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

@@ -68,6 +68,7 @@ public class Patch extends Task
* @param file The new Patchfile value * @param file The new Patchfile value
*/ */
public void setPatchfile( File file ) public void setPatchfile( File file )
throws TaskException
{ {
if( !file.exists() ) if( !file.exists() )
{ {


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

@@ -77,6 +77,7 @@ public class PathConvert extends Task
* @param r The new Refid value * @param r The new Refid value
*/ */
public void setRefid( Reference r ) public void setRefid( Reference r )
throws TaskException
{ {
if( path != null ) if( path != null )
throw noChildrenAllowed(); throw noChildrenAllowed();
@@ -90,8 +91,8 @@ public class PathConvert extends Task
* @param target The new Targetos value * @param target The new Targetos value
*/ */
public void setTargetos( String target ) public void setTargetos( String target )
throws TaskException
{ {

targetOS = target.toLowerCase(); targetOS = target.toLowerCase();


if( !targetOS.equals( "windows" ) && !target.equals( "unix" ) && if( !targetOS.equals( "windows" ) && !target.equals( "unix" ) &&
@@ -139,8 +140,8 @@ public class PathConvert extends Task
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createPath() public Path createPath()
throws TaskException
{ {

if( isReference() ) if( isReference() )
throw noChildrenAllowed(); throw noChildrenAllowed();


@@ -159,7 +160,6 @@ public class PathConvert extends Task
public void execute() public void execute()
throws TaskException throws TaskException
{ {

// If we are a reference, the create a Path from the reference // If we are a reference, the create a Path from the reference
if( isReference() ) if( isReference() )
{ {
@@ -238,8 +238,8 @@ public class PathConvert extends Task
* @return String Updated element * @return String Updated element
*/ */
private String mapElement( String elem ) private String mapElement( String elem )
throws TaskException
{ {

int size = prefixMap.size(); int size = prefixMap.size();


if( size != 0 ) if( size != 0 )
@@ -365,6 +365,7 @@ public class PathConvert extends Task
* @return String Updated path element after mapping * @return String Updated path element after mapping
*/ */
public String apply( String elem ) public String apply( String elem )
throws TaskException
{ {
if( from == null || to == null ) if( from == null || to == null )
{ {


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

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


public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -66,6 +67,7 @@ public class Property extends Task
} }


public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -136,6 +138,7 @@ public class Property extends Task
} }


public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -192,6 +195,7 @@ public class Property extends Task
} }


protected void addProperties( Properties props ) protected void addProperties( Properties props )
throws TaskException
{ {
resolveAllProperties( props ); resolveAllProperties( props );
Enumeration e = props.keys(); Enumeration e = props.keys();


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

@@ -682,7 +682,6 @@ public class Rmic extends MatchingTask
{ {
String msg = "Failed to copy " + oldFile + " to " + String msg = "Failed to copy " + oldFile + " to " +
newFile + " due to " + ioe.getMessage(); newFile + " due to " + ioe.getMessage();
newFile + " due to " + ioe.getMessage();
throw new TaskException( msg, ioe ); throw new TaskException( msg, ioe );
} }
} }


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

@@ -171,6 +171,7 @@ public class SQLExec extends Task
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -188,6 +189,7 @@ public class SQLExec extends Task
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -364,6 +366,7 @@ public class SQLExec extends Task
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -739,7 +742,7 @@ public class SQLExec extends Task
} }


protected void runStatements( Reader reader, PrintStream out ) protected void runStatements( Reader reader, PrintStream out )
throws SQLException, IOException
throws SQLException, IOException, TaskException
{ {
String sql = ""; String sql = "";
String line = ""; String line = "";
@@ -845,7 +848,7 @@ public class SQLExec extends Task
} }


private void runTransaction( PrintStream out ) private void runTransaction( PrintStream out )
throws IOException, SQLException
throws IOException, SQLException, TaskException
{ {
if( tSqlCommand.length() != 0 ) if( tSqlCommand.length() != 0 )
{ {


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

@@ -222,7 +222,7 @@ public class Tar extends MatchingTask


protected void tarFile( File file, TarOutputStream tOut, String vPath, protected void tarFile( File file, TarOutputStream tOut, String vPath,
TarFileSet tarFileSet ) TarFileSet tarFileSet )
throws IOException
throws IOException, TaskException
{ {
FileInputStream fIn = null; FileInputStream fIn = null;


@@ -341,6 +341,7 @@ public class Tar extends MatchingTask
* for the project. * for the project.
*/ */
public String[] getFiles( Project p ) public String[] getFiles( Project p )
throws TaskException
{ {
if( files == null ) if( files == null )
{ {
@@ -380,7 +381,6 @@ public class Tar extends MatchingTask
*/ */
public static class TarLongFileMode extends EnumeratedAttribute public static class TarLongFileMode extends EnumeratedAttribute
{ {

// permissable values for longfile attribute // permissable values for longfile attribute
public final static String WARN = "warn"; public final static String WARN = "warn";
public final static String FAIL = "fail"; public final static String FAIL = "fail";
@@ -391,6 +391,7 @@ public class Tar extends MatchingTask
private final String[] validModes = {WARN, FAIL, TRUNCATE, GNU, OMIT}; private final String[] validModes = {WARN, FAIL, TRUNCATE, GNU, OMIT};


public TarLongFileMode() public TarLongFileMode()
throws TaskException
{ {
super(); super();
setValue( WARN ); setValue( WARN );


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

@@ -153,6 +153,7 @@ public class Tstamp extends Task
} }


public void setLocale( String locale ) public void setLocale( String locale )
throws TaskException
{ {
StringTokenizer st = new StringTokenizer( locale, " \t\n\r\f," ); StringTokenizer st = new StringTokenizer( locale, " \t\n\r\f," );
try try
@@ -207,6 +208,7 @@ public class Tstamp extends Task
} }


public void execute( Project project, Date date, Location location ) public void execute( Project project, Date date, Location location )
throws TaskException
{ {
if( propertyName == null ) if( propertyName == null )
{ {


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

@@ -26,6 +26,7 @@ public class Untar extends Expand
{ {


protected void expandFile( FileUtils fileUtils, File srcF, File dir ) protected void expandFile( FileUtils fileUtils, File srcF, File dir )
throws TaskException
{ {
TarInputStream tis = null; TarInputStream tis = null;
try try


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

@@ -107,6 +107,7 @@ public class UpToDate extends MatchingTask implements Condition
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public boolean eval() public boolean eval()
throws TaskException
{ {
if( sourceFileSets.size() == 0 ) if( sourceFileSets.size() == 0 )
{ {


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

@@ -33,6 +33,7 @@ public class War extends Jar
} }


public void setWebxml( File descr ) public void setWebxml( File descr )
throws TaskException
{ {
deploymentDescriptor = descr; deploymentDescriptor = descr;
if( !deploymentDescriptor.exists() ) if( !deploymentDescriptor.exists() )


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

@@ -91,6 +91,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
createClasspath().append( classpath ); createClasspath().append( classpath );
} }
@@ -102,6 +103,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
}//-- setSourceDir }//-- setSourceDir
@@ -191,6 +193,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
{ {
@@ -279,6 +282,7 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger
} }


protected XSLTLiaison getLiaison() protected XSLTLiaison getLiaison()
throws TaskException
{ {
// if processor wasn't specified, see if TraX is available. If not, // if processor wasn't specified, see if TraX is available. If not,
// default it to xslp or xalan, depending on which is in the classpath // default it to xslp or xalan, depending on which is in the classpath


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

@@ -384,6 +384,7 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected int executeExternalCompile( String[] args, int firstFileName ) protected int executeExternalCompile( String[] args, int firstFileName )
throws TaskException
{ {
String[] commandArray = null; String[] commandArray = null;
File tmpFile = null; File tmpFile = null;


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

@@ -21,7 +21,9 @@ import org.apache.tools.ant.ProjectComponent;
* *
* @author <a href="mailto:denis@network365.com">Denis Hennessy</a> * @author <a href="mailto:denis@network365.com">Denis Hennessy</a>
*/ */
public class Http extends ProjectComponent implements Condition
public class Http
extends ProjectComponent
implements Condition
{ {
String spec = null; String spec = null;




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

@@ -18,7 +18,9 @@ import org.apache.tools.ant.ProjectComponent;
* *
* @author <a href="mailto:denis@network365.com">Denis Hennessy</a> * @author <a href="mailto:denis@network365.com">Denis Hennessy</a>
*/ */
public class Socket extends ProjectComponent implements Condition
public class Socket
extends ProjectComponent
implements Condition
{ {
String server = null; String server = null;
int port = 0; int port = 0;


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

@@ -100,6 +100,7 @@ public class Rpm extends Task
} }


public void setSpecFile( String sf ) public void setSpecFile( String sf )
throws TaskException
{ {
if( ( sf == null ) || ( sf.trim().equals( "" ) ) ) if( ( sf == null ) || ( sf.trim().equals( "" ) ) )
{ {


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

@@ -109,8 +109,8 @@ public class XMLValidateTask extends Task
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {

if( this.classpath == null ) if( this.classpath == null )
{ {
this.classpath = classpath; this.classpath = classpath;
@@ -126,6 +126,7 @@ public class XMLValidateTask extends Task
* @see #setClasspath * @see #setClasspath
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -202,6 +203,7 @@ public class XMLValidateTask extends Task
* @see #setClasspath * @see #setClasspath
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -319,6 +321,7 @@ public class XMLValidateTask extends Task
* parse the file * parse the file
*/ */
private void doValidate( File afile ) private void doValidate( File afile )
throws TaskException
{ {
try try
{ {


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

@@ -119,7 +119,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler
* @exception IOException Description of Exception * @exception IOException Description of Exception
*/ */
public void setProcessOutputStream( InputStream is ) public void setProcessOutputStream( InputStream is )
throws IOException
throws TaskException, IOException
{ {


String buffer = ""; String buffer = "";


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

@@ -107,6 +107,7 @@ public abstract class Continuus extends Task
} }


protected int run( Commandline cmd, ExecuteStreamHandler handler ) protected int run( Commandline cmd, ExecuteStreamHandler handler )
throws TaskException
{ {
try try
{ {


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

@@ -13,6 +13,7 @@ import org.apache.tools.ant.Task;
import org.apache.tools.ant.taskdefs.Execute; import org.apache.tools.ant.taskdefs.Execute;
import org.apache.tools.ant.taskdefs.LogStreamHandler; import org.apache.tools.ant.taskdefs.LogStreamHandler;
import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.Commandline;
import java.io.IOException;


/** /**
* A base class for creating tasks for executing commands on ClearCase. <p> * A base class for creating tasks for executing commands on ClearCase. <p>
@@ -103,6 +104,7 @@ public abstract class ClearCase extends Task
} }


protected int run( Commandline cmd ) protected int run( Commandline cmd )
throws TaskException
{ {
try try
{ {
@@ -113,7 +115,7 @@ public abstract class ClearCase extends Task
exe.setCommandline( cmd.getCommandline() ); exe.setCommandline( cmd.getCommandline() );
return exe.execute(); return exe.execute();
} }
catch( java.io.IOException e )
catch( IOException e )
{ {
throw new TaskException( "Error", e ); throw new TaskException( "Error", e );
} }


+ 4
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/depend/Depend.java View File

@@ -105,6 +105,7 @@ public class Depend extends MatchingTask
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( dependClasspath == null ) if( dependClasspath == null )
{ {
@@ -122,6 +123,7 @@ public class Depend extends MatchingTask
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -178,6 +180,7 @@ public class Depend extends MatchingTask
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( dependClasspath == null ) if( dependClasspath == null )
{ {
@@ -359,6 +362,7 @@ public class Depend extends MatchingTask
* @return a vector containing the classes to analyse. * @return a vector containing the classes to analyse.
*/ */
private Vector getClassFiles( Path classLocations ) private Vector getClassFiles( Path classLocations )
throws TaskException
{ {
// break the classLocations into its components. // break the classLocations into its components.
String[] classLocationsList = classLocations.list(); String[] classLocationsList = classLocations.list();


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

@@ -280,6 +280,7 @@ public class CSharp
*/ */


public CSharp() public CSharp()
throws TaskException
{ {
Clear(); Clear();
setIncludes( csc_file_pattern ); setIncludes( csc_file_pattern );
@@ -417,6 +418,7 @@ public class CSharp
* @param path another path to append * @param path another path to append
*/ */
public void setReferenceFiles( Path path ) public void setReferenceFiles( Path path )
throws TaskException
{ {
//demand create pathlist //demand create pathlist
if( _referenceFiles == null ) if( _referenceFiles == null )


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

@@ -119,6 +119,7 @@ public class Ilasm
* constructor inits everything and set up the search pattern * constructor inits everything and set up the search pattern
*/ */
public Ilasm() public Ilasm()
throws TaskException
{ {
Clear(); Clear();
setIncludes( file_pattern ); setIncludes( file_pattern );


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

@@ -76,6 +76,7 @@ public class NetCommand
*/ */


public NetCommand( Task owner, String title, String program ) public NetCommand( Task owner, String title, String program )
throws TaskException
{ {
_owner = owner; _owner = owner;
_title = title; _title = title;
@@ -196,6 +197,7 @@ public class NetCommand
* set up the command sequence.. * set up the command sequence..
*/ */
protected void prepareExecutor() protected void prepareExecutor()
throws TaskException
{ {
// default directory to the project's base directory // default directory to the project's base directory
File dir = _owner.getProject().getBaseDir(); File dir = _owner.getProject().getBaseDir();


+ 3
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/ejb/BorlandGenerateClient.java View File

@@ -55,6 +55,7 @@ public class BorlandGenerateClient extends Task
Path classpath; Path classpath;


public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {
@@ -67,6 +68,7 @@ public class BorlandGenerateClient extends Task
} }


public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -92,6 +94,7 @@ public class BorlandGenerateClient extends Task
} }


public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( this.classpath == null ) if( this.classpath == null )
{ {


+ 7
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java View File

@@ -59,6 +59,7 @@ public class JlinkTask extends MatchingTask
* @param addfiles The new Addfiles value * @param addfiles The new Addfiles value
*/ */
public void setAddfiles( Path addfiles ) public void setAddfiles( Path addfiles )
throws TaskException
{ {
if( this.addfiles == null ) if( this.addfiles == null )
{ {
@@ -86,6 +87,7 @@ public class JlinkTask extends MatchingTask
* @param mergefiles The new Mergefiles value * @param mergefiles The new Mergefiles value
*/ */
public void setMergefiles( Path mergefiles ) public void setMergefiles( Path mergefiles )
throws TaskException
{ {
if( this.mergefiles == null ) if( this.mergefiles == null )
{ {
@@ -113,6 +115,7 @@ public class JlinkTask extends MatchingTask
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createAddfiles() public Path createAddfiles()
throws TaskException
{ {
if( this.addfiles == null ) if( this.addfiles == null )
{ {
@@ -128,6 +131,7 @@ public class JlinkTask extends MatchingTask
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createMergefiles() public Path createMergefiles()
throws TaskException
{ {
if( this.mergefiles == null ) if( this.mergefiles == null )
{ {
@@ -179,11 +183,13 @@ public class JlinkTask extends MatchingTask
} }


private boolean haveAddFiles() private boolean haveAddFiles()
throws TaskException
{ {
return haveEntries( addfiles ); return haveEntries( addfiles );
} }


private boolean haveEntries( Path p ) private boolean haveEntries( Path p )
throws TaskException
{ {
if( p == null ) if( p == null )
{ {
@@ -197,9 +203,9 @@ public class JlinkTask extends MatchingTask
} }


private boolean haveMergeFiles() private boolean haveMergeFiles()
throws TaskException
{ {
return haveEntries( mergefiles ); return haveEntries( mergefiles );
} }

} }



+ 4
- 0
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java View File

@@ -101,6 +101,7 @@ public class JspC extends MatchingTask
* @param cp The new Classpath value * @param cp The new Classpath value
*/ */
public void setClasspath( Path cp ) public void setClasspath( Path cp )
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
classpath = cp; classpath = cp;
@@ -114,6 +115,7 @@ public class JspC extends MatchingTask
* @param r The new ClasspathRef value * @param r The new ClasspathRef value
*/ */
public void setClasspathRef( Reference r ) public void setClasspathRef( Reference r )
throws TaskException
{ {
createClasspath().setRefid( r ); createClasspath().setRefid( r );
} }
@@ -187,6 +189,7 @@ public class JspC extends MatchingTask
* @param srcDir The new Srcdir value * @param srcDir The new Srcdir value
*/ */
public void setSrcdir( Path srcDir ) public void setSrcdir( Path srcDir )
throws TaskException
{ {
if( src == null ) if( src == null )
{ {
@@ -309,6 +312,7 @@ public class JspC extends MatchingTask
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public Path createClasspath() public Path createClasspath()
throws TaskException
{ {
if( classpath == null ) if( classpath == null )
classpath = new Path( project ); classpath = new Path( project );


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

@@ -74,6 +74,7 @@ public class WLJspc extends MatchingTask
* @param classpath The new Classpath value * @param classpath The new Classpath value
*/ */
public void setClasspath( Path classpath ) public void setClasspath( Path classpath )
throws TaskException
{ {
if( compileClasspath == null ) if( compileClasspath == null )
{ {
@@ -92,7 +93,6 @@ public class WLJspc extends MatchingTask
*/ */
public void setDest( File dirName ) public void setDest( File dirName )
{ {

destinationDirectory = dirName; destinationDirectory = dirName;
} }




+ 2
- 1
proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java View File

@@ -319,7 +319,7 @@ public class Pvcs extends org.apache.tools.ant.Task
* build... * build...
*/ */
public void execute() public void execute()
throws org.apache.tools.ant.TaskException
throws TaskException
{ {
Project aProj = getProject(); Project aProj = getProject();
int result = 0; int result = 0;
@@ -446,6 +446,7 @@ public class Pvcs extends org.apache.tools.ant.Task
} }


protected int runCmd( Commandline cmd, ExecuteStreamHandler out ) protected int runCmd( Commandline cmd, ExecuteStreamHandler out )
throws TaskException
{ {
try try
{ {


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

@@ -200,6 +200,7 @@ public abstract class MSVSS extends Task
} }


protected int run( Commandline cmd ) protected int run( Commandline cmd )
throws TaskException
{ {
try try
{ {


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

@@ -141,6 +141,7 @@ public class MSVSSHISTORY extends MSVSS
* @param attr The new Style value * @param attr The new Style value
*/ */
public void setStyle( BriefCodediffNofile attr ) public void setStyle( BriefCodediffNofile attr )
throws TaskException
{ {
String option = attr.getValue(); String option = attr.getValue();
if( option.equals( "brief" ) ) if( option.equals( "brief" ) )


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

@@ -10,6 +10,7 @@ package org.apache.tools.ant.taskdefs.rmic;
import java.io.File; import java.io.File;
import java.util.Random; import java.util.Random;
import java.util.Vector; import java.util.Vector;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
import org.apache.tools.ant.taskdefs.Rmic; import org.apache.tools.ant.taskdefs.Rmic;
import org.apache.tools.ant.types.Commandline; import org.apache.tools.ant.types.Commandline;
@@ -51,6 +52,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter
* @return The Classpath value * @return The Classpath value
*/ */
public Path getClasspath() public Path getClasspath()
throws TaskException
{ {
return getCompileClasspath(); return getCompileClasspath();
} }
@@ -77,6 +79,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected Commandline setupRmicCommand() protected Commandline setupRmicCommand()
throws TaskException
{ {
return setupRmicCommand( null ); return setupRmicCommand( null );
} }
@@ -88,6 +91,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected Commandline setupRmicCommand( String[] options ) protected Commandline setupRmicCommand( String[] options )
throws TaskException
{ {
Commandline cmd = new Commandline(); Commandline cmd = new Commandline();


@@ -178,6 +182,7 @@ public abstract class DefaultRmicAdapter implements RmicAdapter
* @return The CompileClasspath value * @return The CompileClasspath value
*/ */
protected Path getCompileClasspath() protected Path getCompileClasspath()
throws TaskException
{ {
// add dest dir to classpath so that previously compiled and // add dest dir to classpath so that previously compiled and
// untouched classes are on classpath // untouched classes are on classpath


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

@@ -57,5 +57,6 @@ public interface RmicAdapter
* *
* @return The Classpath value * @return The Classpath value
*/ */
Path getClasspath();
Path getClasspath()
throws TaskException;
} }

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

@@ -92,12 +92,6 @@ public abstract class DataType
return ref != null; return ref != null;
} }


public void execute()
throws TaskException
{
//HACK: NOOP execute - should be deleted in the future!
}

/** /**
* Performs the check for circular references and returns the referenced * Performs the check for circular references and returns the referenced
* object. * object.


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

@@ -7,6 +7,8 @@
*/ */
package org.apache.tools.ant.util; package org.apache.tools.ant.util;


import org.apache.myrmidon.api.TaskException;

/** /**
* Interface to be used by SourceFileScanner. <p> * Interface to be used by SourceFileScanner. <p>
* *
@@ -27,7 +29,8 @@ public interface FileNameMapper
* *
* @param from The new From value * @param from The new From value
*/ */
void setFrom( String from );
void setFrom( String from )
throws TaskException;


/** /**
* Sets the to part of the transformation rule. * Sets the to part of the transformation rule.


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

@@ -69,9 +69,9 @@ public class RegexpPatternMapper implements FileNameMapper
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
public String[] mapFileName( String sourceFileName ) public String[] mapFileName( String sourceFileName )
throws TaskException
{ {
if( reg == null || to == null
|| !reg.matches( sourceFileName ) )
if( reg == null || to == null || !reg.matches( sourceFileName ) )
{ {
return null; return null;
} }
@@ -86,6 +86,7 @@ public class RegexpPatternMapper implements FileNameMapper
* @return Description of the Returned Value * @return Description of the Returned Value
*/ */
protected String replaceReferences( String source ) protected String replaceReferences( String source )
throws TaskException
{ {
Vector v = reg.getGroups( source ); Vector v = reg.getGroups( source );




Loading…
Cancel
Save