donaldp 02/01/20 01:50:38
Modified: proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text
Replace.java
Log:
Use IOUtils.shutdown() for readers/writers
Revision Changes Path
1.4 +3 -25
jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/Replace.java
Index: Replace.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/text/Replace.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Replace.java 13 Jan 2002 00:00:34 -0000 1.3
+++ Replace.java 20 Jan 2002 09:50:38 -0000 1.4
@@ -23,6 +23,7 @@
import java.util.ArrayList;
import java.util.Properties;
import org.apache.avalon.excalibur.util.StringUtil;
+import org.apache.avalon.excalibur.io.IOUtil;
import org.apache.myrmidon.api.TaskException;
import org.apache.tools.ant.types.DirectoryScanner;
import org.apache.tools.ant.taskdefs.MatchingTask;
@@ -389,26 +390,8 @@
}
finally
{
- if( reader != null )
- {
- try
- {
- reader.close();
- }
- catch( IOException e )
- {
- }
- }
- if( writer != null )
- {
- try
- {
- writer.close();
- }
- catch( IOException e )
- {
- }
- }
+ IOUtil.shutdownReader(reader);
+ IOUtil.shutdownWriter(writer);
if( temp != null )
{
temp.delete();
@@ -435,11 +418,6 @@
/**
* Replace occurrences of str1 in string str with str2
- *
- * @param str Description of Parameter
- * @param str1 Description of Parameter
- * @param str2 Description of Parameter
- * @return Description of the Returned Value
*/
private String stringReplace( String str, String str1, String str2 )
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>