From d30f18947a5c5e275ef7f17323ac837939cb0135 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sun, 12 May 2019 16:04:15 +1000 Subject: % More work on Advanced Mufflers. --- src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Java/gtPlusPlus/core/util/reflect') diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java index c86d6ccb83..224d842ba7 100644 --- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -318,9 +318,14 @@ public class ReflectionUtils { /** * Allows to change the state of an immutable instance. Huh?!? */ - public static void setFinalFieldValue(Class clazz, String fieldName, Object newValue) throws Exception { + public static void setFinalFieldValue(Class clazz, String fieldName, Object newValue) { Field nameField = getField(clazz, fieldName); - setFieldValue_Internal(clazz, nameField, newValue); + try { + setFieldValue_Internal(clazz, nameField, newValue); + } + catch (Throwable t) { + t.printStackTrace(); + } } @Deprecated -- cgit