[
https://issues.apache.org/jira/browse/ARTEMIS-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17847354#comment-17847354
]
ASF subversion and git services commented on ARTEMIS-4766:
----------------------------------------------------------
Commit f5973d53e67e6e7fc9eb5c45a30bedc02a76f437 in activemq-artemis's branch
refs/heads/main from Gary Tully
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=f5973d53e6 ]
ARTEMIS-4766 - validate type before newInstance calls
> 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
> Assignee: 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)