Skip to content

Latest commit

 

History

History
 
 

README.md

Java 12

To run each example use: java --enable-preview --source 12 <FileName.java>

Features

Language

  • Switch expression
  • Collectors.teeing
  • More Versatile Error Recovery With CompletableFuture
    • exceptionallyAsync(Function<Throwable, ? extends T> f)
    • exceptionallyAsync(Function<Throwable, ? extends T> f, Executor e)
    • exceptionallyCompose(Function<Throwable, ? extends CompletionStage<T>> f)
    • exceptionallyComposeAsync(Function<Throwable, ? extends CompletionStage<T>> f)
    • exceptionallyComposeAsync(Function<Throwable, ? extends CompletionStage<T>> f, Executor e)
  • Compact Number Format

JVM

  • Default CDS Archives
    • -Xshare:off to disable it
  • Garbage Collection
    • Shenandoah: Red Hat low-pause-time GC, experimental;
    • G1: improvements and promptly returns unused memory SO;

JEPs

  • 12 - Preview language and VM features
  • 189 - Low-Pause-Time GC (experimental)
  • 230 - Microbenchmark Suite
  • 325 - Switch expressions (preview)
  • 334 - JVM Constants API
  • 340 - One AArch64
  • 341 - Default CDS Archives
  • 344 - Abortable mixed collections for G1
  • 345 - Promptly return unused memory from G1

Warnings

Tools:

  • Maven: 3.5.0
    • compiler plugin: 3.8.0
    • surefire and failsafe: 2.22.0
<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <compilerArgs>
            --enable-preview
        </compilerArgs>
    </configuration>
</plugin>
<plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <argLine>--enable-preview</argLine>
    </configuration>
</plugin>

Libs which manipulate bytecode that will need update:

  • Spring
  • Hibernate
  • Mockiot

Links