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

Akitoshi Yoshida commented on CAMEL-9297:
-----------------------------------------

But using two attribtues mean we need to sort the entries in the package's path 
order before invoking the appropriate allow and deny methods of XStream.

Using your example
allow="com.foo.*" deny="com.foo.MySecretModel,com.foo.baz.EvenMoreSecret"/

we will need to call the allow com.foo.* before calling the deny more specific 
classes, as in
xstream.allowTypesByWildCard("com.foo.*");
xstream.denyTypesByExplicitType("com.foo.MySecretModel");
xstream.denyTypesByExplicitType("com.foo.baz.EvenMoreSecret");

This is feasible, but if the combination becomes complex and a wildcard is used 
not at the end, computing the ordering will become more complex.

Therefore, I thought it would be simpler to have a single ordered sequence 
having the optinal deny flag as in

permission="com.foo.*,-com.foo.MySecretModel,-com.foo.baz.EvenMoreSecret"

Furthermore, using a single list, we can naturally combine the global 
definition with this per-instance definition by processing the global 
definition followed by the per-instance definition to have the clearly defined 
semantic of overriding or enhancing the global definition using the 
per-instance definition.

regards, aki




> Expose more configuration options from Camel's XStream component
> ----------------------------------------------------------------
>
>                 Key: CAMEL-9297
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9297
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-xstream
>    Affects Versions: 2.16.0, 2.15.4
>            Reporter: Akitoshi Yoshida
>            Assignee: Akitoshi Yoshida
>         Attachments: 
> 0001-CAMEL-9297-Expose-more-configuration-options-from-Ca.patch
>
>
> Currently, some of the configuration options of XStream are only configurable 
> over the XStream API. This means, the user must instantiate an instance of 
> XStream and configure that instance and assign it to Camel's XStream 
> component to configure these options.
> This patch will add a more convenient way to set these additional options 
> directly over Camel's XStream component.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to