config_host.mk.in             |    1 -
 configure.ac                  |    9 ++-------
 solenv/gbuild/JavaClassSet.mk |    2 +-
 3 files changed, 3 insertions(+), 9 deletions(-)

New commits:
commit f09e2e1d92a7d7f99b05c739952eed876f741f75
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Aug 18 09:51:43 2023 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Aug 18 20:14:38 2023 +0200

    configure.ac: Update Java check for JDK >= 9 version string
    
    Since Java 9, the major version number is the actual one,
    while up to including Java 8, that wasn't the case
    (Java 8 would use a version string of 1.8.x).
    
    Update the version check accordingly, which was still
    assuming the old versioning scheme, i.e. would pass
    for any Java version >= 1.9.0.
    (This shouldn't make any difference in practice yet,
    but will once the minimium version is increased.)
    
    Change-Id: I79eeb247315499caddd63d6abbb1e14ea6a72a4a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155826
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/configure.ac b/configure.ac
index 673a16b925e3..77d916ac8b5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8647,8 +8647,8 @@ if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != 
"yes"; then
             _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' 
| $SED '/^$/d' | $SED s/[[-A-Za-z]]*//`
             _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 
+ $3;}'`
 
-            if test "$_jdk_ver" -lt 10900; then
-                AC_MSG_ERROR([JDK is too old, you need at least 9 ($_jdk_ver < 
10900)])
+            if test "$_jdk_ver" -lt 90000; then
+                AC_MSG_ERROR([JDK is too old, you need at least 9 ($_jdk_ver < 
90000)])
             fi
             dnl TODO: Presumably, the Security Manager will not merely be 
disallowed, but be
             dnl completely removed in some Java version > 18 (see
commit 94c94633a4e6f1622c7cc31ce6efd41862691d59
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Fri Aug 18 09:30:17 2023 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Aug 18 20:14:30 2023 +0200

    Drop JAVA_CLASSPATH_NOT_SET which is always TRUE
    
    The variable was introduced in
    
        commit b97cade9183d14ad21ae71892348a9a81689488b
        Date:   Sun Apr 7 12:14:36 2013 -0400
    
            Supress warnings about unset classpath
    
            I get the below warning for every single jar file without this 
patch.
            warning: [options] bootstrap class path not set in conjunction with
            -source 1.5
            1 warning
    
            Change-Id: I71c01aeea993640f1ec86fe1d8a977656861358d
    
    , at a time when Java 5 was the minimum version,
    likely to suppress warnings with JDK versions >= 6
    (greater than 1.6.0 to be exact...).
    The version check was then just bumped along with the Java
    baseline bumps in
    
        commit aafc10c9edb61e13ac557c7e43c8d4a31dce4f37
        Date:   Fri Jul 26 10:19:39 2019 +0200
    
            Bump Java baseline to Java 8
    
    and
    
        commit 941b567a41569260fef14a7337511e8f42337323
        Date:   Thu May 7 09:42:22 2020 +0200
    
            tdf#131572 Add java 9 module info for libreoffice.jar
    
    for no apparent reason.
    
    In any case, the variable will always be set to TRUE,
    since the Java version string is using the actual
    major version number as the first digit since
    JDK 9 (while JDK 8 would still use 1.8.x as version
    string), s.a. upcoming commit
    Change-Id I79eeb247315499caddd63d6abbb1e14ea6a72a4a
    ("configure.ac: Update Java check for JDK >= 9 version string").
    
    Drop the variable and set the Java params
    in `solenv/gbuild/JavaClassSet.mk` unconditionally.
    
    Change-Id: Ib4aad07da3937289fc6ff29dd80abdd4c35f1773
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155825
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/config_host.mk.in b/config_host.mk.in
index 8b345a690eff..f4e6841b22d6 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -353,7 +353,6 @@ export JAVADOCISGJDOC=@JAVADOCISGJDOC@
 export JAVACFLAGS=@JAVACFLAGS@
 export JAVAIFLAGS=@JAVAIFLAGS@
 export JAVAIFLAGS_FOR_BUILD=@JAVAIFLAGS_FOR_BUILD@
-export JAVA_CLASSPATH_NOT_SET=@JAVA_CLASSPATH_NOT_SET@
 export JAVAINTERPRETER=@JAVAINTERPRETER@
 export JAVA_HOME=@JAVA_HOME@
 export JAVA_HOME_FOR_BUILD=@JAVA_HOME_FOR_BUILD@
diff --git a/configure.ac b/configure.ac
index 7f5c0ff66430..673a16b925e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5850,7 +5850,6 @@ if test "$cross_compiling" = "yes"; then
         ANT
         ANT_HOME
         ANT_LIB
-        JAVA_CLASSPATH_NOT_SET
         JAVA_SOURCE_VER
         JAVA_TARGET_VER
         JAVACFLAGS
@@ -8651,9 +8650,6 @@ if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != 
"yes"; then
             if test "$_jdk_ver" -lt 10900; then
                 AC_MSG_ERROR([JDK is too old, you need at least 9 ($_jdk_ver < 
10900)])
             fi
-            if test "$_jdk_ver" -gt 10900; then
-                JAVA_CLASSPATH_NOT_SET=TRUE
-            fi
             dnl TODO: Presumably, the Security Manager will not merely be 
disallowed, but be
             dnl completely removed in some Java version > 18 (see
             dnl <https://openjdk.java.net/jeps/411> "Deprecate the Security 
Manager for Removal"):
@@ -8970,7 +8966,6 @@ AC_SUBST(JAVACOMPILER)
 AC_SUBST(JAVAINTERPRETER)
 AC_SUBST(JAVAIFLAGS)
 AC_SUBST(JAVAIFLAGS_FOR_BUILD)
-AC_SUBST(JAVA_CLASSPATH_NOT_SET)
 AC_SUBST(JAVA_HOME)
 AC_SUBST(JAVA_HOME_FOR_BUILD)
 AC_SUBST(JDK)
diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk
index dc86f722978d..087c79750d00 100644
--- a/solenv/gbuild/JavaClassSet.mk
+++ b/solenv/gbuild/JavaClassSet.mk
@@ -20,7 +20,7 @@
 gb_JavaClassSet_JAVACCOMMAND = $(ICECREAM_RUN) $(JAVACOMPILER) $(JAVACFLAGS) \
     -encoding utf8 \
     --release $(1) \
-    $(if $(JAVA_CLASSPATH_NOT_SET),-Xlint:-options)
+    -Xlint:-options
 
 gb_JavaClassSet_JAVACDEBUG :=
 

Reply via email to