commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1204215 - in /commons/sandbox/meiyo/trunk/src: main/java/org/apache/commons/meiyo/classpath/ test/java/org/apache/commons/meiyo/classpath/
Date Sun, 20 Nov 2011 19:10:54 GMT
Author: simonetripodi
Date: Sun Nov 20 19:10:54 2011
New Revision: 1204215

URL: http://svn.apache.org/viewvc?rev=1204215&view=rev
Log:
one handler for each filter is more than enough

Modified:
    commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/AbstractHandlerConfiguration.java
    commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/LinkedHandlerBuilder.java
    commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java

Modified: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/AbstractHandlerConfiguration.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/AbstractHandlerConfiguration.java?rev=1204215&r1=1204214&r2=1204215&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/AbstractHandlerConfiguration.java
(original)
+++ commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/AbstractHandlerConfiguration.java
Sun Nov 20 19:10:54 2011
@@ -53,14 +53,14 @@ public abstract class AbstractHandlerCon
         return new LinkedHandlerBuilder()
         {
 
-            public void handleWith( final ClassPathEntryHandler... entryHandlers )
+            public void handleWith( final ClassPathEntryHandler entryHandler )
             {
-                if ( entryHandlers == null || entryHandlers.length == 0 )
+                if ( entryHandler == null )
                 {
-                    throw new IllegalArgumentException( "At least one ClassPathEntryHandler
must be specified" );
+                    throw new IllegalArgumentException( "EntryHandler must be specified"
);
                 }
 
-                handlers.add( new ClassPathHandler( filter, entryHandlers ) );
+                handlers.add( new ClassPathHandler( filter, entryHandler ) );
             }
 
         };

Modified: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/LinkedHandlerBuilder.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/LinkedHandlerBuilder.java?rev=1204215&r1=1204214&r2=1204215&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/LinkedHandlerBuilder.java
(original)
+++ commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/LinkedHandlerBuilder.java
Sun Nov 20 19:10:54 2011
@@ -29,9 +29,9 @@ public interface LinkedHandlerBuilder
     /**
      * Links one or more {@link ClassPathEntryHandler} to the previously configured {@link
Matcher}.
      *
-     * @param entryHandler handler(s) has to be invoked when the {@link Matcher} pattern
+     * @param entryHandler handler has to be invoked when the {@link Matcher} pattern
      *        matches when scanning the ClassPath.
      */
-    void handleWith( ClassPathEntryHandler... entryHandler );
+    void handleWith( ClassPathEntryHandler entryHandler );
 
 }

Modified: commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java?rev=1204215&r1=1204214&r2=1204215&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java
(original)
+++ commons/sandbox/meiyo/trunk/src/test/java/org/apache/commons/meiyo/classpath/ClassPathTestCase.java
Sun Nov 20 19:10:54 2011
@@ -63,15 +63,6 @@ public final class ClassPathTestCase
                                  classes.add( classPathEntry );
                              }
 
-                         },
-                         new ClassPathEntryHandler()
-                         {
-
-                             public void doHandle( String path, Class<?> classPathEntry
)
-                             {
-                                 System.out.println( ">>>> " + classPathEntry
);
-                             }
-
                          } );
 
                 ifMatches( any() ).handleWith( new ClassPathEntryHandler()



Mime
View raw message