[PATCH] java.awt

Michael Koch konqueror@gmx.de
Sat Feb 15 09:22:00 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Freitag, 14. Februar 2003 22:55 schrieb Tom Tromey:
> Michael> When using the following I need to catch
> IllegalAccessException: Michael> return
> (representationClass.newInstance() instanceof ByteBuffer);
>
> Sorry, I didn't read closely enough.  instanceof won't work.
> But how about
>
>     java.nio.ByteBuffer.class.isAssignableFrom(representationClass)
>
> I think that's more idiomatic than using Class.forName.

Okay, commited with this version. ;-)


Michael
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+TgbcWSOgCCdjSDsRAlkqAJ0XoiXCJfMQe+LabHAERO2HW39dDQCeIlWp
eNKRdaGzd5mSnOGFZ+CEsu8=
=ZuUr
-----END PGP SIGNATURE-----



More information about the Java-patches mailing list