From c68a4ebc8762999c7ec9e77564f17888e0ef6175 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sun, 30 Dec 2001 00:12:54 +0000 Subject: [PATCH] Remove filtering from rmic task because it didn't make much sense to do filtering there git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270413 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tools/ant/taskdefs/Rmic.java | 57 ++++--------------- .../org/apache/tools/ant/taskdefs/Rmic.java | 57 ++++--------------- 2 files changed, 20 insertions(+), 94 deletions(-) diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java index 5ec4fd0b7..d37242ea2 100644 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java +++ b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Rmic.java @@ -17,11 +17,9 @@ import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.taskdefs.rmic.RmicAdapter; import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory; -import org.apache.tools.ant.types.FilterSetCollection; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Reference; import org.apache.tools.ant.util.FileNameMapper; -import org.apache.tools.ant.util.FileUtils; import org.apache.tools.ant.util.SourceFileScanner; /** @@ -63,18 +61,17 @@ public class Rmic extends MatchingTask private final static String FAIL_MSG = "Rmic failed, messages should have been provided."; - private boolean verify = false; - private boolean filtering = false; + private boolean verify; - private boolean iiop = false; - private boolean idl = false; - private boolean debug = false; - private boolean includeAntRuntime = true; - private boolean includeJavaRuntime = false; + private boolean iiop; + private boolean idl; + private boolean debug; + private boolean includeAntRuntime; + private boolean includeJavaRuntime; private ArrayList compileList = new ArrayList(); - private ClassLoader loader = null; + private ClassLoader loader; private File baseDir; private String classname; @@ -162,11 +159,6 @@ public class Rmic extends MatchingTask } } - public void setFiltering( boolean filter ) - { - filtering = filter; - } - /** * Indicates that IDL output should be generated. This defaults to false if * not set. @@ -317,21 +309,6 @@ public class Rmic extends MatchingTask return extdirs; } - /** - * Gets file list to compile. - * - * @return The FileList value - */ - public ArrayList getFileList() - { - return compileList; - } - - public boolean getFiltering() - { - return filtering; - } - /* * Gets IDL flags. */ @@ -504,7 +481,7 @@ public class Rmic extends MatchingTask { if( compileClasspath == null ) { - compileClasspath = new Path( getProject() ); + compileClasspath = new Path(); } return compileClasspath.createPath(); } @@ -519,7 +496,7 @@ public class Rmic extends MatchingTask { if( extdirs == null ) { - extdirs = new Path( getProject() ); + extdirs = new Path(); } return extdirs.createPath(); } @@ -653,12 +630,6 @@ public class Rmic extends MatchingTask /** * Move the generated source file(s) to the base directory - * - * @param baseDir Description of Parameter - * @param sourceBaseFile Description of Parameter - * @param classname Description of Parameter - * @param adapter Description of Parameter - * @exception TaskException Description of Exception */ private void moveGeneratedFile( File baseDir, File sourceBaseFile, String classname, @@ -679,15 +650,7 @@ public class Rmic extends MatchingTask File newFile = new File( sourceBaseFile, sourceFileName ); try { - if( filtering ) - { - final FilterSetCollection filters = new FilterSetCollection( getProject().getGlobalFilterSet() ); - FileUtils.copyFile( oldFile, newFile, filters ); - } - else - { - FileUtil.copyFile( oldFile, newFile ); - } + FileUtil.copyFile( oldFile, newFile ); oldFile.delete(); } catch( IOException ioe ) diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java index 5ec4fd0b7..d37242ea2 100644 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java +++ b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/Rmic.java @@ -17,11 +17,9 @@ import org.apache.tools.ant.AntClassLoader; import org.apache.tools.ant.DirectoryScanner; import org.apache.tools.ant.taskdefs.rmic.RmicAdapter; import org.apache.tools.ant.taskdefs.rmic.RmicAdapterFactory; -import org.apache.tools.ant.types.FilterSetCollection; import org.apache.tools.ant.types.Path; import org.apache.tools.ant.types.Reference; import org.apache.tools.ant.util.FileNameMapper; -import org.apache.tools.ant.util.FileUtils; import org.apache.tools.ant.util.SourceFileScanner; /** @@ -63,18 +61,17 @@ public class Rmic extends MatchingTask private final static String FAIL_MSG = "Rmic failed, messages should have been provided."; - private boolean verify = false; - private boolean filtering = false; + private boolean verify; - private boolean iiop = false; - private boolean idl = false; - private boolean debug = false; - private boolean includeAntRuntime = true; - private boolean includeJavaRuntime = false; + private boolean iiop; + private boolean idl; + private boolean debug; + private boolean includeAntRuntime; + private boolean includeJavaRuntime; private ArrayList compileList = new ArrayList(); - private ClassLoader loader = null; + private ClassLoader loader; private File baseDir; private String classname; @@ -162,11 +159,6 @@ public class Rmic extends MatchingTask } } - public void setFiltering( boolean filter ) - { - filtering = filter; - } - /** * Indicates that IDL output should be generated. This defaults to false if * not set. @@ -317,21 +309,6 @@ public class Rmic extends MatchingTask return extdirs; } - /** - * Gets file list to compile. - * - * @return The FileList value - */ - public ArrayList getFileList() - { - return compileList; - } - - public boolean getFiltering() - { - return filtering; - } - /* * Gets IDL flags. */ @@ -504,7 +481,7 @@ public class Rmic extends MatchingTask { if( compileClasspath == null ) { - compileClasspath = new Path( getProject() ); + compileClasspath = new Path(); } return compileClasspath.createPath(); } @@ -519,7 +496,7 @@ public class Rmic extends MatchingTask { if( extdirs == null ) { - extdirs = new Path( getProject() ); + extdirs = new Path(); } return extdirs.createPath(); } @@ -653,12 +630,6 @@ public class Rmic extends MatchingTask /** * Move the generated source file(s) to the base directory - * - * @param baseDir Description of Parameter - * @param sourceBaseFile Description of Parameter - * @param classname Description of Parameter - * @param adapter Description of Parameter - * @exception TaskException Description of Exception */ private void moveGeneratedFile( File baseDir, File sourceBaseFile, String classname, @@ -679,15 +650,7 @@ public class Rmic extends MatchingTask File newFile = new File( sourceBaseFile, sourceFileName ); try { - if( filtering ) - { - final FilterSetCollection filters = new FilterSetCollection( getProject().getGlobalFilterSet() ); - FileUtils.copyFile( oldFile, newFile, filters ); - } - else - { - FileUtil.copyFile( oldFile, newFile ); - } + FileUtil.copyFile( oldFile, newFile ); oldFile.delete(); } catch( IOException ioe )