<i18n dev> RFR: 8295239: Refactor java/util/Formatter/Basic script into a Java native test launcher [v6]
Brent Christian
bchristi at openjdk.org
Tue Oct 18 19:41:05 UTC 2022
On Tue, 18 Oct 2022 19:25:01 GMT, Justin Lu <duke at openjdk.org> wrote:
>> 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.
Oh, right. Carry on.
-------------
PR: https://git.openjdk.org/jdk/pull/10715
More information about the i18n-dev
mailing list