tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r495012 - in /tapestry/tapestry5/tapestry-core/trunk/src: main/java/org/apache/tapestry/internal/services/ test/java/org/apache/tapestry/internal/services/
Date Wed, 10 Jan 2007 22:28:37 GMT
Author: hlship
Date: Wed Jan 10 14:28:35 2007
New Revision: 495012

URL: http://svn.apache.org/viewvc?view=rev&rev=495012
Log:
Event handler methods that return an unexpected object type now result in a runtime exception.

Modified:
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessorTest.java

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java?view=diff&rev=495012&r1=495011&r2=495012
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java
(original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessor.java
Wed Jan 10 14:28:35 2007
@@ -14,7 +14,7 @@
 
 package org.apache.tapestry.internal.services;
 
-import java.util.Set;
+import java.util.Collection;
 
 import org.apache.tapestry.ioc.internal.util.TapestryException;
 import org.apache.tapestry.runtime.Component;
@@ -24,9 +24,9 @@
 /** A catch-all for type Object that reports the return value as an error. */
 public class ObjectComponentEventResultProcessor implements ComponentEventResultProcessor<Object>
 {
-    private final Set<Class> _configuredClasses;
+    private final Collection<Class> _configuredClasses;
 
-    public ObjectComponentEventResultProcessor(final Set<Class> configuredClasses)
+    public ObjectComponentEventResultProcessor(final Collection<Class> configuredClasses)
     {
         _configuredClasses = configuredClasses;
     }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java?view=diff&rev=495012&r1=495011&r2=495012
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java
(original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java
Wed Jan 10 14:28:35 2007
@@ -17,7 +17,6 @@
 import java.net.URL;
 import java.util.Collection;
 import java.util.List;
-import java.util.Set;
 
 import javassist.CtClass;
 
@@ -315,7 +314,7 @@
     }
 
     static String invalidComponentEventResult(Component component, Object result,
-            String methodDescription, Set<Class> configuredResultTypes)
+            String methodDescription, Collection<Class> configuredResultTypes)
     {
         List<String> classNames = CollectionFactory.newList();
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessorTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessorTest.java?view=diff&rev=495012&r1=495011&r2=495012
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessorTest.java
(original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ObjectComponentEventResultProcessorTest.java
Wed Jan 10 14:28:35 2007
@@ -17,10 +17,8 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.tapestry.ComponentResources;
-import org.apache.tapestry.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry.ioc.internal.util.TapestryException;
 import org.apache.tapestry.runtime.Component;
 import org.apache.tapestry.services.ComponentEventResultProcessor;
@@ -40,10 +38,7 @@
         train_getComponentResources(component, resources);
         train_getCompleteId(resources, "foo.Bar:gnip.gnop");
 
-        Set<Class> classes = CollectionFactory.newSet(Arrays.asList(
-                String.class,
-                Map.class,
-                List.class));
+        List classes = Arrays.asList(String.class, List.class, Map.class);
 
         replay();
 



Mime
View raw message