8007485: test creates .class files in the test/ directory
Reviewed-by: mcimadamore
--- a/langtools/test/tools/javac/api/8007344/Test.java Tue Feb 05 18:55:13 2013 +0000
+++ b/langtools/test/tools/javac/api/8007344/Test.java Tue Feb 05 21:55:41 2013 -0800
@@ -41,6 +41,7 @@
import javax.lang.model.element.TypeElement;
import javax.tools.JavaFileObject;
import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
import com.sun.source.doctree.DocCommentTree;
import com.sun.source.tree.*;
@@ -83,6 +84,7 @@
File thisFile = new File(testSrc, getClass().getName() + ".java");
JavacTool javac = JavacTool.create();
StandardJavaFileManager fm = javac.getStandardFileManager(null, null, null);
+ fm.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(new File(".")));
Iterable<? extends JavaFileObject> fos = fm.getJavaFileObjects(thisFile);
testAnnoProcessor(javac, fm, fos, out, EXPECT_DOC_COMMENTS);
testTaskListener(javac, fm, fos, out, EXPECT_DOC_COMMENTS);