On Fri, 22 Jan 2021 05:39:55 GMT, Stuart Marks <sma...@openjdk.org> wrote:
> Tighten up argument checking in constructor. src/java.base/share/classes/java/time/zone/ZoneRules.java line 263: > 261: // last rules > 262: Object[] temp = lastRules.toArray(); > 263: ZoneOffsetTransitionRule[] rulesArray = Arrays.copyOf(temp, > temp.length, ZoneOffsetTransitionRule[].class); LGTM. Could be replaced by: ZoneOffsetTransitionRule[] rulesArray = (ZoneOffsetTransitionRule[])lastRules.toArray(new ZoneOffsetTransitionRule[0]).clone(); if you wanted - but what you currently have is good for me. ------------- PR: https://git.openjdk.java.net/jdk/pull/2191