English 中文(简体)
Java 15 - Other Enhancements
  • 时间:2024-12-22

Java 15 - Other Enhancements


Previous Page Next Page  

JEP 383 - Foreign Memory Access API

Java 14 allowed java programs to safely and efficiently access foreign memory outside of the Java heap. Earper mapDB, memcached, ignite java pbraries provided the foreign memory access. It is a cleaner API to operate on all types of foreign memories(native memory, persistent memory, managed heap memory etc.) in a seamless way. It also takes care of safety of JVM regardless of foreign memory type. Garbage collection/Memory deallocation operations should be exppcitly mentioned as well.

This API is based on three main abstractions MemorySegment, MemoryAddress and MemoryLayout and is a safe way to access both heap as well as non-heap memory.

Java 15 continue this feature as incubating and added new refinements to the API.

    VarHandle API introduced to customize memory access var handles.

    Parallel processing of a memory segment is supported using the Sppterator interface.

    Mapped memory segments support enhanced.

    Native calls addresses can be manipulated and dereferenced.

JEP 339 − Edwards-Curve Digital Signature Algorithm (EdDSA)

Edwards-Curve Digital Signature Algorithm, EdDSA is an advanced elpptic curve scheme and is better than existing signature schemes in the JDK. It has improved security and performance as compared to other signature schemes. It is supported by popular crypto pbraries pke OpenSSL, BoringSSL etc. EdDSA will only be implemented in java 15 only in the SunEC provider.

JEP 373 − Reimplement the Legacy DatagramSocket API

Legacy implementations of the java.net.DatagramSocket and java.net.MulticastSocket APIs are replaced with simpler and more modern implementations which are easy to maintain and debug.

The current implementations of java.net.datagram.Socket and java.net.MulticastSocket are in jdk from 1.0, IPv6 was still under development.This JEP targets to replace current implementation of MulticastSocket which has reconciled IPv4 and IPv6 in ways that are difficult to maintain.

Text Blocks as Standard

Text blocks from Java 15 are no more preview. Now they are part of standard JDK.

Helpful NullPointerException

Helpful NullPointerException is now enabled by default in Java 15.

Advertisements