aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util/reflect
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-05-12 16:04:15 +1000
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-05-12 16:04:15 +1000
commitd30f18947a5c5e275ef7f17323ac837939cb0135 (patch)
treea46120eaace0b136e056e55d53add6129d8e877b /src/Java/gtPlusPlus/core/util/reflect
parent3615baf8ffb7a2efc44d4770da97ce1337f7801e (diff)
downloadGT5-Unofficial-d30f18947a5c5e275ef7f17323ac837939cb0135.tar.gz
GT5-Unofficial-d30f18947a5c5e275ef7f17323ac837939cb0135.tar.bz2
GT5-Unofficial-d30f18947a5c5e275ef7f17323ac837939cb0135.zip
% More work on Advanced Mufflers.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/reflect')
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java9
1 files changed, 7 insertions, 2 deletions
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