struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3753) The AnnotationActionValidatorManager does not adhere to the ActionValidatorManager interface's contract
Date Fri, 10 Feb 2012 06:25:59 GMT

    [ https://issues.apache.org/jira/browse/WW-3753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13205263#comment-13205263
] 

Lukasz Lenart commented on WW-3753:
-----------------------------------

Could you prepare a patch with solution that works for you ?
                
> The AnnotationActionValidatorManager does not adhere to the ActionValidatorManager interface's
contract
> -------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3753
>                 URL: https://issues.apache.org/jira/browse/WW-3753
>             Project: Struts 2
>          Issue Type: Bug
>            Reporter: Rees Byars
>            Priority: Minor
>
> An ActionValidatorManager accepts a java.util.String "context" parameter for identifying
the appropriate configurations.  In the AnnotationActionValidatorManager's buildValidatorKey()
method, however, "proxy.getMethod()" is used instead of the passed-in context.  This violates
the contract of the interface and tightly couples the AnnotationActionValidatorManager to
the AnnotationValidationInterceptor.  
> I have a situation whereby I have created my own validation interceptor for a special
case that passes in a context not derived from proxy.getMethod(), only to find that this context
isn't used properly by the manager.  I then created my own manager, changing only the buildValidatorKey()
to use the given context, and it works well. 
> Either the ActionValidatorManager should be changed to no longer accept a context parameter
and handle the context itself in every case (which seems to not be the best solution), or
the AnnotationActionValidatorManager should be changed to use the given context in every case.
 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message