logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-1498) [Java 9] fix dependency on old JDK versioning scheme
Date Thu, 04 Aug 2016 02:39:20 GMT
Remko Popma created LOG4J2-1498:

             Summary: [Java 9] fix dependency on old JDK versioning scheme
                 Key: LOG4J2-1498
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1498
             Project: Log4j 2
          Issue Type: Bug
          Components: Core, Layouts
    Affects Versions: 2.6.2
            Reporter: Remko Popma
             Fix For: 2.7

AbstractStringLayout currently has this code:
    // LOG4J2-1151: If the built-in JDK 8 encoders are available we should use them.
    private static boolean isPreJava8() {
        final String version = System.getProperty("java.version");
        final String[] parts = version.split("\\.");
        try {
            final int major = Integer.parseInt(parts[1]);
            return major < 8;
        } catch (final Exception ex) {
            return true;

With Java 9, this will not work correctly. (Impact is very small, but anyway...)

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message