Repository: quarkusio/quarkus
Issue: Live reload instrumentation steps executed when instrumentation is disabled

### Describe the bug

Raised off the back of this Zulip thread:

https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Live.20reload.20with.20instrumentation.20disabled

When `quarkus.live-reload.instrumentation = false`, it seems that intrumentation logic still runs.

### Expected behavior

Instrumentation steps are not run on live reload if it's disabled.

### Actual behavior

Instrumentation steps seem to be run on live reload if when they should be disabled.

### How to Reproduce?

```
git clone https://github.com/apache/camel-quarkus-examples
cd timer-log
mvn quarkus:dev
```

Edit `src/main/java/org/acme/timer/TimerRoute.java` and change the log message to trigger a live reload. There's an exception due to a bug / bad implementation of the Camel `HotReplacementSetup`, but the message logged with the stack trace says `Failed to replace classes via instrumentation`. Which is unexpected if instrumentation is disabled.

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

_No response_

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

2.2.3.Final

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
core/deployment/src/main/java/io/quarkus/deployment/dev/RuntimeUpdatesProcessor.java

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 b6a1a710246..dfb792b19ef 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());