Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8366419

Historical data for JDK 8 should include the jdk.net package

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • tools
    • None
    • behavioral
    • low
    • Code compiled with the updated `--release 8` data may not run on older versions of JDK 8.
    • Other
    • JDK

      Summary

      In JDK 8, the jdk.net package was marked as @Exported(true), and was part of the rt.jar, and hence qualified to be included in the data used for --release 8, but it was not included. This change proposes to include the historical data for the jdk.net package, and also adds several updates to the JDK 8 data.

      Problem

      In JDK 8, the jdk.net package was marked as @Exported(true), and was part of the rt.jar, and hence qualified to be included in the data used for --release 8, but it was not included.

      Solution

      The jdk.net package will be enabled for the --release 8 data, and the historical data will be regenerated. The tool will be run on JDK 8u462, and a handful of APIs that have been added since last update of the historical data (which was related to JDK 8 MR3) will also be included.

      The addition of the jdk.net package data ought to be overall safe.

      The addition of the additional API updates is potentially more problematic, as compilation with --release 8 may succeed, but running on JDK 8 prior to JDK 8u462 may fail. This has already happened in the past on at least two occasions:

      • the original --release 8 data actually contained Nashorn API introduced in JDK 8u40, not the JDK 8 GA version
      • the historical data have been updated to cover JDK 8 MR 3 under https://bugs.openjdk.org/browse/JDK-8244763

      Specification

      The following is proposed:

      • the historical data for original jdk.net package will be added
      • java.lang.Character.CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E introduced by MR 5 will be added. This may have an impact on compilation, and code using this method compiled with --release 8 may not run on previous versions of JDK 8.
      • java.lang.ref.Reference.clone() overload is added, introduced by MR 4 (although this shall not have a direct effect on compilations, as it is an overload of a method from a supertype)
      • javax.swing.JSpinner.NumberEditor.setComponentOrientation overload is added, this shall not have a direct effect on compilations
      • com.sun.management.ThreadMXBean is augmented with a handful of methods: getThreadInfo, dumpAllThreads and getCurrentThreadAllocatedBytes introduced in u282 and getTotalThreadAllocatedBytes introduced in u412. Those may have an impact on compilation, and code using this method compiled with --release 8 may not run on previous versions of JDK 8.
      • jdk.net.ExtendedSocketOptions is augments with a handful of fields: TCP_KEEPIDLE, TCP_KEEPINTERVAL, TCP_KEEPCOUNT, introduced in u272. Those may have an impact on compilation, and code using this method compiled with --release 8 may not run on previous versions of JDK 8.

            jlahoda Jan Lahoda
            shade Aleksey Shipilev
            Adam Sotona, Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: