Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Silence the JavacFiler warning 'compiler.warn.proc.unclosed.type.files' #1084

Merged
merged 1 commit into from
Aug 23, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

import javax.annotation.processing.Filer;
import javax.annotation.processing.ProcessingEnvironment;
import javax.tools.JavaFileObject;
import javax.tools.FileObject;
import javax.tools.StandardLocation;

public class FileHelper {

Expand All @@ -45,9 +46,9 @@ public static Option<File> findRootProject(ProcessingEnvironment processingEnv)
public static Option<FileHolder> findRootProjectHolder(ProcessingEnvironment processingEnv) {
Filer filer = processingEnv.getFiler();

JavaFileObject dummySourceFile;
FileObject dummySourceFile;
try {
dummySourceFile = filer.createSourceFile("dummy" + System.currentTimeMillis());
dummySourceFile = filer.createResource(StandardLocation.SOURCE_OUTPUT, "", "dummy" + System.currentTimeMillis());
} catch (IOException ignored) {
return Option.absent();
}
Expand Down