summaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo
diff options
context:
space:
mode:
authorjonmv <venstad@gmail.com>2022-10-25 17:20:54 +0200
committerjonmv <venstad@gmail.com>2022-10-25 17:20:54 +0200
commit1b2baba3fe08b423c7263f4aef1980e5f92054b5 (patch)
treec78a4ffe38c5ade8bb51a82a10ad318e6a3e7389 /container-core/src/main/java/com/yahoo
parent903d92dbed17256fcfc3afbe783da5637a2a4938 (diff)
Fall back to comparing exception message
Diffstat (limited to 'container-core/src/main/java/com/yahoo')
-rw-r--r--container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java b/container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java
index 69ee284a3df..cf3ff7d3d66 100644
--- a/container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java
+++ b/container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java
@@ -8,6 +8,7 @@ import com.yahoo.lang.PublicCloneable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashSet;
+import java.util.Objects;
import java.util.logging.Logger;
import java.util.LinkedList;
import java.util.ArrayList;
@@ -98,7 +99,8 @@ public class CloneHelper {
try {
return cloneByReflection(object);
} catch (IllegalArgumentException e) {
- if ( ! (e.getCause() instanceof ClassCastException))
+ if ( ! ( e.getCause() instanceof ClassCastException
+ || Objects.requireNonNullElse(e.getMessage(), "").startsWith("java.lang.ClassCastException")))
throw e;
// When changing bundles you might end up having cached the old method pointing to old bundle,