Filipp Gunbin created LOG4J2-2635:
-------------------------------------

             Summary: Wrong java.version check in ThreadNameCachingStrategy
                 Key: LOG4J2-2635
                 URL: https://issues.apache.org/jira/browse/LOG4J2-2635
             Project: Log4j 2
          Issue Type: Bug
            Reporter: Filipp Gunbin


I see this in ThreadNameCachingStrategy.java:
{code:java}
final String defaultStrategy = 
System.getProperty("java.version").compareTo("1.8.0_102") < 0
        ? "CACHED" // LOG4J2-2052 JDK 8u102 removed the String allocation in 
Thread.getName()
        : "UNCACHED";{code}
This doesn't look right because java.version of, say, "1.8.0_77" compares 
greater than "1.8.0_102" lexicographically.  This is why I have failed tests 
when trying to build log4j-core.

[posted this on dev mailing list first, but got no response, so creating issue 
here]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to