On Sat, 25 Feb 2023 00:07:45 GMT, Madjosz <[email protected]> wrote:

>> Fixes JDK-8302983 (and duplicate JDK-8302898)
>
> Madjosz has refreshed the contents of this pull request, and previous commits 
> have been removed. The incremental views will show differences compared to 
> the previous content of the PR. The pull request contains one new commit 
> since the last revision:
> 
>   apply review comments

src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java line 319:

> 317:             ZoneRulesProvider old = ZONES.putIfAbsent(zoneId, provider);
> 318:             if (old != null) {
> 319:                 if(!old.equals(provider)) {

Suggestion:

                if (!old.equals(provider)) {

src/java.base/share/classes/java/time/zone/ZoneRulesProvider.java line 322:

> 320:                     // restore old state
> 321:                     ZONES.put(zoneId, old);
> 322:                     provider.provideZoneIds().stream()

Can we drop `.stream()` call and just call `.forEach` directly?

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

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

Reply via email to