ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 51579] AntClassLoader$ResourceEnumeration does not honor the API contract for java.util.Enumeration
Date Fri, 29 Jul 2011 13:32:13 GMT

--- Comment #3 from Jeffrey E. Care <> 2011-07-29 13:32:13 UTC ---
(In reply to comment #2)
> The very initial version of ResourceEnumeration committed more than ten years
> ago already has this problem,
> and I'm not sure we should fix it now, even if you are correct (you are).

I'm of two minds on this:

...on the one hand Ant's code is clearly breaking the API contract, so IMO
anyone relying on the current behavior (i.e. returning null instead of throwing
an exception) is wrong;

...on the other hand our code that exposed this is relying on a design pattern
that I don't think is sound (enumeration traversal inside an infinite loop,
relying on the exception being thrown to exit the loop).

I've already patched our code to use enumerations properly so I'm okay with not
fixing the Ant code if there is a strong feeling to leave it as is but the
pendant in me thinks that the Ant code should be fixed as well.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message