struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: Add to ParameterNameAware JavaDoc Warning About Using?
Date Wed, 24 Jul 2013 13:28:32 GMT
I don't know about making this a "warning" as more of a note in each class:
ParameterNameAware and ParametersInterceptor.


On Wed, Jul 24, 2013 at 1:55 AM, Lukasz Lenart <lukaszlenart@apache.org>wrote:

> There is one more thing, please check lines 306-312 of
> ParametersInterceptor - we have two layers where parameter must be
> accepted:
> 1. ParametersInterceptor
> 2. MemberAccessValueStack
>
> and both must behave in the same way in case of ParameterNameAware.
>
> And ParameterNameAware should be used to relax restrictions set by
> acceptParams/excludeParams in ParametersInterceptor - like Paul said -
> a workaround.
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> 2013/7/24 Paul Benedict <pbenedict@apache.org>:
> > Was the interface intended to workaround the interceptor? I find the
> > dueling unexpected.
> > On Jul 23, 2013 2:26 PM, "bphillips@ku.edu" <bphillips@ku.edu> wrote:
> >
> >> I'm working on issue https://issues.apache.org/jira/browse/WW-4137
> >>
> >> Though we don't need to change the source code to address the reported
> >> issue
> >> I think we may want to change the JavaDoc for the ParameterNameAware
> >> interface.
> >>
> >> The JavaDoc for the ParametersInterceptor -
> >>
> >>
> http://struts.apache.org/release/2.3.x/xwork-core/apidocs/com/opensymphony/xwork2/interceptor/ParametersInterceptor.html
> >> has this warning:
> >>
> >> Using ParameterNameAware could be dangerous as @{link
> >> ParameterNameAware#acceptableParameterName(String)} takes precedence
> over
> >> ParametersInterceptor which means if ParametersInterceptor excluded
> given
> >> parameter name you can accept it with
> >>
> >> What I understand the above to mean (after reviewing the source code of
> the
> >> ParametersInterceptor) is that if my Action class implements
> >> ParameterNameAware then the acceptableParameterName method I define in
> my
> >> action is the only reference for filtering which parameters and values
> >> should be added to the Value stack.  So using ParameterNameAware does
> away
> >> with the additional protection provided by the ParametersInterceptor.
> >>
> >> If my understanding is correct should I add the warning to the
> >> ParamenterNameAware interface's JavaDoc?
> >>
> >> Bruce
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://struts.1045723.n5.nabble.com/Add-to-ParameterNameAware-JavaDoc-Warning-About-Using-tp5713285.html
> >> Sent from the Struts - Dev mailing list archive at Nabble.com.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: dev-help@struts.apache.org
> >>
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>


-- 
Cheers,
Paul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message