From d0ba874be009ab645f744668aa4184c763bc36d7 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 31 Mar 2015 11:50:48 +0200 Subject: [PATCH] GroovyDebuggerTest: avoid NPE --- .../plugins/groovy/compiler/GroovyDebuggerTest.groovy | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyDebuggerTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyDebuggerTest.groovy index d8378404702f..a7300c34b192 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyDebuggerTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/compiler/GroovyDebuggerTest.groovy @@ -439,8 +439,9 @@ new FooT().whoAmI() private SuspendContextImpl waitForBreakpoint() { Semaphore semaphore = new Semaphore() semaphore.down() + def process = debugProcess // wait for all events processed - debugProcess.managerThread.schedule(new DebuggerCommandImpl() { + process.managerThread.schedule(new DebuggerCommandImpl() { @Override protected void action() throws Exception { semaphore.up(); @@ -450,13 +451,13 @@ new FooT().whoAmI() assert finished: 'Too long debugger actions' int i = 0 - def suspendManager = debugProcess.suspendManager - while (i++ < ourTimeout / 10 && !suspendManager.pausedContext && !debugProcess.processHandler.processTerminated) { + def suspendManager = process.suspendManager + while (i++ < ourTimeout / 10 && !suspendManager.pausedContext && !process.processHandler.processTerminated) { Thread.sleep(10) } def context = suspendManager.pausedContext - assert context: "too long process, terminated=$debugProcess.processHandler.processTerminated" + assert context: "too long process, terminated=${process.processHandler.processTerminated}" return context }