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

Volkan Yazici commented on LOG4J2-3497:
---------------------------------------

{quote}
PluginRegistry keeps a cache of scanned plugins. PluginManager gives you a way 
to look up plugins by category.
{quote}

 There are two useful methods in {{PluginManager}}: public {{collectPlugins()}} 
and private {{mergeByName()}}. Both add up to ~50 LoC. I wish {{PluginManager}} 
would simply not exist and that functionality would be a part of the 
{{PluginRegistry}}. This would have avoided quite some indirection and 
confusion.

{code}
... using the PluginBuilder ...
{code}

I think the level of redundant complexity here is... huge, to say the least. I 
wish all {{PluginManager}}, {{PluginRegistry}}, et al. would be private and 
everything would be accessed via DI. I hope we can make this happen in 3.x – my 
review is ongoing there.
 
{code}
If you're looking to support constraints in more plugin categories in 2.x, 
those would need to be done piecemeal.
{code}

Can't we simply make {{PluginManager}} honor {{ConstraintValidator}} 
annotations out of the box?

> ConstraintValidator's are not employed by PluginManager
> -------------------------------------------------------
>
>                 Key: LOG4J2-3497
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3497
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Plugins
>            Reporter: Volkan Yazici
>            Assignee: Matt Sicker
>            Priority: Major
>             Fix For: 2.18.0
>
>
> {{ConstraintValidator}}'s are not taken into account when plugins are 
> collected via {{PluginManager}}.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to