langtools/test/tools/javac/api/TestJavacTask_ParseAttrGen.java
changeset 27319 030080f03e4f
parent 9744 3e48977e539d
child 30730 d3ce7619db2c
--- a/langtools/test/tools/javac/api/TestJavacTask_ParseAttrGen.java	Wed Oct 29 12:09:17 2014 +0100
+++ b/langtools/test/tools/javac/api/TestJavacTask_ParseAttrGen.java	Wed Oct 29 17:25:23 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -45,14 +45,17 @@
     void run() throws Exception {
         comp = ToolProvider.getSystemJavaCompiler();
         fm = comp.getStandardFileManager(null, null, null);
-
-        final boolean[] booleanValues = { false, true };
-        for (boolean pk: booleanValues) {
-            for (boolean ak: booleanValues) {
-                for (boolean gk: booleanValues) {
-                    test(pk, ak, gk);
+        try {
+            final boolean[] booleanValues = { false, true };
+            for (boolean pk: booleanValues) {
+                for (boolean ak: booleanValues) {
+                    for (boolean gk: booleanValues) {
+                        test(pk, ak, gk);
+                    }
                 }
             }
+        } finally {
+            fm.close();
         }
     }