JDK 15 Release Notes

0

These notes characterize well-known changes, enhancements, removed
APIs and aspects, deprecated APIs and aspects, and other
files about JDK 15 and Java SE 15. In some cases, the
descriptions provide hyperlinks to extra detailed files about
an field or a substitute. This net page does no longer duplicate the descriptions
supplied by the Java SE 15 ( JSR 390) Platform Specification, which
affords informative background for all specification changes and
would possibly perchance furthermore also embody the identification of removed or deprecated APIs
and aspects no longer described here. The Java SE 15 ( JSR 390)
specification affords hyperlinks to:

Strive to be responsive to the negate in that report besides to
the items described on this net page.

The descriptions on this Liberate Showcase net page also title
ability compatibility considerations that you just would furthermore come across when
migrating to JDK 15. The Kinds
of Compatibility
net page on the OpenJDK wiki identifies three
forms of ability compatibility considerations for Java programs broken-down in
these descriptions:

  • Source: Source compatibility preserves the
    skill to assemble existing offer code with out error.

  • Binary: Binary compatibility is defined in The
    Java Language Specification as retaining the skill to link
    existing class files with out error.

  • Behavioral: Behavioral compatibility entails
    the semantics of the code that is executed at runtime.

Glance CSRs Licensed
for JDK 15
for the listing of CSRs closed in JDK 15 and the
Compatibility
& Specification Overview (CSR)
net page on the OpenJDK wiki for
general files about compatibility.

Contents

Recent Aspects

This share describes about a of the enhancements in Java SE 15
and JDK 15. In some cases, the descriptions provide hyperlinks to
extra detailed files about an field or a substitute. The
APIs described here are other folk that are supplied with the Oracle
JDK. It entails a complete implementation of the Java SE 15
Platform and extra Java APIs to enhance constructing, debugging,
and monitoring Java applications. One other offer of files
about well-known enhancements and fresh aspects in Java SE 15 and JDK
15 is the Java SE 15
( JSR 390)
Platform Specification, which paperwork the changes
to the specification made between Java SE 14 and Java SE 15. This
report entails descriptions of these fresh aspects and
enhancements that are also changes to the specification. The
descriptions also title ability compatibility considerations that you just
would possibly perchance furthermore come across when migrating to JDK 15.

Give a grab to for Unicode 13.0 (JDK-8239383)

core-libs/java.lang

This open upgrades Unicode enhance to 13.0, which incorporates
the next:

  • The java.lang.Persona class supports Unicode
    Persona Database of 13.0 diploma, which 13.0 provides 5,930 characters,
    for a complete of 143,859 characters. These additions embody 4 fresh
    scripts, for a complete of 154 scripts, besides to 55 fresh emoji
    characters.
  • The java.textual negate.Bidi and
    java.textual negate.Normalizer classes enhance 13.0 diploma of
    Unicode Standard Annexes, #9 and #15, respectively.
  • The java.util.regex equipment supports Prolonged
    Grapheme Clusters per 13.0 diploma of Unicode Standard Annex #29
    For added detail about Unicode 13.0, test with the Unicode Consortium’s
    open show
    .

Added isEmpty Default Technique to CharSequence (JDK-8215401)

core-libs/java.lang

java.lang.CharSequence has been updated on this
open to elaborate a default isEmpty formulation that checks
if a personality sequence is empty. Attempting out for, and filtering out,
empty Strings and other CharSequences is
a general incidence in code and CharSequence::isEmpty
would possibly perchance furthermore even be broken-down as a style reference. Classes that enforce
java.lang.CharSequence and but every other interface that
defines isEmpty formulation need to be responsive to this
addition as they would possibly perchance furthermore need to be modified to override the
isEmpty formulation.

JEP 371: Hidden
Classes (JDK-8238358)

core-libs/java.lang.invoke

JEP 371
introduces hidden classes in Java 15. Hidden classes have faith the
following implications to existing code:

  1. Class::getName historically returns a binary title,
    but for a hidden class it returns a string that contains an ASCII
    forward nick (/) and is therefore no longer a binary title.
    Purposes that have interaction the returned string is a binary title would possibly perchance furthermore
    need to be updated to deal with hidden classes. That acknowledged, the
    longstanding notice of Unsafe::defineAnonymousClass
    became once to elaborate classes whose names weren’t binary names, so some
    programs would possibly perchance furthermore already deal with such names efficiently.

  2. Class::descriptorString and
    MethodType::descriptorString returns a string that
    choices a ASCII dot (.) for a hidden class and
    therefore is rarely any longer a model descriptor conforming to JVMS 4.3. Purposes
    that have interaction the returned string is a model descriptor that conforms
    to JVMS 4.3 would possibly perchance furthermore need to be updated to deal with hidden classes.

  3. Class::getNestMembers is modified to no longer throw an
    exception when it fails to validate a nest membership of any member
    listed in NestMembers attribute. As a replace,
    Class::getNestMembers returns the nest host and the
    contributors listed in the host’s NestMembers attribute
    that are efficiently resolved and likely to have faith the same nest
    host as this class. (This formulation it’ll furthermore return fewer contributors that
    listed in NestMembers attribute.) Present code that
    expects LinkageError when there would possibly perchance be a infamous nest
    membership would possibly perchance furthermore be impacted.

  4. The nestmate test in the JVM is modified to throw only
    IllegalAccessError when the nest membership is
    invalid. Some historical thought is well-known:

  • In Java 8, every score admission to administration failure became once signaled with
    IllegalAccessError (IAE). Moreover, if a given score admission to
    test failed with IAE once, then the same test would fail with IAE
    on every occasion.
  • In Java 11, the introduction of nest mates (JEP 181) intended that an
    score admission to administration failure would possibly perchance furthermore be signaled either with
    IllegalAccessError or, if nest membership became once invalid,
    LinkageError. Tranquil, if a given score admission to envision failed
    with a mumble exception, then the same test would constantly fail
    with the same exception.
  • In Java 15, the introduction of
    Search for::defineHiddenClass implies that the nest host
    of the lookup class need to make certain eagerly, when the hidden
    class is defined as a nestmate of the lookup class. Both
    Search for::defineHiddenClass and
    Class::getNestHost both resolve the nest host of a
    class in a extra resilient manner than the JVM did in Java 11;
    particularly, the API simply treats a class as self-hosted if its
    purported nest membership is invalid. For consistency with the API,
    the JVM no longer throws LinkageError when a class’s
    nest membership is invalid, and in its set up treats the category as
    self-hosted. This formulation that the JVM only throws IAE from score admission to
    administration (on narrative of a self-hosted class is rarely any longer going to enable any other
    class to score admission to its non-public contributors). Here’s the habits anticipated
    by the monumental majority of user code.
  1. JVM TI GetClassSignature returns a string that
    choices a ASCII dot (.) for a hidden class. JVM TI
    agents would possibly perchance furthermore need updating for hidden classes in the occasion that they have interaction the
    returned string from GetClassSignature is a model
    descriptor conforming to JVMS 4.3.

Added Give a grab to for SO_INCOMING_NAPI_ID Give a grab to (JDK-8243099)

core-libs/java.gain

A brand fresh JDK-mumble socket option
SO_INCOMING_NAPI_ID has been added to
jdk.gain.ExtendedSocketOptions on this open. The
socket option is Linux mumble and allows applications to demand
the NAPI (Recent API) ID of the underlying machine queue linked
with its socket connection and engage perfect thing about the Utility
Procedure Queue (ADQ) feature of high efficiency Community Interface
Card (NIC) devices.

Specialized Implementations of TreeMap Systems (JDK-8176894)

core-libs/java.util:collections

The TreeMap class now affords overriding implementations of the
putIfAbsent, computeIfAbsent,
computeIfPresent, compute, and
merge recommendations. The fresh implementations provide a
efficiency insist. On the different hand, if the aim supplied to the
compute- or merge recommendations modifies the
plan, ConcurrentModificationException would possibly perchance furthermore be thrown, for the reason that
aim that is supplied to those recommendations is illegal from
editing the plan. If a ConcurrentModificationException occurs, the
aim need to either be modified to steer clear of editing the plan, or the
surrounding code need to be rewritten to interchange uses of the
compute- and merge recommendations with
earlier Intention recommendations similar to score and
place.

Glance JDK-8227666
for added files.

Added Capacity to Configure Third Port for A long way off JMX
(JDK-8234484)

core-svc/javax.administration

JMX supports (mumble) a long way flung community score admission to thru the
configuration of two community ports (either from the express line or
in a property file), by setting the next properties:

com.solar.administration.jmxremote.port=

com.solar.administration.jmxremote.rmi.port=

Showcase: If it’s no longer specified, the 2nd port will default to
the most important.

A third native port is also opened to unprejudiced earn (native) JMX
connections. This port beforehand had its number selected at
random, which would possibly perchance furthermore reason port collisions.

On the different hand, it is now that you just would possibly perchance well be consider to configure the third JMX port
(native only) by the usage of:

com.solar.administration.jmxremote.native.port=

Recent Possibility Added to jstatd for Specifying RMI Connector Port
Number (JDK-8196729)

core-svc/tools

A brand fresh -r option has been added to the
jstatd express to specify the RMI connector port
number. If a port number is rarely any longer specified, a random on hand port
is broken-down.

Recent Possibility Added to jcmd for Writing a gzipped Heap Dump
(JDK-8237354)

core-svc/tools

A brand fresh integer option gz has been added to the
GC.heap_dump diagnostic express. Whether it is specified,
this would possibly perchance enable the gzip compression of the written heap dump. The
supplied designate is the compression diploma. It will fluctuate from 1
(fastest) to 9 (slowest, but most nice looking compression). The urged
diploma is 1.

JEP 378: Text
Blocks (JDK-8236934)

Text blocks have faith been added to the Java language. A textual negate block
is a multi-line string literal that avoids the need for heaps of toddle
sequences, mechanically formats the string in a predictable formulation,
and affords the developer administration over the structure when desired.

Recent Choices Added to jhsdb for debugd Mode (JDK-8196751)

hotspot/svc-agent

Three fresh choices have faith been added to the jhsdb
express for the debugd mode:

  1. --rmiport is broken-down to specify a RMI
    connector port number. If a port number is rarely any longer specified, a random
    on hand port is broken-down.
  2. --registryport is broken-down to specify a
    RMI registry port number. This feature overrides the map property
    solar.jvm.hotspot.rmi.port. If a port number is rarely any longer
    specified, the map property is broken-down. If the map property is
    no longer role, the default port 1099 is broken-down.
  3. --hostname is broken-down to specify a
    RMI connector host title. The price is on the total a hostname or an
    IPv4/IPv6 deal with. This feature overrides the map property
    java.rmi.server.hostname. If a bunch title no longer
    specified, the map property is broken-down. If the map property is
    no longer role, a tool host title is broken-down.

Added Revocation Checking to jarsigner (JDK-8242060)

safety-libs/java.safety

A brand fresh -revCheck option has been added to the
jarsigner express to enable revocation checking of
certificates.

Instruments Warn If Worn Algorithms Are Aged Before Restricting Them
(JDK-8172404)

safety-libs/java.safety

The keytool and jarsigner tools have faith
been updated to warn users about earlier faculty cryptographic algorithms
being broken-down forward of they are disabled. In this open, the tools
field warnings for the SHA-1 hash algorithm and 1024-bit RSA/DSA
keys.

SunJCE Supplier Helps SHA-3 Essentially based fully Hmac Algorithms
(JDK-8172680)

safety-libs/javax.crypto

The SunJCE provider has been enhanced to enhance HmacSHA3-224,
HmacSHA3-256, HmacSHA3-384, and HmacSHA3-512. Implementations for
these algorithms are on hand underneath the Mac and KeyGenerator
companies and products. The Mac carrier generates the keyed-hash and the
KeyGenerator carrier generates the main for the Mac.

Recent System Properties to Configure the TLS Signature Schemes
(JDK-8242141)

safety-libs/javax.gain.ssl

Two fresh map properties have faith been added to customise the TLS
signature schemes in JDK.
jdk.tls.shopper.SignatureSchemes has been added for the
TLS shopper aspect, and jdk.tls.server.SignatureSchemes
has been added for the server aspect.

Every map property choices a comma-separated listing of
supported signature plan names specifying the signature schemes
that would furthermore be broken-down for the TLS connections.

The names are described in the “Signature Schemes” share of
the Java Security Standard Algorithm Names
Specification
.

Give a grab to for certificate_authorities Extension (JDK-8206925)

safety-libs/javax.gain.ssl

The “certificate_authorities” extension is an no longer obligatory extension
launched in TLS 1.3. It’s broken-down to show the certificates
authorities (CAs) that an endpoint supports and would be broken-down by
the receiving endpoint to handbook certificates desire.

With this JDK open, the “certificate_authorities” extension
is supported for TLS 1.3 in both the shopper and the server aspects.
This extension is continually fresh for shopper certificates desire,
whereas it’s no longer obligatory for server certificates desire.

Purposes can enable this extension for server certificates
desire by setting the
jdk.tls.shopper.enableCAExtension map property to
staunch. The default designate of the property is
false.

Showcase that if the shopper trusts extra CAs than the size limit of
the extension (lower than 2^16 bytes), the extension is rarely any longer enabled.
Also, some server implementations create no longer enable handshake messages
to exceed 2^14 bytes. In consequence, there would possibly perchance furthermore be interoperability
considerations when jdk.tls.shopper.enableCAExtension is made up our minds to
staunch and the shopper trusts extra CAs than the server
implementation limit.

Give a grab to for canonicalize in krb5.conf (JDK-8239385)

safety-libs/org.ietf.jgss:krb5

The ‘canonicalize’ flag in the
krb5.conf file
is now supported by the JDK Kerberos
implementation. When role to staunch, RFC 6806 title
canonicalization is requested by purchasers in TGT requests to KDC
companies and products (AS protocol). Otherwise, and by default, it’s no longer
requested.

The fresh default habits is somewhat about a from JDK 14 and earlier
releases where title canonicalization became once constantly requested by
purchasers in TGT requests to KDC companies and products (supplied that enhance for
RFC 6806 became once no longer
explicitly disabled with the
solar.safety.krb5.disableReferrals map or safety
properties).

Eliminated Aspects and Choices

This share describes the APIs, aspects, and choices that have faith been
removed in Java SE 15 and JDK 15. The APIs described here are these
that are supplied with the Oracle JDK. It entails a complete
implementation of the Java SE 15 Platform and extra Java APIs
to enhance constructing, debugging, and monitoring Java applications.
One other offer of files about well-known enhancements and fresh
aspects in Java SE 15 and JDK 15 is the Java SE 15
( JSR 390)
Platform Specification, which paperwork changes to
the specification made between Java SE 14 and Java SE 15. This
report entails the identification of removed APIs and aspects
no longer described here. The descriptions below would possibly perchance furthermore also title
ability compatibility considerations that you just would furthermore come across when
migrating to JDK 15. Glance CSRs Licensed
for JDK 15
for the listing of CSRs closed in JDK 15.

Elimination of Terminally Deprecated Solaris-mumble SO_FLOW_SLA
Socket Possibility (JDK-8244582)

core-libs/java.gain

In this open, alongside side the removal of the Solaris
port in JEP 381,
the JDK-mumble socket option
jdk.gain.ExtendedSocketOptions.SO_FLOW_SLA, which is
only relevant to sockets on Solaris, and its supporting classes
SocketFlow and SocketFlow.Station, have faith
been removed.

Elimination of RMI Static Stub Compiler (rmic) (JDK-8225319)

core-libs/java.rmi

The RMI static stub compiler rmic has been removed.
The rmic machine is dilapidated and has been deprecated for
removal since JDK 13.

Elimination of Deprecated Fixed
RMIConnectorServer.CREDENTIAL_TYPES (JDK-8213222)

core-svc/javax.administration

The terminally deprecated fixed
javax.administration.a long way flung.rmi.RMIConnectorServer.CREDENTIAL_TYPE
has been removed. A filter sample would possibly perchance furthermore even be specified in its set up by
the usage of
RMIConnectorServer.CREDENTIALS_FILTER_PATTERN.

Elimination of Nashorn JavaScript Engine (JDK-8236933)

The Nashorn JavaScript script engine, its APIs, and the
jjs machine have faith been removed. The engine, the APIs, and
the machine have faith been deprecated for removal in Java 11 with the actual
intent to take care of shut them in a future open.

Broken-down -XX:UseAdaptiveGCBoundary (JDK-8228991)

hotspot/gc

The VM option UseAdaptiveGCBoundary is dilapidated.
Consume of this option will have faith an dilapidated option warning but will
otherwise be uncared for.

This feature became once beforehand disabled by default, and enabling it
only had an raze when also the usage of -XX:+UseParallelGC.
Enabling it became once intended to produce a efficiency earnings for some
applications. On the different hand, it has been disabled by default for a prolonged
time thanks to crashes and efficiency regressions.

Elimination of DocuSign Root CA Certificate (JDK-8225068)

safety-libs/java.safety

The following expired DocuSign root CA certificates has been
a long way off from the cacerts keystore:

+ alias title "keynectisrootca [jdk]"

  Illustrious Name: CN=KEYNECTIS ROOT CA, OU=ROOT, O=KEYNECTIS, C=FR

Elimination of Comodo Root CA Certificate (JDK-8225069)

safety-libs/java.safety

The following expired Comodo root CA certificates has been
a long way off from the cacerts keystore:

+ alias title "addtrustclass1ca [jdk]"

  Illustrious Name: CN=AddTrust Class 1 CA Root, OU=AddTrust TTP Community, O=AddTrust AB, C=SE

Elimination of com.solar.gain.ssl.inner.ssl.Supplier Name
(JDK-8219989)

safety-libs/javax.gain.ssl

The legacy SunJSSE provider title,
“com.solar.gain.ssl.inner.ssl.Supplier” has been removed and can
no longer be broken-down. The “SunJSSE” title need to be broken-down in its set up. For
instance, SSLContext.getInstance("TLS", "SunJSSE").

Retired the Deprecated SSLSession.getPeerCertificateChain()
Technique Implementation (JDK-8241039)

safety-libs/javax.gain.ssl

The implementation of the deprecated
SSLSession.getPeerCertificateChain() formulation has been
a long way off from the JDK in the SunJSSE provider and the HTTP shopper
implementation. The default implementation of this formulation has been
modified to throw UnsupportedOperationException.

SSLSession.getPeerCertificateChain() is a
deprecated formulation and would be removed in a future open. To
mitigate the removal compatibility influence, applications need to use
the SSLSession.getPeerCertificates() formulation in its set up.
For carrier suppliers, please take care of shut this formulation from the existing
implementation, and create no longer enhance this formulation in any fresh
implementation.

Deprecated Aspects and Choices

Extra sources of files about the APIs, aspects, and
choices deprecated in Java SE 15 and JDK 15 embody:

  • The
    Deprecated API
    net page identifies all deprecated APIs alongside side
    these deprecated in Java SE 15.
  • The Java SE 15
    ( JSR 390)
    specification specification paperwork changes to the
    specification made between Java SE 14 and Java SE 15 that embody
    the identification of deprecated APIs and aspects no longer described
    here.
  • JEP 277: Enhanced
    Deprecation
    affords a detailed description of the deprecation
    protection. Strive to be responsive to the updated protection described on this
    report.

Strive to be responsive to the contents in these paperwork as successfully
because the items described on this open notes net page.

The descriptions of deprecated APIs would possibly perchance furthermore embody references to
the deprecation warnings of forRemoval=staunch and
forRemoval=false. The forRemoval=staunch
textual negate indicates that a deprecated API would possibly perchance furthermore be a long way off from the next
main open. The forRemoval=false textual negate indicates
that a deprecated API is rarely any longer anticipated to be a long way off from the next
main open but would possibly perchance furthermore be removed in some later open.

The descriptions below also title ability compatibility
considerations that you just would furthermore come across when migrating to JDK 15. Glance
CSRs
Licensed for JDK 15
for the listing of CSRs closed in JDK 15.

Deprecated RMI Activation for Elimination (JDK-8245068)

core-libs/java.rmi

The RMI Activation mechanism has been deprecated and would be
removed in a future version of the platform. RMI Activation is an
dilapidated phase of RMI that has been no longer obligatory since Java 8. It allows
RMI server JVMs to be began (“activated”) upon receipt of a
demand from a shopper, somewhat than requiring RMI server JVMs to be
running constantly. Different parts of RMI are no longer deprecated. Glance
JEP 385 for added
files.

Deprecated NSWindowStyleMaskTexturedBackground (JDK-8240995)

After an toughen of the macOS SDK broken-down to plan the JDK, the
habits of the apple.awt.brushMetalLook and
textured Swing properties has modified. When these
properties are role, the title of the frame is aloof considered. It’s
urged that the apple.awt.transparentTitleBar
property be role to staunch to attain the title of the frame
invisible but again. The apple.awt.fullWindowContent
property would possibly perchance furthermore even be broken-down.

Please show that Textured window enhance became once
implemented by the usage of the
NSTexturedBackgroundWindowMask designate of
NSWindowStyleMask. On the different hand, this became once deprecated in
macOS 10.12 alongside side
NSWindowStyleMaskTexturedBackground, which became once
deprecated in macOS 10.14.

For added files, test with the next
documentation:

Deprecated -XX:ForceNUMA Possibility (JDK-8243628)

hotspot/gc

The VM option ForceNUMA is deprecated. Consume of this
option will have faith a deprecation warning. This feature will likely be
removed in a future open.

This feature has constantly been disabled by default. It exists to
enhance sorting out of NUMA-linked code paths when running on a single
node / UMA platform.

Disabled Biased-locking and Deprecated Biased-locking Flags
(JDK-8231264)

hotspot/runtime

Biased locking has been disabled by default on this open. In
addition, the VM option UseBiasedLocking alongside side
the VM choices BiasedLockingStartupDelay,
BiasedLockingBulkRebiasThreshold,
BiasedLockingBulkRevokeThreshold,
BiasedLockingDecayTime and
UseOptoBiasInlining have faith been deprecated. The decisions
will proceed to work as intended but will generate a deprecation
warning when they are broken-down.

Biased locking would possibly perchance furthermore have an effect on efficiency on applications that
uncover vital amounts of uncontended synchronization, similar to
applications that rely on older Java Collections APIs that
synchronize on every score admission to. Hashtable and
Vector are examples of these APIs. Consume
-XX:+BiasedLocking on the express line to re-enable
biased locking. File any vital efficiency regressions to
Oracle with biased locking disabled.

Disable Native SunEC Implementation by Default (JDK-8237219)

safety-libs/javax.crypto

The SunEC crypto provider no longer advertises curves that are
no longer implemented by the usage of fresh formulas and tactics. Arbitrary
and named curves, listed at the bottom of this show, are disabled.
In most cases broken-down named curves, secp256r1, secp384r1, secp521r1,
x25519, and x448, live supported and enabled by SunEC on narrative of
they use up-to-the-minute tactics. Purposes that aloof require the
disabled curves from the SunEC provider can re-enable them by
setting the System property jdk.sunec.disableNative to
false. As an instance: java
-Djdk.sunec.disableNative=false ...
.


If this property is made up our minds to any other designate, the curves will live
disabled. Exceptions thrown when the curves are disabled will
have faith the message Legacy SunEC curve disabled,
followed by the title of the curve. Systems tormented by the substitute
are KeyPair.generateKeyPair(),
KeyAgreement.generateSecret(),
Signature.overview(), and Signature.set().
These recommendations throw the same exception class they’d forward of when
the curve became once no longer supported.

The following curves are disabled: secp112r1, secp112r2,
secp128r1, secp128r2, secp160k1, secp160r1, secp160r2, secp192k1,
secp192r1, secp224k1, secp224r1, secp256k1, sect113r1, sect113r2,
sect131r1, sect131r2, sect163k1, sect163r1, sect163r2, sect193r1,
sect193r2, sect233k1, sect233r1, sect239k1, sect283k1, sect283r1,
sect409k1, sect409r1, sect571k1, sect571r1, X9.62 c2tnb191v1, X9.62
c2tnb191v2, X9.62 c2tnb191v3, X9.62 c2tnb239v1, X9.62 c2tnb239v2,
X9.62 c2tnb239v3, X9.62 c2tnb359v1, X9.62 c2tnb431r1, X9.62
prime192v2, X9.62 prime192v3, X9.62 prime239v1, X9.62 prime239v2,
X9.62 prime239v3, brainpoolP256r1 brainpoolP320r1, brainpoolP384r1,
brainpoolP512r1

Added forRemoval=staunch to Beforehand Deprecated ContentSigner
APIs (JDK-8242260)

safety-libs/jdk.safety

The ContentSigner and
ContentSignerParameters classes in the
com.solar.jarsigner equipment enhance different signers
and have faith been deprecated with forRemoval=staunch. When
the -altsigner or -altsignerpath choices
are specified, the jarsigner machine produces a warning
that these choices are deprecated and would be removed.

Identified Disorders

java.gain.HttpClient Does No longer Override Protocols Specified in
SSLContext Default Parameters (JDK-8239594)

core-libs/java.gain

All the design thru the setup of fresh connections,
java.gain.http.HttpClient now uses the default role of
protocols supplied by the SSLContext when negotiating
the TLS handshake. Within the absence of any SSLParameters
explicitly supplied to the HttpClient.builder, the
HttpClient has been updated to no longer override any
default-selected protocols in the SSLContext. In consequence, the
real TLS version that is negotiated would possibly perchance furthermore differ from that of
earlier releases, or it’ll furthermore even be triumphant or fail to barter
when it beforehand would possibly perchance furthermore no longer have faith.

[macos] Give a grab to for Notarizing jpackage app-image and dmg
(JDK-8237490)

tools/jpackage

jpackage cannot break programs on macOS that are real for
notarization.

Different Notes

The following notes characterize extra changes and files
about this open. In some cases, the next descriptions
provide hyperlinks to extra detailed files about an field or
a substitute.

Workaround for Dwelling windows GDI API’s reminiscence restrictions
(JDK-8240654)

shopper-libs

It has been came upon that some Dwelling windows GDI capabilities don’t enhance
all forms of Java heap reminiscence allocation schemes. This field can
reason repaint considerations and printing bugs. It has been worked spherical
by allocating temporary buffers off heap.

Glance:
https://enhance.microsoft.com/en-us/wait on/4567569/gdi-apis-would possibly perchance furthermore-fail-when-tremendous-pages-or-vad-spanning-is-broken-down

java.awt.Robotic.lengthen() Technique Completes With Interrupt Station
Jam When Interrupted (JDK-8210231)

shopper-libs/java.awt

When it is interrupted, the implementation of the
java.awt.Robotic.lengthen() formulation has been modified to
complete with the interrupt pains role.

If a thread is interrupted whereas ready in the
java.awt.Robotic.lengthen() formulation, then this formulation
returns right away with the interrupt pains role. If the
interrupted pains is already role, this formulation returns right away
with the interrupt pains role.

Optimized Empty Substring Going thru (JDK-8240094)

core-libs/java.lang

The implementation of String.substring and linked
recommendations stripLeading and stripTrailing
have faith modified on this open to steer clear of redundantly rising a brand fresh
empty String. This would possibly perchance furthermore influence code that relies on unspecified
behaviour and the identity of empty sub-strings.

Search for::defineClass Links the Class (JDK-8238195)

core-libs/java.lang.invoke

Search for::defineClass is specified to throw
LinkageError if a linkage error occurs, but the
implementation became once no longer truly linking the category. In this open,
the implementation has been modified to link the category forward of
returning, so conforming to the specification. If
Search for::defineClass is is valuable as to elaborate a class that
fails linking, LinkageError will likely be thrown.

DatagramPacket.getPort() Returns 0 When the Port Is No longer Jam
(JDK-8237890)

core-libs/java.gain

In this open, the default port number for a datagram packet
has been modified to 0. Beforehand, this designate became once -1, which became once
undocumented. The port would possibly perchance furthermore even be retrieved by the usage of
DatagramPacket::getPort.

DatagramSocket::disconnect Permits an Implementation to Throw
UncheckedIOException (JDK-8235783)

core-libs/java.gain

Beforehand, DatagramChannel::disconnect threw an
IOException whereas
DatagramSocket::disconnect did no longer. In consequence, the
DatagramChannel::socket adapter, which calls
DatagramChannel::disconnect, catches the thrown
IOException and rethrows it as an Error.
On the different hand, this became once undocumented habits and no longer user-qualified.

The DatagramChannel::socket adapter has been
modified to throw an UncheckedIOException, and the
specification of DatagramSocket::disconnect has been
updated to report that an implementation would possibly perchance furthermore now throw an
UncheckedIOException. This ensures consistency in
habits between DatagramSocket,
DatagramChannel, and
DatagramChannel::socket adapter.

Filtering and Ordering of Addresses Returned by Change
Hosts File Name Carrier Supplier (JDK-8244958)

core-libs/java.gain

In this open, the habits of
InetAddress.getAllByName has been modified when the
different hosts file title carrier is selected .

The JDK allows specifying an different host’s file title
carrier by the usage of the jdk.gain.hosts.file map
property. The implementation of the different title carrier has
been modified to have faith interplay into narrative the values of the
java.gain.preferIPv4Stack and
java.gain.preferIPv6Addresses map properties. This
impacts the outcomes returned by
InetAddress.getAllByName when the host’s file title
carrier is selected. For well-known capabilities about
java.gain.preferIPv4Stack and
java.gain.preferIPv6Addresses, anticipate
Networking Properties
in the API documentation.

Modified the MS950 charset Encoder’s Conversion Table
(JDK-8232161)

core-libs/java.nio.charsets

In this open, about a of the one-formulation byte-to-char mappings have faith
been aligned with the most up-tp-date mappings supplied by the
Unicode Consortium
.

Give a grab to Financial Grouping Separator in
DecimalFormat/DecimalFormatSymbols (JDK-8227313)

core-libs/java.textual negate

DecimalFormat/DecimalFormatSymbols classes are now able to
dealing with grouping separators for forex values. As an instance,
the monetary grouping separator for the German language broken-down in
Austria (the de-AT locale) is ‘.’, whereas the monetary grouping
separator in other German locales is ‘ ‘.

ValueRange.of(prolonged, prolonged, prolonged) Does No longer Throw IAE on Invalid
Inputs (JDK-8239520)

core-libs/java.time

java.time.temporal.ValueRange.of() recommendations are now
precisely throwing an InvalidArgumentException on given invalid
arguments. As an instance, of(5, 2, 10) which is invalid
for the reason that minimal is greater than the smallest
most
, now throws the exception.

localizedBy() Overrides Localized Values With Default Values
(JDK-8244245)

core-libs/java.time

java.time.structure.DateTimeFormatter.localizedBy(Locale)
formulation now honors the default locale values, similar to
Chronologyand/or DecimalStyle of the
specified locale argument.

As an instance, in earlier JDK releases:

jshell> DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
    .localizedBy(Locale.forLanguageTag("fa"))
    .structure(LocalDate.now())
$3 ==> "جمعه 1 مهٔ 2020"

the numbers are in Arabic (Western) numerals.

In JDK 15:

jshell> DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL)
    .localizedBy(Locale.forLanguageTag("fa"))
    .structure(LocalDate.now())
$3 ==> "جمعه ۱ مهٔ ۲۰۲۰"

the numbers are in Prolonged Arabic-Indic numerals on narrative of it is
the default numbering map for the Farsi locale.

Efficiency Development for InflaterOutputStream.write
(JDK-8242848)

core-libs/java.util.jar

InflaterOutputStream(OutputStream out, Inflater infl, int
bufLen)
allows for specifying the decompressor and buffer
size to be broken-down.

InflaterOutputStream.write(byte[] b, int off, int
len)
became once writing files the usage of a max buffer size of 512
bytes.

Starting with JDK 15 the buffer size specified by process of
InflaterOutputStream(OutputStream out, Inflater infl, int
bufLen)
will likely be broken-down in calls to
InflaterOutputStream.write(byte[] b, int off, int
len)
. If the buffer size is rarely any longer specified when invoking the
InflaterOutputStreamconstructor, this would possibly perchance default to
512 bytes.

Case Insensitive Matching Does not Work Precisely for Some
Persona Classes (JDK-8214245)

core-libs/java.util.regex

The Java traditional expression engine supports the case insensitive
mode. When this mode is grew to alter into on, the engine is imagined to envision
the input textual negate with out regard to the case of the characters it
includes.

On the different hand, the sizzling implementation of matching in opposition to some
named character classes (other folk that are encoded with p{title} or
P{title} constructs) fails to appreciate the case insensitive mode.

This fix makes these character classes behave constantly with
appreciate to case sensitivity. When the everyday expression engine
operates in the case insensitive mode, the named character classes
will match the input characters with out regard to their case: lower
case, greater case, or title case.

Localized Time Zone Name Inconsistency Between English and
Different Locales (JDK-8236548)

core-libs/java.util:i18n

English time zone names supplied by the CLDR locale provider are
now precisely synthesized following the CLDR spec, somewhat than
substituted from the COMPAT provider. As an instance, SHORT style
names are no longer any longer synthesized abbreviations of LONG style names,
but in its set up have faith GMT offset formats.

Give a grab to for CLDR version 37 (JDK-8239480)

core-libs/java.util:i18n

Locale files per Unicode Consortium’s CLDR has been upgraded
to their version 37. For the detailed locale files changes, please
test with the Unicode Consortium’s CLDR open notes:

Flags Controlling C1 Inlining Bear Recent Names (JDK-8235673)

hotspot/compiler

A desire of flags controlling inlining in the C1 and C2
compilers have faith been slit up up into separate flags. The C2 compiler
retains the flags with the dilapidated names, and the C1 compiler will get the
fresh flags.

Mature flags now only controlling C2

  • MaxInlineLevel
  • MaxRecursiveInlineLevel
  • MaxInlineSize
  • MaxTrivialSize
  • InlineSmallCode
  • FreqInlineSize

Recent flags for C1 that replace the dilapidated ones

  • C1MaxInlineLevel
  • C1MaxRecursiveInlineLevel
  • C1MaxInlineSize
  • C1MaxTrivialSize

Deprecation

If the dilapidated flags are broken-down in a JDK plan with out the C2
compiler, a deprecation warning will likely be printed.

JEP 377: ZGC: A
Scalable Low-Latency Garbage Collector (Production) (JDK-8209683)

hotspot/gc

The Z Garbage Collector (ZGC) is now spellbinding to be used in manufacturing
and no longer marked as an experimental feature. ZGC is enabled by
the usage of the -XX:+UseZGC express-line option (the usage of
-XX:+UnlockExperimentalVMOptions is rarely any longer
wished).

Glance JEP 377 for
extra well-known capabilities.

Improved Ergonomics for G1 Heap Field Measurement (JDK-8241670)

hotspot/gc

The default heap space size calculation has been modified to
return bigger areas by default. The calculation aloof goals to
have faith 2048 areas, but two capabilities have faith modified:

  • Easiest the most heap size is thought to be. The dilapidated calculation
    also took the preliminary heap size into consideration, but this would possibly perchance
    give surprising habits when no heap size is made up our minds.
  • The space size is rounded up to the closest vitality of 2 in its set up
    of down. This would possibly perchance furthermore return bigger space sizes in cases where the
    most heap size is rarely any longer a vitality of 2.

These changes toughen startup and runtime efficiency.

Disabling NUMA Interleaving on Dwelling windows (JDK-8245002)

hotspot/gc

-XX:+UseNUMAInterleaving has no raze on Dwelling windows on this
open. It became once came upon that GDI APIs broken-down by java2d don’t enhance
the reminiscence reservation plan broken-down for NUMA interleaving. The JVM
detects this field and both warns about this and turns off NUMA
interleaving. Glance:
https://enhance.microsoft.com/en-us/wait on/4567569/gdi-apis-would possibly perchance furthermore-fail-when-tremendous-pages-or-vad-spanning-is-broken-down

Disabling tremendous pages on Dwelling windows (JDK-8245000)

hotspot/gc

-XX:+UseLargePages has no raze on Dwelling windows on this open. It
became once came upon that GDI APIs broken-down by java2d don’t enhance tremendous pages.
The JVM detects this field and both warns about this and reverts
to the usage of dinky pages. Glance:
https://enhance.microsoft.com/en-us/wait on/4567569/gdi-apis-would possibly perchance furthermore-fail-when-tremendous-pages-or-vad-spanning-is-broken-down

Field Structure Computation Modified (JDK-8237767)

hotspot/runtime

The formulation that self-discipline layout is computed has been modified, with
extra aggressive optimizations to steer clear of unused gaps in cases.
These fresh optimizations would possibly perchance furthermore even be disabled by the usage of a brand fresh VM option
-XX:-UseEmptySlotsInSupers.

For a restricted time, it is that you just would possibly perchance well be consider to proceed to use the dilapidated
code to compute self-discipline layout with a brand fresh VM option
-XX:-UseNewFieldLayout. On the different hand, this option has been
deprecated in JDK 15 and the dilapidated code will likely be removed in a future
open.

Allow ShowCodeDetailsInExceptionMessages by default
(JDK-8233014)

hotspot/runtime

The default of the flag ShowCodeDetailsInExceptionMessages became once
modified to ‘staunch’. The valuable NullPointerException messages of
JEP 358 are now
printed by default. The messages have faith snippets of the code where
the NullPointerException became once raised.

App deployers need to double test the output of their net
applications and identical usage eventualities. The NullPointerException
message would possibly perchance furthermore be included in application error messages or be
displayed by other formulation in the app. This would possibly perchance furthermore give a long way flung
attackers valuable hints about a ability inclined direct of the
tool parts being broken-down.

An instance message is ‘Cannot read self-discipline “c” on narrative of “a.b” is
null’. The attacker is conscious of that self-discipline b of a contains null which
would possibly perchance furthermore be unintended and offer a chance for an assault. For
extra well-known capabilities of what the message can have faith anticipate the above
mentioned JEP
358
.

Signature and SignatureSpi Salvage Parameter Systems Would possibly perchance also Return
null When Unsupported (JDK-8243424)

safety-libs/java.safety


Signature.getParameters()
and
SignatureSpi.engineGetParameters()
would possibly perchance furthermore return null if the
underlying provider does no longer enhance returning the parameters as
AlgorithmParameters. For added well-known capabilities, anticipate the Signature and
SignatureSpi formulation descriptions.

SunPKCS11 Initialization With NSS When External FIPS Modules
Are in Security Modules Database (JDK-8238555)

safety-libs/javax.crypto:pkcs11

The SunPKCS11 safety provider can now be initialized with NSS
when FIPS-enabled external modules are configured in the Security
Modules Database (NSSDB). Before this substitute, when the kind of library
became once configured for NSS in non-FIPS mode, the SunPKCS11 provider
would throw a RuntimeException with the message “FIPS flag role for
non-inner module”.

This substitute allows the JDK to work successfully with fresh NSS
releases in GNU/Linux running programs when the map-wide FIPS
protection is grew to alter into on.

Default SSLEngine Ought to Construct in Server Characteristic (JDK-8237474)

safety-libs/javax.gain.ssl

In JDK 11 and later, javax.gain.ssl.SSLEngine by
default broken-down shopper mode when handshaking. In consequence, the role of
default enabled protocols would possibly perchance furthermore differ to what’s predicted.
SSLEngine would on the total be broken-down in server mode. From
this JDK open onwards, SSLEngine will default to
server mode. The
javax.gain.ssl.SSLEngine.setUseClientMode​(boolean
mode)
formulation would possibly perchance furthermore be broken-down to configure the mode.

Read More

Leave A Reply

Your email address will not be published.