Eager vs Lazy resolution of classes
Bryce McKinlay
mckinlay@redhat.com
Wed Jul 21 14:01:00 GMT 2004
Chris Gray wrote:
>It became clear that Java developers think it normal that a class which contains
>references to all sorts of non-existent classes should run just fine provided
>those code paths are never traversed. So my guess is that this one will come
>to bite you sooner rather than later.
>
>
This is a different issue. There is no problem with unresolvable
references on code paths which are never actually traversed, because the
spec requires that such errors are not thrown until active use. The
BC-ABI was designed for this from the outset.
The issue here is whether it is ok to do the resolution itself eagerly,
deferring errors until active use. That is, whether new classes can
appear on the classpath at runtime, after the class that uses them has
already been linked, and expect to be resolved successfully.
Regards
Bryce
More information about the Java
mailing list