diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java index de09063b148bb..47efc5a75aad2 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java @@ -398,7 +398,11 @@ public Throwable getDeploymentProblem() { @Override public void setRemoteProblem(Throwable throwable) { compileProblem = throwable; - getCompileOutput().setMessage(throwable.getMessage()); + if (throwable == null) { + getCompileOutput().setMessage(null); + } else { + getCompileOutput().setMessage(throwable.getMessage()); + } } private StatusLine getCompileOutput() { @@ -561,9 +565,7 @@ public boolean doScan(boolean userInitiated, boolean forceRestart) { return true; } else if (!filesChanged.isEmpty()) { try { - for (Consumer> consumer : noRestartChangesConsumers) { - consumer.accept(filesChanged); - } + notifyExtensions(filesChanged); hotReloadProblem = null; getCompileOutput().setMessage(null); } catch (Throwable t) { @@ -585,6 +587,27 @@ public boolean doScan(boolean userInitiated, boolean forceRestart) { } } + /** + * This notifies registered extensions of "no-restart" changed files. + * + * @param noRestartChangedFiles the Set of changed files + */ + public void notifyExtensions(Set noRestartChangedFiles) { + if (lastStartIndex == null) { + // we don't notify extensions if the application never started + return; + } + try { + scanLock.lock(); + for (Consumer> consumer : noRestartChangesConsumers) { + consumer.accept(noRestartChangedFiles); + } + } finally { + scanLock.unlock(); + } + + } + public boolean instrumentationEnabled() { if (instrumentationEnabled != null) { return instrumentationEnabled;