You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by Pascal Schumacher <pa...@gmx.net> on 2015/07/19 10:20:46 UTC
GROOVY-6974: Path.size() should return 0 instead of throwing
NoSuchFileException
Hello everybody,
what's your opinion on "GROOVY-6974: Path.size() should return 0 instead
of throwing NoSuchFileException"
https://issues.apache.org/jira/browse/GROOVY-6974 and the associated
pull request https://github.com/groovy/groovy-core/pull/496 ?
Imho we should close it as "won't fix", because it's a breaking change
and the current behavior makes more sense.
-Pascal
Re: GROOVY-6974: Path.size() should return 0 instead of throwing
NoSuchFileException
Posted by Pascal Schumacher <pa...@gmx.net>.
Hello everybody,
thanks for the feedback. :)
I just closed the issue as "Won't fix".
Cheers,
Pascal
Am 19.07.2015 um 11:06 schrieb balachandran@balachandran.org:
> On 2015-07-19 14:33, balachandran@balachandran.org wrote:
>> On 2015-07-19 13:50, Pascal Schumacher wrote:
>>>
>>> Imho we should close it as "won't fix", because it's a breaking change
>>> and the current behavior makes more sense.
>>>
>>
>> +1, we should return 0 if it is a zero byte file(i.e. in bash terms,
>> test -s <path> should return 0). If the file itself doesn't exist the
>
> Should have been test -s <path> should return 1. :) Thanks
Re: GROOVY-6974: Path.size() should return 0 instead of throwing
NoSuchFileException
Posted by ba...@balachandran.org.
On 2015-07-19 14:33, balachandran@balachandran.org wrote:
> On 2015-07-19 13:50, Pascal Schumacher wrote:
>>
>> Imho we should close it as "won't fix", because it's a breaking change
>> and the current behavior makes more sense.
>>
>
> +1, we should return 0 if it is a zero byte file(i.e. in bash terms,
> test -s <path> should return 0). If the file itself doesn't exist the
Should have been test -s <path> should return 1. :) Thanks
Re: GROOVY-6974: Path.size() should return 0 instead of throwing
NoSuchFileException
Posted by ba...@balachandran.org.
On 2015-07-19 13:50, Pascal Schumacher wrote:
>
> Imho we should close it as "won't fix", because it's a breaking change
> and the current behavior makes more sense.
>
+1, we should return 0 if it is a zero byte file(i.e. in bash terms,
test -s <path> should return 0). If the file itself doesn't exist the
current behaviour of throwing an exception is correct imho. Thanks
--
Thank you,
Balachandran S
Re: GROOVY-6974: Path.size() should return 0 instead of throwing
NoSuchFileException
Posted by Alexander Veit <gr...@nezwerg.de>.
> Imho we should close it as "won't fix", because it's a breaking change
> and the current behavior makes more sense.
+1.
I'd rather change the behaviour of File#size(), to throw a
NoSuchFileException if the file does not exist.
-Alex