diff options
Diffstat (limited to 'src/Java/gtPlusPlus')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java index fb8c37db4d..dd3adac3bc 100644 --- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -145,13 +145,7 @@ public class ReflectionUtils { } - - - - /** - * Allows to change the state of an immutable instance. Huh?!? - */ - public static void setByte(Class clazz, String fieldName, Byte newValue) throws Exception { + public static void setByte(Class clazz, String fieldName, byte newValue) throws Exception { /*Field nameField = getField(clazz, fieldName); nameField.setAccessible(true); int modifiers = nameField.getModifiers(); @@ -163,7 +157,7 @@ public class ReflectionUtils { final Field fieldA = clazz.getDeclaredField(fieldName); fieldA.setAccessible( true ); - fieldA.setInt(clazz, newValue ); + fieldA.setByte(clazz, newValue ); } |