diff options
author | Sven Gothel <[email protected]> | 2009-10-05 15:27:07 -0700 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-10-05 15:27:07 -0700 |
commit | 983ed55be2d69de57e52a106ea8809b52730ad12 (patch) | |
tree | ffd5cd8099f26d9d5f784502e8e72c0464de4165 /src/demos/readbuffer | |
parent | b737b3b5efa42136f5b5348e09e2e592b4fc9863 (diff) |
demos.readbuffer.Main: Allow setting a boolean
Diffstat (limited to 'src/demos/readbuffer')
-rwxr-xr-x | src/demos/readbuffer/Main.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/demos/readbuffer/Main.java b/src/demos/readbuffer/Main.java index cbe9cfd..ea24efa 100755 --- a/src/demos/readbuffer/Main.java +++ b/src/demos/readbuffer/Main.java @@ -195,7 +195,7 @@ public class Main implements WindowListener, MouseListener, SurfaceUpdatedListen public static boolean setField(Object instance, String fieldName, Object value) { try { Field f = instance.getClass().getField(fieldName); - if(f.getType().isInstance(value)) { + if(value instanceof Boolean || f.getType().isInstance(value)) { f.set(instance, value); return true; } else { |