To run each example use: java --enable-preview --source 27 <FileName.java>
- 523 - Make G1 the Default Garbage Collector in All Environments
- 527 - Post-Quantum Hybrid Key Exchange for TLS 1.3
- 528 - Post-Mortem Crash Analysis with jcmd
- 531 - Lazy Constants (Third Preview)
- 532 - Primitive Types in Patterns, instanceof, and switch (Fifth Preview)
- 533 - Structured Concurrency (Seventh Preview)
- 534 - Compact Object Headers by Default
- 536 - JFR In-Process Data Redaction
- 537 - Vector API (Twelfth Incubator)
- 538 - PEM Encodings of Cryptographic Objects
- Make G1 the Default Garbage Collector in All Environments
- HotSpot will use G1 by default
- G1 will be default GC in all environments when no GC is specified
- in some scenarios, Serial GC could be selected depending on memory and CPU
- single CPU or memory less than 1792 MB
- Primitive Types in Patterns, instanceof and switch
- re-preview without change
- Structured Concurrency
- re-preview with minor changes
- changes:
- added a parameter type in
StructuredTaskScopeandJoinerto define the exception that can be thrown byjoin() - new static
openmethod in StructuredTaskScope implements the default join policy and uses a given UnaryOperator to produce the StructuredTaskScope configuration Joinerfactory methodsallSucessfulOrThrow,anySucessfullOrThrowandawaitAllSucessfulOrThrowreturns a joiner that throwsExecutionExceptionwhen the outcome is an exception- removed method
Joiner.awaitAll - method
onTimeoutfromJoinerhas been replaced bytimeout
- added a parameter type in
- Compact Object Headers by Default
- compact object headers will be default object header layout in the HotSpot JVM
- "reduce object headers from 96 bits down to 64 bits on 64-bit architectures, thereby reducing heap size, improving deployment density, and increasing data locality"
- to disabled:
java -XX:-UseCompactObjectHeaders ...
- PEM Encodings of Cryptographic Objects
- promotion to standard
- "introduce an API for encoding objects that represent cryptographic keys, certificates, and certificate revocation lists into the widely-used Privacy-Enhanced Mail (PEM) transport format"
- support conversions between PEM text and cryptographic objects that have standard representations in the binary formats of PKCS#8 (for private keys), X.509 (public keys, certificates, and certificate revocation lists), and PKCS#8 v2.0 (encrypted private keys and asymmetric keys)