ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Mapped resources NPEs - Potential fix causes a failure in one specific test
Date Fri, 09 Feb 2018 17:06:11 GMT
On 2018-02-09, Jaikiran Pai wrote:

> That test was introduced long back as part of [5] to test another
> similar NPE. I think with the change I now have, it no longer reaches
> this place in the code where the Copy task would end up getting a null
> from a mapper, because various other utility classes already handle
> this contract and skip that resource.

I completely agree with your fix.

What this specific test failure shows, though, is that we now no longer
are able to distinguish between a resource that we could copy but can't
because it doesn't provide a name and the case of "all resources have
been stripped out by mappers as "I don't know how to handle it".

Unfortunately I don't see any way to distinguish between "all resources
have been excluded by mappers" and "all resources have been up to date"
and certainly not how to figure out a resource didn't have a name when
we want to allow such resources if followed by a merge mapper.

I'm fine with removing the test but would want us to document the change
in behavior. Where a resource with a null name used to cause a build
exception it will now be silently ignored by copy.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message