Author: svn-role
Date: Tue May 19 04:02:18 2026
New Revision: 1934376

Log:
Merge r1933796 from trunk:

 * r1933796
   Silence JavaHL compiler warnings about missing bootstrap classpath.
   Justification:
     We should use the cross-compilation option supported by every JDK since
     version 9, unless we're actually building with JDK 1.8.
   Votes:
     +1: brane, jcorvel
     +0(concept): dsahlberg, LGTM have not tested under JDK 1.8

Modified:
   subversion/branches/1.15.x/   (props changed)
   subversion/branches/1.15.x/STATUS
   subversion/branches/1.15.x/build/ac-macros/java.m4

Modified: subversion/branches/1.15.x/STATUS
==============================================================================
--- subversion/branches/1.15.x/STATUS   Tue May 19 04:02:10 2026        
(r1934375)
+++ subversion/branches/1.15.x/STATUS   Tue May 19 04:02:18 2026        
(r1934376)
@@ -52,15 +52,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1933796
-   Silence JavaHL compiler warnings about missing bootstrap classpath.
-   Justification:
-     We should use the cross-compilation option supported by every JDK since
-     version 9, unless we're actually building with JDK 1.8.
-   Votes:
-     +1: brane, jcorvel
-     +0(concept): dsahlberg, LGTM have not tested under JDK 1.8
-
  * r1933877
    Silence all deprecation warnings from the org.tigris JavaHL package.
    Justification:

Modified: subversion/branches/1.15.x/build/ac-macros/java.m4
==============================================================================
--- subversion/branches/1.15.x/build/ac-macros/java.m4  Tue May 19 04:02:10 
2026        (r1934375)
+++ subversion/branches/1.15.x/build/ac-macros/java.m4  Tue May 19 04:02:18 
2026        (r1934376)
@@ -166,12 +166,27 @@ AC_DEFUN(SVN_FIND_JDK,
     # The release for "-source" could actually be greater than that
     # of "-target", if we want to cross-compile for lesser JVMs.
     if test -z "$JAVAC_FLAGS"; then
-      JAVAC_FLAGS="-target $JAVA_OLDEST_WORKING_VER -source 1.8"
+      java_version=[`"$JDK/bin/javac" -version 2>&1 | $SED -e 's/^[^0-9]*//' 
-e 's/\.[^.]*$//'`]
+      java_major=[`echo $java_version | $SED -e 's/\.[^.]*$//'`]
+      java_minor=[`echo $java_version | $SED -e 's/^[^.]*\.//'`]
+      if test "$java_major" -eq 1 && test "$java_minor" -lt 9; then
+        JAVAC_FLAGS="-target $JAVA_OLDEST_WORKING_VER -source 1.8"
+      else
+        java_release=[`echo $JAVA_OLDEST_WORKING_VER | $SED -e 's/^[^.]*\.//'`]
+        JAVAC_FLAGS="--release $java_release"
+      fi
+
       if test "$enable_debugging" = "yes"; then
         JAVAC_FLAGS="-g -Xlint -Xlint:unchecked -Xlint:serial -Xlint:path 
$JAVAC_FLAGS"
         if test -z "$JAVAC_COMPAT_FLAGS"; then
           JAVAC_COMPAT_FLAGS="$JAVAC_FLAGS -Xlint:-unchecked 
-Xlint:-deprecation -Xlint:-dep-ann -Xlint:-rawtypes"
         fi
+      else
+        dnl Ignore warnings about deprecated version 8 (from --release 8)
+        JAVAC_FLAGS="-Xlint:options"
+        if test -z "$JAVAC_COMPAT_FLAGS"; then
+          JAVAC_COMPAT_FLAGS="$JAVAC_FLAGS"
+        fi
       fi
     fi
 

Reply via email to