CompletableFuture<Void> (ClassPrepareRequestor requestor, SourcePosition classPosition, Function<EventRequest, CompletableFuture<Void>> enabler) { DebuggerManagerThreadImpl.assertIsManagerThread(); if (checkReadOnly(requestor)) return CompletableFuture.completedFuture(null); List<ClassPrepareRequest> prepareRequests = myDebugProcess.getPositionManager().createPrepareRequests(requestor, classPosition); if (prepareRequests.isEmpty()) { setInvalid(requestor, JavaDebuggerBundle.message("status.invalid.breakpoint.out.of.class")); return CompletableFuture.completedFuture(null); } return CompletableFuture.allOf(StreamEx.of(prepareRequests) .nonNull() .peek(r -> registerRequest(requestor, r)) .map(enabler) .toArray(CompletableFuture[]::new)); }