[
https://issues.apache.org/jira/browse/LOG4J2-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16394617#comment-16394617
]
ASF subversion and git services commented on LOG4J2-2104:
---------------------------------------------------------
Commit 1d70d3197887847529b3f06261ed38d20af57240 in logging-log4j2's branch
refs/heads/release-2.x from [~ralphgoers]
[ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=1d70d31 ]
LOG4J2-2104 - LoaderUtil was improperly looping over classloaders
> LoaderUtil getClassLoaders() method and while loops
> ---------------------------------------------------
>
> Key: LOG4J2-2104
> URL: https://issues.apache.org/jira/browse/LOG4J2-2104
> Project: Log4j 2
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.9.1
> Reporter: Andrejus Chaliapinas
> Assignee: Ralph Goers
> Priority: Minor
> Fix For: 2.11.0
>
>
> For v2.9.1 inside org.apache.logging.log4j.util.LoaderUtil and
> getClassLoaders() method we have lines 120-123 as such:
> ClassLoader parent = tcl;
> while (parent != null && !classLoaders.contains(parent)) {
> classLoaders.add(parent);
> }
> where it looks like some getParent() call is either missing or otherwise
> "while" loop is not needed.
> In line 111 tcl classloader already added into list of clasloaders:
> classLoaders.add(tcl);
> Was it an attempt to add all classloaders hierarchy or just some immediate
> parents?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)