You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Nico Seessle <ni...@apache.org> on 2003/02/26 01:35:30 UTC
[PATCH] Jar throwing NPE with empty fileset
Hi all,
after a long time a small contribution again :-)
Unfortunately I was unable to create a test (at least one integrated
with the Ant build) for this and got some unexpected errors while trying
to do so.
So I would like someone to have a look at it. I don't think it should
affect something else, but it seems I'm not really up-to-date with Ant :-(
The problem:
If you update a jar file and one of the filesets that are passed to the
task are empty it throws a NPE.
Attached files:
- jar.patch.txt - the patch to Jar.java
- jar.test.patch - How I tried to integrate a test for that case - maybe
someone can explain what I did wrong?
- testcase.jar - a simple testcase, throws if NPE if Ant is run for the
second time.
Nico
Re: [PATCH] Jar throwing NPE with empty fileset
Posted by Stefan Bodewig <bo...@apache.org>.
On Fri, 28 Feb 2003, Nico Seessle <ni...@apache.org> wrote:
> Have you run all tests, or just the JarTest?
All tests - as does Gump.
Stefan
Re: [PATCH] Jar throwing NPE with empty fileset
Posted by Nico Seessle <ni...@apache.org>.
Stefan Bodewig wrote:
>>Unfortunately I was unable to create a test (at least one integrated
>>with the Ant build) for this and got some unexpected errors while
>>trying to do so.
>
> What kind of errors? If I apply your test patch, I get the NPE as you
> describe and if I apply your task patch, it goes away.
>
I got the same error even with the patch applied. So I thought I may
have broken something else, or...
Have you run all tests, or just the JarTest?
Nico
Re: [PATCH] Jar throwing NPE with empty fileset
Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 26 Feb 2003, Nico Seessle <ni...@apache.org> wrote:
> after a long time a small contribution again :-)
Great. You couldn't have chosen a better time.
> Unfortunately I was unable to create a test (at least one integrated
> with the Ant build) for this and got some unexpected errors while
> trying to do so.
What kind of errors? If I apply your test patch, I get the NPE as you
describe and if I apply your task patch, it goes away.
> - testcase.jar - a simple testcase, throws if NPE if Ant is run for
> the second time.
I didn't need that one.
Stefan