This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: bug in invoke + reflection patch/improvement
- Subject: Re: bug in invoke + reflection patch/improvement
- From: "Daniel Bonniot" <bonniot at cma dot ensmp dot fr>
- Date: Fri, 25 Aug 2000 14:53:14 +0200
- Cc: <kawa at sourceware dot cygnus dot com>
- Organization: d.bonniot@mail.dotcom.fr
- References: <13202.967019680@www7.gmx.net>
A bug in your ReflectionHelper class:
> ================
> ReflectionHelper:
> ================
>
> /** True if the JDK implements Java 2 or above. If this is
> <code>true</true>, then non-public classes and members can be accessed.
> */
> public static boolean isJava2;
>
> static {
> try {
> Class.forName("java.lang.reflect.AccessibleObject");
> } catch (ClassNotFoundException ex) {
> isJava2 = false;
> }
> isJava2 = true;
> }
It seems to me that isJava2 = true is executed in any case. This statement
should go just after the forName call.
BTW, the javadoc comment should have </code> and not </true> ! :-)