diff options
Diffstat (limited to 'container-core')
-rw-r--r-- | container-core/src/main/java/com/yahoo/processing/request/CloneHelper.java | 5 |
1 files changed, 4 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 64a356fbf2a..69ee284a3df 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 @@ -97,7 +97,10 @@ public class CloneHelper { return ((HashSet<?>) object).clone(); try { return cloneByReflection(object); - } catch (ClassCastException e) { + } catch (IllegalArgumentException e) { + if ( ! (e.getCause() instanceof ClassCastException)) + throw e; + // When changing bundles you might end up having cached the old method pointing to old bundle, // That might then lead to a class cast exception when invoking the wrong clone method. // So we will give dropping the cache a try, and retry the clone. |