reload4j
reload4j copied to clipboard
org.apache.log4j.helpers.Loader.isJava1() returns true on Java 19 and other versions
If the Java version string doesn't include a decimal point, reload4j incorrectly identifies it as Java 1. The initial version of each major release no longer includes a decimal point (since around Java 10 or 11), so reload4j incorrectly identifies these as Java 1 (circa 1995).
| Welcome to JShell -- Version 19
| For an introduction type: /help intro
jshell> System.getProperty("java.version")
$1 ==> "19"
jshell> org.apache.log4j.helpers.Loader.isJava1()
$2 ==> true
The simplest fix would be to make isJava1()
always return false, since the reload4j website indicates that build targets Java 1.5, so the classfiles won't even work on Java 1.