Patch: FYI: loading a class twice
Jeff Sturm
jsturm@one-point.com
Fri Sep 7 13:42:00 GMT 2001
On 6 Sep 2001 minyard@acm.org wrote:
> But I still don't think it's a good idea to silently use the first
> version of a class in the load order.
Let me try to be clear. I think an attempt to load two identical classes
(equal pointers) can be safely ignored.
However an attempt to load two different classes with the same name can
lead to problems. In this case I would consider it acceptable to print a
message and abort.
The first scenario is much more likely on ELF targets. Even symbols in
the .jcr section of an object will be resolved by searching all libraries
in order. However that behavior is certainly platform dependent.
If I understand the patch correctly, we only check the former, not the
latter. The latter is more dangerous IMO.
Jeff
More information about the Java-patches
mailing list