Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Eclipse compiler: close the StandardJavaFileManager
Compare #98.
  • Loading branch information
tomaswolf committed Aug 24, 2020
commit 05299c733ff42623abf003b1d56a63939d7fa4b0
Original file line number Diff line number Diff line change
Expand Up @@ -400,19 +400,16 @@ public void report( Diagnostic<? extends JavaFileObject> diagnostic )
{
charset = Charset.defaultCharset();
}
StandardJavaFileManager manager =
compiler.getStandardFileManager( messageCollector, defaultLocale, charset );

if ( getLogger().isDebugEnabled() )
{
getLogger().debug( "ecj: using character set " + charset.displayName() );
getLogger().debug( "ecj command line: " + args );
getLogger().debug( "ecj input source files: " + allSources );
}

Iterable<? extends JavaFileObject> units = manager.getJavaFileObjectsFromStrings( allSources );
try
{
try ( StandardJavaFileManager manager =
compiler.getStandardFileManager( messageCollector, defaultLocale, charset ) ) {
Iterable<? extends JavaFileObject> units = manager.getJavaFileObjectsFromStrings( allSources );
success = Boolean.TRUE.equals(
compiler.getTask( devNull, manager, messageCollector, args, null, units ).call() );
}
Expand Down