From e3159888b80a1b0bc9e508aa3bc8a7989cc1b441 Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Wed, 4 Sep 2019 13:20:23 +0200 Subject: [PATCH] configinvocationhandler: Set config to default if string to object fails and it's a default method --- .../net/runelite/client/config/ConfigInvocationHandler.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/config/ConfigInvocationHandler.java b/runelite-client/src/main/java/net/runelite/client/config/ConfigInvocationHandler.java index 330551c37f..8a079c0336 100644 --- a/runelite-client/src/main/java/net/runelite/client/config/ConfigInvocationHandler.java +++ b/runelite-client/src/main/java/net/runelite/client/config/ConfigInvocationHandler.java @@ -115,7 +115,11 @@ class ConfigInvocationHandler implements InvocationHandler log.warn("Unable to unmarshal {}.{} ", groupValue, itemKeyName, e); if (method.isDefault()) { - return callDefaultMethod(proxy, method, null); + Object defaultValue = callDefaultMethod(proxy, method, null); + + manager.setConfiguration(groupValue, itemKeyName, defaultValue); + + return defaultValue; } return null; }