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

Gary Tully commented on ARTEMIS-4766:
-------------------------------------

[~cshannon] [~tabish] does the sentiment in the comment capture your concerns 
as outlined in  https://github.com/apache/activemq-artemis/pull/4924

> gate every newInstance call with a type check on the class to ensure we only 
> call static initialisers of the expected type
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARTEMIS-4766
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4766
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.33.0
>            Reporter: Gary Tully
>            Priority: Major
>
> On our extension points, where configuration provides the implementation 
> class name, like plugins or transformers, we need to create an instance of 
> the configured class at runtime.
> We typically know the interface type we are expecting, so we can enforce this 
> check before we create in instance, in that way we won't every call static 
> initialises on the wrong type in error. In cases where some gadget can be 
> injected into our configuration, it will need to be specialised for our 
> interfaces to be effective, which creates one additional hurdle to jump over.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to