--- old/test/tools/javac/TryWithResources/TwrForVariable1.java 2015-10-14 09:44:25.075473485 +0300 +++ new/test/tools/javac/TryWithResources/TwrForVariable1.java 2015-10-14 09:44:25.003473483 +0300 @@ -37,6 +37,18 @@ } assertCloseCount(6); + + // null test cases + TwrForVariable1 n = null; + + try (n) { + } + try (n) { + throw new Exception(); + } catch (Exception e) { + } + + assertCloseCount(6); } static void assertCloseCount(int expectedCloseCount) {