Java 10

created onJuly 16, 2022

general availability on 2018-03-20

JEPs

new features

JEP state summary /remark
JEP 286: Local-Variable Type Inference standard enhance the Java Language to extend type inference to declarations of local variables with initializers.
JEP 314: Additional Unicode Language-Tag Extensions standard enhance java.util.Locale and related APIs to implement additional Unicode extensions of BCP 47 language tags.
JEP 316: Heap Allocation on Alternative Memory Devices standard Enable the HotSpot VM to allocate the Java object heap on an alternative memory device, such as an NV-DIMM, specified by the user.
JEP 317: Experimental Java-Based JIT Compiler standard can be enabled with -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler
JEP 319: Root Certificates standard the cacerts keystore in a fresh installation of the JDK was previously empty. It now contains certs from various Root CAs such as DigiCert, Let’s encrypt and Trustwave.
JEP 322: Time-Based Release Versioning standard revise the version-string scheme of the Java SE Platform and the JDK, and related versioning information, for present and future time-based release models.

JDK internal

JEP summary /remark
JEP 296: Consolidate the JDK Forest into a Single Repository the numerous repositories of the JDK forest are combined into a single repository.
JEP 304: Garbage Collector Interface improve the source code isolation of different garbage collectors by introducing a clean garbage collector (GC) interface. This is not meant to add or remove a GC.
JEP 307: Parallel Full GC for G1 improve G1 worst-case latencies by making the full GC parallel. G1 is the default GC since Java 9
JEP 310: Application Class-Data Sharing to improve startup and footprint, extend the existing Class-Data Sharing (“CDS”) feature to allow application classes to be placed in the shared archive.
JEP 312: Thread-Local Handshakes will help the VM achieve lower latency by reducing the number of global safepoints.

deprecated

none

removed

JEP summary /remark
JEP 313: Remove the Native-Header Generation Tool (javah) this tool has been superseded by superior functionality in javac, added in JDK 8

some feature details

JEP 286: Local-Variable Type Inference

types can now be inverred, which allows for declarations such as:

var list = new ArrayList<String>(); // infers ArrayList<String>

however, a declaration like:

var list = someFunction();

is not such a good idea, as it makes the code hardly readable. One has to follow down the method someFunction() and check the return type in order to know what we are dealing with with the var list

JEP 314: Additional Unicode Language-Tag Extensions

As of Java SE 9, the supported BCP 47 U language-tag extensions are ca (calendar type) and nu (numbering system). JEP 314 adds support for the following additional BCP (best common practices) extensions:

  • cu (currency type), 3 ASCII letters that are or have been valid in ISO 4217, plus certain additional codes that are or have been in common use
  • fw (first day of week), valid values are “sun”, “mon”, “tue” … “sat”
  • rg (region override)
  • tz (time zone)

further information about the extensions and valid values for the extension can be found at Unicode Locale Data Markup Language and IETF, RFC 6067 BCP 47 Extension U (look for the download link for core.zip. Unpack this zip, in direcctory common/cp47 are values for currency, number and timezone).

JEP 322: Time-Based Release Versioning

Version numbers in the six-month release model of the JDK have the form of $FEATURE.$INTERIM.$UPDATE, the elements of version numbers vary as follows:

  • $FEATURE is incremented every six months: The March 2018 release is JDK 10, the September 2018 release is JDK 11, and so forth.
  • $INTERIM is always zero (since the six-month model does not include interim releases) and reserved for flexibility
  • $UPDATE is incremented one month after $FEATURE is incremented, and every three months thereafter: The April 2018 release is JDK 10.0.1, the July release is JDK 10.0.2, and so forth.

It is expected that most feature releases will contain at least one or two significant features, and for update releases never to include incompatible changes.

reference

OpenJDK JDK 10 Feature List and Schedule
Unicode Locale Data Markup Language
IETF, RFC 6067 BCP 47 Extension U