changeset 15704:02afd052face

8007485: test creates .class files in the test/ directory Reviewed-by: mcimadamore
author jjg
date Tue, 05 Feb 2013 21:55:41 -0800
parents 399c4ef97e3c
children c4124695db0c
files langtools/test/tools/javac/api/8007344/Test.java
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);