Got rid of all the switch statements I added to DefaultFilters.java.

I left some switch statemetns in the Test in order for the testing
framework to not depend too much on the implementation in DefaultFilters


http://gwt-code-reviews.appspot.com/1336801/diff/1/2
File dev/core/src/com/google/gwt/dev/resource/impl/DefaultFilters.java
(right):

http://gwt-code-reviews.appspot.com/1336801/diff/1/2#newcode84
dev/core/src/com/google/gwt/dev/resource/impl/DefaultFilters.java:84:
private static boolean fileTypeMatch(FilterFileType filterFileType,
On 2011/01/28 23:02:34, tobyr wrote:
I like the move to enums. Can you move all of the methods which are
essentially
switch statements on the enums into instance methods on the enums? For
example,
for this method:

enum FilterFileType {
   RESOURCE_FILES,
   JAVA_FILES {
     public booleam matches(String path) {
       return path.endsWith(".java");
     }
   },
   ...
   public boolean matches(String path) {
     return true;
   }
}

I did this, but the resulting diff is really large.

http://gwt-code-reviews.appspot.com/1336801/diff/1/2#newcode202
dev/core/src/com/google/gwt/dev/resource/impl/DefaultFilters.java:202:
String defaultExcludesJava[] = new String[]{
In merging together the switch statments, I questioned why the default
excludes for Java were a subset of the default excludes for resource
files.  I looked at those up above and I think we want them for all file
filters, so I got rid of this variable.

http://gwt-code-reviews.appspot.com/1336801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to