langtools/test/tools/javac/api/6415780/T6415780.java
changeset 27321 c8eceba990bf
parent 17556 eced45696767
child 30730 d3ce7619db2c
--- a/langtools/test/tools/javac/api/6415780/T6415780.java	Wed Oct 29 18:01:22 2014 -0700
+++ b/langtools/test/tools/javac/api/6415780/T6415780.java	Wed Oct 29 19:07:34 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
  * @run main T6415780
  */
 
+import java.io.IOException;
 import static javax.tools.StandardLocation.CLASS_PATH;
 
 public class T6415780 extends ToolTester {
@@ -39,8 +40,9 @@
         System.out.println(fm.getClassLoader(CLASS_PATH).toString()); // null-check
     }
 
-    public static void main(String... args) {
-        T6415780 tester = new T6415780();
-        tester.test();
+    public static void main(String... args) throws IOException {
+        try (T6415780 tester = new T6415780()) {
+            tester.test();
+        }
     }
 }