struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yasser Zamani (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4528) ChainingInterceptor does not handle lists correctly for excludes and includes
Date Wed, 01 Feb 2017 21:04:51 GMT

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

Yasser Zamani edited comment on WW-4528 at 2/1/17 9:03 PM:
-----------------------------------------------------------

I will be working on it. The problem is +includes.contains+ uses +XWorkList.contains+ which
uses +ArrayList.contains(Object)+ where +Object.equals(Object)+ returns false for +strings+
because of their reference inequality.

I will be working on it for a suitable clean solution according to the rest of codes.


was (Author: yasser.zamani):
I will be working on it. The problem is +includes.contains+ uses +XWorkList.contains+ which
uses +ArrayList.contains(Object)+ where +Object.equals(Object)+ returns false for +strings+
because of there reference inequality.

I will be working on it for a suitable clean solution according to the rest of codes.

> ChainingInterceptor does not handle lists correctly for excludes and includes
> -----------------------------------------------------------------------------
>
>                 Key: WW-4528
>                 URL: https://issues.apache.org/jira/browse/WW-4528
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.24
>            Reporter: nikos dimitrakas
>             Fix For: 2.5.x
>
>
> The ChainingInterceptor has two parameters includes and excludes that according to the
documentation and the code are Collection<String>, but the setters don't handle the
specified values (that are loaded from the struts.xml) as lists. So if i specify for example
> <interceptor-ref name="chain">
>        <param name="includes">x,y,z</param>
> </interceptor-ref>
> the includes variable of the interceptor becomes a Collection of one string with the
value "x,y,z" instead of a Collection of three strings "x", "y" and "z".
> The behaviour should instead be similar to the ParametersInterceptor's excludeParams
or MethodFilterInterceptor's excludeMethods and includeMethods.
> It would also be good if the documentation included information and an example with a
list of parameters. The current documentation (https://struts.apache.org/docs/chaining-interceptor.html)
only says that the parameters are lists, but the example only has one parameter



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message