From f89bf8e4a355da770f7325209725f2bece6415f8 Mon Sep 17 00:00:00 2001 From: Martin Kouba Date: Fri, 26 Mar 2021 14:16:51 +0100 Subject: [PATCH] Dev mode - fix class comparison logic for instrumentation - always compare the number of methods - resolves #16047 --- .../io/quarkus/deployment/dev/ClassComparisonUtil.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/ClassComparisonUtil.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/ClassComparisonUtil.java index afb543f8dc541..81850cefc40b5 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/ClassComparisonUtil.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/ClassComparisonUtil.java @@ -52,9 +52,14 @@ static boolean isSameStructure(ClassInfo clazz, ClassInfo old) { return false; } } - for (MethodInfo method : clazz.methods()) { + List methods = clazz.methods(); + List oldMethods = old.methods(); + if (methods.size() != oldMethods.size()) { + return false; + } + for (MethodInfo method : methods) { MethodInfo om = null; - for (MethodInfo i : old.methods()) { + for (MethodInfo i : oldMethods) { if (!i.name().equals(method.name())) { continue; }