RFR 8048840: File.createTempFile has uninformative failure message
Jeremy Manson
jeremymanson at google.com
Tue Jul 1 23:16:42 UTC 2014
Should I add a message about a three character minimum?
Jeremy
On Tue, Jul 1, 2014 at 1:34 AM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:
> On 01/07/2014 02:21, Jeremy Manson wrote:
>
>> Oops - forgot to run jtreg. Make that:
>>
>> diff --git a/src/share/classes/java/io/File.java
>> b/src/share/classes/java/io/File.java
>> --- a/src/share/classes/java/io/File.java
>> +++ b/src/share/classes/java/io/File.java
>> @@ -1998,7 +1998,8 @@
>> throws IOException
>> {
>> if (prefix.length() < 3)
>> - throw new IllegalArgumentException("Prefix string too
>> short");
>> + throw new IllegalArgumentException("Prefix string too
>> short: "
>> +
>> + prefix);
>>
> I assume you meant to "+ prefix" here, in which case the change seems okay
> to me. The update to the NulFile test seems okay too.
>
> As a side point then I think the need for a prefix is somewhat legacy now
> and this API could be re-visited some day.
>
> -Alan.
>
More information about the core-libs-dev
mailing list