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 b6a1a71024664..dfb792b19efb0 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 @@ -436,7 +436,7 @@ public boolean doScan(boolean userInitiated, boolean forceRestart) { changedFilesForRestart.addAll(changedClassResults.getDeletedClasses()); if (ClassChangeAgent.getInstrumentation() != null && lastStartIndex != null && !configFileRestartNeeded - && devModeType != DevModeType.REMOTE_LOCAL_SIDE) { + && devModeType != DevModeType.REMOTE_LOCAL_SIDE && instrumentationEnabled()) { //attempt to do an instrumentation based reload //if only code has changed and not the class structure, then we can do a reload //using the JDK instrumentation API (assuming we were started with the javaagent) @@ -455,8 +455,7 @@ public boolean doScan(boolean userInitiated, boolean forceRestart) { classTransformers.apply(name, bytes)); } Index current = indexer.complete(); - boolean ok = instrumentationEnabled() - && !disableInstrumentationForIndexPredicate.test(current); + boolean ok = !disableInstrumentationForIndexPredicate.test(current); if (ok) { for (ClassInfo clazz : current.getKnownClasses()) { ClassInfo old = lastStartIndex.getClassByName(clazz.name());