This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to avoid SegFault in natClass.cc


Martin Kahlert wrote:

> Can you tell me, what i have to do in order to get an uninitialized
> class for an instanceof test?

Try using the three-argument Class.forName() with a value of false for the
"initalize" parameter.

> I wildly mixed abstract classes with .class calls but i had no success.
>
> Is there a deeper reason at all, why the classloader should be allowed to return
> an uninitialized class? If not, the _Jv_InitClass would be superflous.

Probibly for performance reasons, say to be able to reflect on some random class
without actually running its <clinit> code.

regards

  [ bryce ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]