@@ -42,28 +42,24 @@ public class Breakpoint implements IBreakpoint {
4242 private String condition = null ;
4343 private String logMessage = null ;
4444 private HashMap <Object , Object > propertyMap = new HashMap <>();
45- private final boolean suspendAllThreads ;
4645
4746 private boolean async = false ;
4847
49- Breakpoint (VirtualMachine vm , IEventHub eventHub , String className , int lineNumber , boolean suspendAllThreads ) {
50- this (vm , eventHub , className , lineNumber , 0 , null , suspendAllThreads );
48+ Breakpoint (VirtualMachine vm , IEventHub eventHub , String className , int lineNumber ) {
49+ this (vm , eventHub , className , lineNumber , 0 , null );
5150 }
5251
53- Breakpoint (VirtualMachine vm , IEventHub eventHub , String className , int lineNumber , int hitCount , boolean suspendAllThreads ) {
54- this (vm , eventHub , className , lineNumber , hitCount , null , suspendAllThreads );
52+ Breakpoint (VirtualMachine vm , IEventHub eventHub , String className , int lineNumber , int hitCount ) {
53+ this (vm , eventHub , className , lineNumber , hitCount , null );
5554 }
5655
57- Breakpoint (VirtualMachine vm , IEventHub eventHub , String className , int lineNumber , int hitCount ,
58- String condition , boolean suspendAllThreads ) {
59- this (vm , eventHub , className , lineNumber , hitCount , condition , null , suspendAllThreads );
56+ Breakpoint (VirtualMachine vm , IEventHub eventHub , String className , int lineNumber , int hitCount , String condition ) {
57+ this (vm , eventHub , className , lineNumber , hitCount , condition , null );
6058 }
6159
62- Breakpoint (VirtualMachine vm , IEventHub eventHub , String className , int lineNumber , int hitCount ,
63- String condition , String logMessage , boolean suspendAllThreads ) {
60+ Breakpoint (VirtualMachine vm , IEventHub eventHub , String className , int lineNumber , int hitCount , String condition , String logMessage ) {
6461 this .vm = vm ;
6562 this .eventHub = eventHub ;
66- this .suspendAllThreads = suspendAllThreads ;
6763 String contextClass = className ;
6864 String methodName = null ;
6965 String methodSignature = null ;
@@ -83,15 +79,13 @@ public class Breakpoint implements IBreakpoint {
8379 this .logMessage = logMessage ;
8480 }
8581
86- Breakpoint (VirtualMachine vm , IEventHub eventHub , JavaBreakpointLocation sourceLocation , int hitCount ,
87- String condition , String logMessage , boolean suspendAllThreads ) {
82+ Breakpoint (VirtualMachine vm , IEventHub eventHub , JavaBreakpointLocation sourceLocation , int hitCount , String condition , String logMessage ) {
8883 this .vm = vm ;
8984 this .eventHub = eventHub ;
9085 this .sourceLocation = sourceLocation ;
9186 this .hitCount = hitCount ;
9287 this .condition = condition ;
9388 this .logMessage = logMessage ;
94- this .suspendAllThreads = suspendAllThreads ;
9589 }
9690
9791 // IDebugResource
@@ -209,19 +203,6 @@ public void setAsync(boolean async) {
209203 this .async = async ;
210204 }
211205
212- @ Override
213- public void setSuspendPolicy (String policy ) {
214- }
215-
216- @ Override
217- public String getSuspendPolicy () {
218- return suspendAllThreads ? "SUSPEND_ALL" : "SUSPEND_EVENT_THREAD" ;
219- }
220-
221- protected boolean suspendAllThreads () {
222- return suspendAllThreads ;
223- }
224-
225206 @ Override
226207 public CompletableFuture <IBreakpoint > install () {
227208 // It's possible that different class loaders create new class with the same name.
@@ -431,11 +412,7 @@ private CompletableFuture<List<BreakpointRequest>> createBreakpointRequests(List
431412
432413 newLocations .forEach (location -> {
433414 BreakpointRequest request = vm .eventRequestManager ().createBreakpointRequest (location );
434- if ("SUSPEND_ALL" .equals (getSuspendPolicy ())) {
435- request .setSuspendPolicy (BreakpointRequest .SUSPEND_ALL );
436- } else {
437- request .setSuspendPolicy (BreakpointRequest .SUSPEND_EVENT_THREAD );
438- }
415+ request .setSuspendPolicy (BreakpointRequest .SUSPEND_EVENT_THREAD );
439416 if (hitCount > 0 ) {
440417 request .addCountFilter (hitCount );
441418 }
0 commit comments