On Fri, 28 Oct 2022 21:51:03 GMT, Justin Lu <[email protected]> wrote:
> Issue: Duplication of methods between Basic*.java test classes, due to auto
> generation by genBasic.sh
>
> Fix: Reorganize parts of Basic-X.java.template into base class in Basic.java.
> Toggled -nel flag for generation script (genBasic.sh) to remove excessive
> white space. Moved a previous direct change to BasicDateTime.java into the
> template.
>
> Note: Main files to look at are Basic.java and Basic-X.java.template, as the
> rest are a reflection of the auto generation
test/jdk/java/util/Formatter/Basic-X.java.template line 1612:
> 1610: list.remove("America/WhiteHorse");
> 1611: list.remove("Canada/Yukon");
> 1612: ids = list.toArray(new String[list.size()]);
It's not your change but I just noticed this. Since we specifically test only
for `CLDR` provider (as in `BasicTestLauncher`), I wonder we could remove this
portion. Even if we do need this piece, it could be simplified as:
ids = Arrays.stream(ids).filter(tz -> !tz.equals(...)).toArray(String[]::new)
-------------
PR: https://git.openjdk.org/jdk/pull/10910