aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-08-07 05:02:29 +0000
committerAlkalus <draknyte1@hotmail.com>2017-08-07 05:02:29 +0000
commite733ec9759368981c39f5e494551b17ce020de30 (patch)
tree791452aae629b709a0a398bbb4c553e1cfbcf933 /src/Java/gtPlusPlus/core
parent2c3cf059795ac4f601f8647dac3fb0b2ef1ddd25 (diff)
downloadGT5-Unofficial-e733ec9759368981c39f5e494551b17ce020de30.tar.gz
GT5-Unofficial-e733ec9759368981c39f5e494551b17ce020de30.tar.bz2
GT5-Unofficial-e733ec9759368981c39f5e494551b17ce020de30.zip
$ Fixed byte setting method in ReflectionUtils.java
Diffstat (limited to 'src/Java/gtPlusPlus/core')
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java10
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 );
}