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

Commit

Permalink
Merge pull request #1084 from JessThrysoee/develop
Browse files Browse the repository at this point in the history
Silence the JavacFiler warning 'compiler.warn.proc.unclosed.type.files'
  • Loading branch information
yDelouis committed Aug 23, 2014
2 parents d6ac40a + b909651 commit c814caa
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit c814caa

Please sign in to comment.