[ 
https://issues.apache.org/jira/browse/LOG4J2-2561?focusedWorklogId=206777&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-206777
 ]

ASF GitHub Bot logged work on LOG4J2-2561:
------------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Mar/19 19:02
            Start Date: 02/Mar/19 19:02
    Worklog Time Spent: 10m 
      Work Description: ulrichenslin commented on pull request #260: 
[LOG4J2-2561] JEP223 version detection fix for JDK 9 and up
URL: https://github.com/apache/logging-log4j2/pull/260#discussion_r261837959
 
 

 ##########
 File path: 
log4j-core/src/main/java/org/apache/logging/log4j/core/layout/AbstractStringLayout.java
 ##########
 @@ -134,7 +134,13 @@ private static boolean isPreJava8() {
         final String version = System.getProperty("java.version");
 
 Review comment:
   I agree, but wanted to make the code change as small as possible, since it 
is a very minor change.  
   
   If we want to be more adventures, we should move the 
org.apache.logging.log4j.util.Constants#getMajorVersion to core, and just have 
everything call that.  Then the version detection is centralised and can we can 
test it as a public method.
   
   How to you advise we move forward on this. 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 206777)
    Time Spent: 1h  (was: 50m)

> In log4j-core AbstractStringLayout java version detection is not JEP223 
> compatible
> ----------------------------------------------------------------------------------
>
>                 Key: LOG4J2-2561
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2561
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.11.2
>            Reporter: Ulrich Enslin
>            Priority: Major
>              Labels: easyfix, pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The function isPreJava8() will detect java 9 and higher as being pre java 8, 
> because the logic does not take JEP223 into account.
>  
> The same logic is correct in 
> org.apache.logging.log4j.util.Constants#getMajorVersion, so simply modified 
> the logic in AbstractStringLayout to work the same in the PR.
>  
> This seems like a small change, but it prevents log4j from being JDK 9 and up 
> compatible.



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

Reply via email to