8156911: JShell: file manager should be closed
Properly closing the file manager when it is being thrown away on error. Reviewed-by: rfield
This commit is contained in:
parent
f03ea9c497
commit
1aab3cd562
@ -1196,6 +1196,11 @@ class SourceCodeAnalysisImpl extends SourceCodeAnalysis {
|
||||
fm.setLocationFromPaths(StandardLocation.SOURCE_PATH, sources);
|
||||
} catch (IOException ex) {
|
||||
proc.debug(ex, "SourceCodeAnalysisImpl.SourceCache.<init>(...)");
|
||||
try {
|
||||
fm.close();
|
||||
} catch (IOException closeEx) {
|
||||
proc.debug(closeEx, "SourceCodeAnalysisImpl.SourceCache.close()");
|
||||
}
|
||||
fm = null;
|
||||
}
|
||||
this.fm = fm;
|
||||
|
Loading…
x
Reference in New Issue
Block a user