Untimed resolve ?

Tom Tromey tromey@redhat.com
Mon Dec 30 14:49:00 GMT 2002


>>>>> "Martin" == Martin Vechev <martin@fadata.bg> writes:

Martin> 		System.out.println("loaded.");
Martin> 		new X();
Martin> At the end of loading the X class it also resolves it, which
Martin> seems incorrect. Shouldn't it rich the actual 'new' bytecode
Martin> and then throw NoClassDefFoundError.
I don't think this is a requirement.
See JVMS 1st Ed, section 2.16.1:
 Linking involves verification, preparation, and (optionally)
 resolution.
Later in that section it discusses the possibility of lazily-resolving
and eagerly-resolving runtimes.
At this point I don't think there is a bug here, just a difference. I
believe code relying on one particular implementation here is not
well-defined.
Tom


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /