<i18n dev> RFR: 8295239: Refactor java/util/Formatter/Basic script into a Java native test launcher [v6]

Justin Lu duke at openjdk.org
Tue Oct 18 19:28:52 UTC 2022


On Tue, 18 Oct 2022 19:20:58 GMT, Brent Christian <bchristi at openjdk.org> wrote:

>> Justin Lu has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Remove testing change
>>  - Fix formatter in Basic
>
> test/jdk/java/util/Formatter/Basic.java line 90:
> 
>> 88: 
>> 89:         if (fail != 0) {
>> 90:             throw new RuntimeException(String.format("%d tests: %d failure(s)" +
> 
> You might consider including `", first"` with the rest of the message string, instead of concatenating it. That line might end up slightly long, but it may be worth it.
> 
> Also, use `%s` for`first`, as it's a `Throwable` ;)
> (You could also perhaps change `first` -> `first.toString()` in the final argument to format, to clarify.)

Good point, will reassign it to one line.

"Also, use %s forfirst, as it's a Throwable", 
I believe I am assigning %d to pass+fail and fail. I pass first as a Throwable to the runtime exception constructor.

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

PR: https://git.openjdk.org/jdk/pull/10715


More information about the i18n-dev mailing list