<i18n dev> RFR: 8347613: Remove leftover doPrivileged call in Currency test: CheckDataVersion.java [v2]

Justin Lu jlu at openjdk.org
Mon Jan 13 23:12:19 UTC 2025


On Mon, 13 Jan 2025 22:44:39 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   reflect review
>
> test/jdk/java/util/Currency/CheckDataVersion.java line 79:
> 
>> 77:             } catch (IOException ioe) {
>> 78:                 throw new RuntimeException(
>> 79:                         "CheckDataVersion was not set up properly: " + ioe);
> 
> IOException could happen not by the test setup failure, but for the case the `currency.data` file in the JDK is missing or corrupt, so if you want to give extra message to the exception, needs some rewording. Also, I prefer `ioe` should be the `cause` and not to be consumed in the message.

Ah, I meant that if _currency.data_ was missing/corrupted, it was a set up failure because we can not test the contents properly. Although, I suppose that just means the test fails, not fails to setup properly. Updated the message to be more clear, and also used the 2 arg ctor to retain the IOE as you suggested.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23087#discussion_r1913917220


More information about the i18n-dev mailing list