From 3b0e11ecef7a1df38844251bde55c8eb4315ed00 Mon Sep 17 00:00:00 2001 From: Lucas Date: Fri, 31 May 2019 04:33:40 +0200 Subject: [PATCH] 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 e1813a6fac..89d0ca89e8 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 @@ -88,7 +88,11 @@ class ConfigInvocationHandler implements InvocationHandler log.warn("Unable to unmarshal {}.{} ", group.value(), item.keyName(), e); if (method.isDefault()) { - return callDefaultMethod(proxy, method, null); + Object defaultValue = callDefaultMethod(proxy, method, null); + + manager.setConfiguration(group.value(), item.keyName(), defaultValue); + + return defaultValue; } return null; }