Skip to content

Commit

Permalink
BndProjectManager: close Processor
Browse files Browse the repository at this point in the history
Processor is a Closeable that was not closed.
  • Loading branch information
EcljpseB0T authored and jukzi committed Jul 10, 2023
1 parent a2612ef commit b2c4f18
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ private static void setupProject(Project bnd, IProject project) throws CoreExcep
}

static synchronized Workspace getWorkspace() throws Exception {
Processor run = new Processor();
run.setProperty(Constants.STANDALONE, TRUE);
IPath path = PDECore.getDefault().getStateLocation().append(Project.BNDCNF);
if (workspace == null) {
workspace = Workspace.createStandaloneWorkspace(run, path.toFile().toURI());
workspace.addBasicPlugin(TargetRepository.getTargetRepository());
workspace.refresh();
try (Processor run = new Processor()) {
run.setProperty(Constants.STANDALONE, TRUE);
IPath path = PDECore.getDefault().getStateLocation().append(Project.BNDCNF);
workspace = Workspace.createStandaloneWorkspace(run, path.toFile().toURI());
workspace.addBasicPlugin(TargetRepository.getTargetRepository());
workspace.refresh();
}
}
return workspace;
}
Expand Down

0 comments on commit b2c4f18

Please sign in to comment.