Hi guys,
One of the guys at work found a problem where if you have two methods:
String foo(String bar) {}
Resolution foo() {}
The first one will be called instead of the second. This looks like a
problem in AnnotatedClassActionResolver which I think the attached
(tiny) patch fixes. Could someone please take a look and apply if
appropriate?
cheers,
dim
Index:
stripes/src/net/sourceforge/stripes/controller/AnnotatedClassActionResolver.java
===================================================================
---
stripes/src/net/sourceforge/stripes/controller/AnnotatedClassActionResolver.java
(revision 616)
+++
stripes/src/net/sourceforge/stripes/controller/AnnotatedClassActionResolver.java
(working copy)
@@ -186,7 +186,7 @@
Method[] methods = clazz.getDeclaredMethods();
for (Method method : methods) {
- if ( Modifier.isPublic(method.getModifiers()) ) {
+ if ( Modifier.isPublic(method.getModifiers()) &&
(method.getParameterTypes() == null || method.getParameterTypes().length == 0)
) {
String eventName = getHandledEvent(method);
DefaultHandler defaultMapping =
method.getAnnotation(DefaultHandler.class);
if (eventName != null) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development