You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Phong X. Nguyen (Jira)" <ji...@apache.org> on 2021/12/15 00:29:00 UTC

[jira] [Created] (LOG4J2-3231) JndiManager.isJndiEnabled generates a call to NetUtils.getLocalIps

Phong X. Nguyen created LOG4J2-3231:
---------------------------------------

             Summary: JndiManager.isJndiEnabled generates a call to NetUtils.getLocalIps
                 Key: LOG4J2-3231
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3231
             Project: Log4j 2
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.16.0
            Reporter: Phong X. Nguyen


While trying to upgrade from 2.15.0 to 2.16.0, we discovered some of our unit tests were failing. On further investigation, we realized that the new {{JndiManager.isJndiEnabled()}} method, on first call, causes initialization of all static members of {{{}JndiManager{}}}, including a call to {{{}NetUtils.getLocalIps{}}}. In at least one of our unit test frameworks, this generates a NullPointerException. 

Could some of the {{permanentAllowed}} lists initialization be moved into t{{{}JndiManagerFactory{}}} to avoid this issue? 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)