--- old/test/tools/javac/TryWithResources/TwrForVariable2.java 2015-10-14 09:44:25.307473492 +0300 +++ new/test/tools/javac/TryWithResources/TwrForVariable2.java 2015-10-14 09:44:25.235473490 +0300 @@ -27,6 +27,9 @@ try (args.length == 0 ? v : v) { fail("general expressions not allowed"); } + try ((TwrForVariable2)null) { + fail("null as variable is not allowed"); + } } static void fail(String reason) {