Skip to content

Commit 132c878

Browse files
Copilotcarstenartur
andcommitted
Optimize to avoid redundant getMarker() calls
Co-authored-by: carstenartur <3164220+carstenartur@users.noreply.github.com>
1 parent d6e265f commit 132c878

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

org.eclipse.jdt.debug/model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpoint.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ protected void deregisterRequest(EventRequest request, JDIDebugTarget target)
286286
// deletion.
287287
// Don't try updating the marker (decrementing the install count) if
288288
// it no longer exists.
289-
if (!(request instanceof ClassPrepareRequest) && getMarker() != null && getMarker().exists()) {
289+
IMarker marker = getMarker();
290+
if (!(request instanceof ClassPrepareRequest) && marker != null && marker.exists()) {
290291
decrementInstallCount();
291292
}
292293
}

0 commit comments

Comments
 (0)