You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2023/03/02 10:07:01 UTC

Re: Improvement ideas for Ant 1.10.13

On 2023-02-27, KUNES Michael wrote:

> We are using tar as part of our software to prepare data sent to
> devices that use tar or tgz format for receiving e.g.: CSV,
> XML,... files

Then I'd strongly recommend you look into replacing it with Commons
Commpress at one point in time. The libary does support some POSIX
tricks Ant's codebase doesn't support and they've added a TarFile class
for random access (much like ZipFile) that would be out of scope for
Ant.

Still.

> 1) I agree that this NPE might not occur under normal
> circumstances. Therefore, I am quite sure that the finding is due to
> our static code analysis tool remarks and just some
> beautification. But danger to introduce problems is quite low.

Do you want to prepare a formal bug report and patch - or a github pull
request? Or should I just go ahead and add a null check myself? Either
way is fine with me.

> 2) we did this fix some 10-15 years ago since we had some problem with
> one of our embedded devices that is not very fault-tolerant. But to be
> true, that's all I remember.  Big sorry!

No problem at all. It would be good if you could give the updated Ant
codebase with Arrays.fill a try to verify this really fixes the problem
for you as well.

Many thanks

     Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Improvement ideas for Ant 1.10.13

Posted by Stefan Bodewig <bo...@apache.org>.
On 2023-03-02, KUNES Michael wrote:

> Thank you for the hint! We will evaluate that alternative soon.

> Problem for such an evaluation is: we've a huge amount of different HW types (all embedded) with SW from brand new to VERY old (10y+). Therefore, such replacements always are dangerous and need lot of tests. In these cases: "never change a running SW" really has a meaning...

Ah, I see. In the case of "really old HW" the required minimum Java
version might become an issue. For Commons Compress and Ant 1.10.x that
would be Java 8 and might be too ambituous for your usage. (feels a bit
odd to write that in times where major frameworks move to Java 17 as
baseline, but I've worked on very conservative long running projects
myself :-).

The second issue you reported should have been fixed with Ant 1.8.0
which is compatible with Java 1.4 (like any other 1.8.x release).

The 1.9.x branch which is still maintained by us for serious bug fixes
requires Java 5 with 1.9.16 being the latest release.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


RE: Improvement ideas for Ant 1.10.13

Posted by KUNES Michael <Mi...@frequentis.com.INVALID>.
Hi

Thank you for the hint! We will evaluate that alternative soon. 

Problem for such an evaluation is: we've a huge amount of different HW types (all embedded) with SW from brand new to VERY old (10y+). Therefore, such replacements always are dangerous and need lot of tests. In these cases: "never change a running SW" really has a meaning... 

Br 
 Michael 

-----Original Message-----
From: Stefan Bodewig <bo...@apache.org> 
Sent: Donnerstag, 2. März 2023 11:07
To: dev@ant.apache.org
Subject: Re: Improvement ideas for Ant 1.10.13

*EXTERNAL source*


On 2023-02-27, KUNES Michael wrote:

> We are using tar as part of our software to prepare data sent to 
> devices that use tar or tgz format for receiving e.g.: CSV, XML,... 
> files

Then I'd strongly recommend you look into replacing it with Commons Commpress at one point in time. The libary does support some POSIX tricks Ant's codebase doesn't support and they've added a TarFile class for random access (much like ZipFile) that would be out of scope for Ant.

Still.

> 1) I agree that this NPE might not occur under normal circumstances. 
> Therefore, I am quite sure that the finding is due to our static code 
> analysis tool remarks and just some beautification. But danger to 
> introduce problems is quite low.

Do you want to prepare a formal bug report and patch - or a github pull request? Or should I just go ahead and add a null check myself? Either way is fine with me.

> 2) we did this fix some 10-15 years ago since we had some problem with 
> one of our embedded devices that is not very fault-tolerant. But to be 
> true, that's all I remember.  Big sorry!

No problem at all. It would be good if you could give the updated Ant codebase with Arrays.fill a try to verify this really fixes the problem for you as well.

Many thanks

     Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Re: Improvement ideas for Ant 1.10.13

Posted by Stefan Bodewig <bo...@apache.org>.
On 2023-03-02, Stefan Bodewig wrote:

> On 2023-02-27, KUNES Michael wrote:

>> 1) I agree that this NPE might not occur under normal
>> circumstances. Therefore, I am quite sure that the finding is due to
>> our static code analysis tool remarks and just some
>> beautification. But danger to introduce problems is quite low.

> Do you want to prepare a formal bug report and patch - or a github pull
> request? Or should I just go ahead and add a null check myself? Either
> way is fine with me.

I just realized it would be good to scan for other places where we don't
check File#list's result properly

https://github.com/apache/ant/commit/38b7e94c17c304aa3b7e13fc7d9ccdb47e4a4f89

This also addresses the TarEntry case.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org