--- old/test/hotspot/jtreg/runtime/valhalla/valuetypes/Empty.java 2018-05-17 15:55:47.000000000 -0400 +++ new/test/hotspot/jtreg/runtime/valhalla/valuetypes/Empty.java 2018-05-17 15:55:47.000000000 -0400 @@ -34,6 +34,13 @@ } } +class EmptyTest { + public void run() { + EmptyValue.createEmptyValue(); + throw new RuntimeException("Excepted class file parse error"); + } +} + /** * @test Empty * @summary Test empty value type @@ -43,9 +50,9 @@ */ public class Empty { public static void main(String[] args) { - try { - EmptyValue.createEmptyValue(); - throw new RuntimeException("Excepted class file parse error"); - } catch (ClassFormatError cfe) {} + try { + EmptyTest test = new EmptyTest(); + test.run(); + } catch (ClassFormatError cfe) {} } }