Skip to content

Commit

Permalink
Avoid silent CoreExceptions while project is closed
Browse files Browse the repository at this point in the history
which is the case in Tests like BasicAliasTest
  • Loading branch information
EcljpseB0T authored and jukzi committed Feb 9, 2024
1 parent c9790c6 commit 792018e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public boolean visit(IResourceDelta delta) throws CoreException {
IResource resource = delta.getResource();
if (resource instanceof IFile file) {
IProject project = file.getProject();
Object sessionProperty = project.getSessionProperty(PDECore.BND_CLASSPATH_INSTRUCTION_FILE);
Object sessionProperty = project.isOpen()
? project.getSessionProperty(PDECore.BND_CLASSPATH_INSTRUCTION_FILE)
: null;
if (sessionProperty instanceof IFile instr) {
if (instr.equals(file)) {
updateProjects.add(file.getProject());
Expand Down

0 comments on commit 792018e

Please sign in to comment.