From e680f152f84532f269dce511dcbdf5bcb6c342ed Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Mon, 10 Nov 2003 23:11:18 +0000 Subject: [PATCH] Added synchronization to some of the 'CBreakpoint' methods. --- debug/org.eclipse.cdt.debug.core/ChangeLog | 4 ++++ .../cdt/debug/internal/core/breakpoints/CBreakpoint.java | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index ff578d69b5a..a0b0a56db8d 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,7 @@ +2003-11-10 Mikhail Khodjaiants + Added synchronization to some of the 'CBreakpoint' methods. + * CBreakpoint.java + 2003-11-07 Mikhail Khodjaiants Fix for PR 46358: NPE in the "setCurrentThread" method of "CDebugTarget". 'setCurrentThread': check if the old current thread is not null. diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java index 43131c16aba..aba10956ea6 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java @@ -200,7 +200,7 @@ public abstract class CBreakpoint extends Breakpoint /** * Resets the install count of this breakpoint */ - public void resetInstallCount() throws CoreException + public synchronized void resetInstallCount() throws CoreException { setAttribute( INSTALL_COUNT, 0 ); } @@ -208,7 +208,7 @@ public abstract class CBreakpoint extends Breakpoint /** * Increments the install count of this breakpoint */ - public void incrementInstallCount() throws CoreException + public synchronized void incrementInstallCount() throws CoreException { int count = getInstallCount(); setAttribute( INSTALL_COUNT, count + 1 ); @@ -226,7 +226,7 @@ public abstract class CBreakpoint extends Breakpoint /** * Decrements the install count of this breakpoint. */ - public void decrementInstallCount() throws CoreException + public synchronized void decrementInstallCount() throws CoreException { int count = getInstallCount(); if ( count > 0 )