From 983ed55be2d69de57e52a106ea8809b52730ad12 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 5 Oct 2009 15:27:07 -0700 Subject: demos.readbuffer.Main: Allow setting a boolean --- src/demos/readbuffer/Main.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3