From f68cea0214087e4b5adbe7d9c70297bb47207c88 Mon Sep 17 00:00:00 2001 From: Stuart Douglas Date: Wed, 22 Sep 2021 09:20:45 +1000 Subject: [PATCH] Skip instrumentation check if disabled Fixes #20301 --- .../io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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());