hg: jdk9/dev/langtools: 7020499: Project Coin: improvements to try-with-resources desugaring

jan.lahoda at oracle.com jan.lahoda at oracle.com
Tue Apr 19 12:18:38 UTC 2016


Changeset: d30f35629f0e
Author:    jlahoda
Date:      2016-04-19 14:16 +0200
URL:       http://hg.openjdk.java.net/jdk9/dev/langtools/rev/d30f35629f0e

7020499: Project Coin: improvements to try-with-resources desugaring
Summary: Avoid unnecessary check for resource nullness if the resource is known to be non-null; put resource closing code in a method that is shared by multiple try-with-resources.
Reviewed-by: darcy, mcimadamore, vromero

! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java
+ test/tools/javac/TryWithResources/TwrAvoidNullCheck.java
+ test/tools/javac/TryWithResources/TwrClose.java
+ test/tools/javac/TryWithResources/TwrShareCloseCode.java
! test/tools/javac/annotations/typeAnnotations/referenceinfos/ResourceVariable.java
! test/tools/javac/flow/tests/TestCaseTry.java



More information about the jdk9-dev-changes mailing list