From cacd694f88f673a0d6e753c52993df8e46721922 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Sat, 2 Oct 2021 00:34:46 +0200 Subject: Revert "Throw instead of setting config if we get bad config [run-systemtest]" --- .../yahoo/config/subscription/impl/JRTConfigSubscription.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'config/src/main/java/com/yahoo') diff --git a/config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigSubscription.java b/config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigSubscription.java index f50ed694115..e83fc7aefc5 100644 --- a/config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigSubscription.java +++ b/config/src/main/java/com/yahoo/config/subscription/impl/JRTConfigSubscription.java @@ -105,11 +105,16 @@ public class JRTConfigSubscription extends ConfigSubsc } protected void setNewConfig(JRTClientConfigRequest jrtReq) { + Exception badConfigE = null; + T configInstance = null; try { - T configInstance = toConfigInstance(jrtReq); - setConfig(jrtReq.getNewGeneration(), jrtReq.responseIsApplyOnRestart(), configInstance, jrtReq.getNewChecksums()); + configInstance = toConfigInstance(jrtReq); } catch (IllegalArgumentException e) { - throw new IllegalArgumentException("Bad config in response", e); + badConfigE = e; + } + setConfig(jrtReq.getNewGeneration(), jrtReq.responseIsApplyOnRestart(), configInstance, jrtReq.getNewChecksums()); + if (badConfigE != null) { + throw new IllegalArgumentException("Bad config from jrt", badConfigE); } } -- cgit v1.2.3