Boolean () { while (true) { try { if (myDone.waitForUnsafe(300L)) { break; } } catch (InterruptedException ignored) { } notifyCancelled(); } boolean successfully = isTerminatedSuccessfully(); if (!successfully) { debug(()-> "Javac compile session " + myId + " in process " + myProcessId + "didn't terminate successfully"); } return successfully; }