boolean b = true;  try {  Field f = declaringClass.getDeclaredField( fieldName );  f.setAccessible( true ); b = f.getBoolean(instance); } catch ( Exception e ) { VM.sysWrite( "exception in ObjectOutputStream.getFieldBool(): " + e ); }  return b;
boolean b = true; try {  Field f = declaringClass.getDeclaredField( fieldName ); f.setAccessible( true ); b = f.getBoolean(instance); } catch ( Exception e ) { VM.sysWrite( "exception in ObjectOutputStream.getFieldBool(): " + e );
  public static boolean getFieldBool (Object instance, Class declaringClass, String fieldName)    throws NoSuchFieldError {      boolean b = true;      try {        // following may throw NoSuchFieldError;        Field f = declaringClass.getDeclaredField( fieldName );        f.setAccessible( true );     // to allow access to private fields        b = f.getBoolean(instance);      }      catch ( Exception e ) {        VM.sysWrite( "exception in ObjectOutputStream.getFieldBool(): " + e );      }      return b;    }