https://bz.apache.org/bugzilla/show_bug.cgi?id=65799
Bug ID: 65799 Summary: propertyset broken in 1.10.9 with antxtras Product: Ant Version: 1.10.9 Hardware: PC OS: Mac OS X 10.1 Status: NEW Severity: normal Priority: P2 Component: Core tasks Assignee: notifications@ant.apache.org Reporter: t...@apache.org Target Milestone: --- We have a build that invokes sub-project level builds using the <ant> task, passing a nested <propertyset> with <propertyrefs> in it. This build has been broken since 1.10.9 (it's worked on many versions of Ant starting 15ish years ago, up to and including 1.10.8): specifically no properties are located by the <propertyset> (the behaviour is the same with <echoproperties>). git bisect isolates the patch for Bug 50179 as the change that broke resolution of properties from projects. Specifically the change to PropertySet in [1], which changed from getting properties from the project to using a PropertyHelper to enumerate property names seems to be the cause. After some rather confusing debugging, it appears that antxtras, which is used extensively in this build, decorates the PropertyHelper instances with a org.jwaresoftware.antxtras.funcuts.NestedPropertyAnalyzer instance. It does this slightly clumsily, by overriding the methods (in particular getPropertiess). The net effect is that when PropertyHelper.getPropertyNames() accesses the properties member in [2], it is accessing an unused field in the decorator, and not the set of properties actually managed by the overall PropertyHelper. This is obviously a case of extension by a "not designed for extension" mechanism, but given the vintage of ant and antxtras (in the latter case, new releases are vanishingly unlikely), a fix to avoid breaking these builds would be appreciated by anyone affected (this will likely dead-end the software built with this particular system on 1.10.8 permanently, since a rewrite to remove antxtras wouldn't be worth it). The fix is simply to replace the properties field access with getProperties() in getPropertyNames(). [1]: https://github.com/apache/ant/pull/135/files#diff-f2296fac4f7ce55f456d437ae5e08dd985e5881ce83e1e01f29b0f93c62c9294L337 [2]: https://github.com/apache/ant/blob/2c5194ed03840a33d41c87fbab3e2f4f2d6b6429/src/main/org/apache/tools/ant/PropertyHelper.java#L863 -- You are receiving this mail because: You are the assignee for the bug.