RFR 8066291: ZoneIdPrinterParser can be optimized

Roger Riggs Roger.Riggs at Oracle.com
Thu May 5 14:23:08 UTC 2016


Hi Bhanu,

Adding a trivial method to the public API used only for an optimization 
is not a good fix for this issue.

A better fix was suggested to add a non-copying read-only version of

ZoneRulesProvider.getAvailableZoneIds()

Please revise the fix to instead implement and use:

   /**
      * Gets a readonly set of available zone IDs.
      * <p>
      * These IDs are the string form of a {@link ZoneId}.
      *
      * @return a unmodifiable copy of the set of zone IDs, not null
      */
     public static Set<String> getReadOnlyAvailableZoneIds() {
         return Collections.unmodifiableSet(ZONES.keySet());
     }

Roger



On 5/5/2016 5:10 AM, Bhanu Gopularam wrote:
>
> Hi all,
>
> Please review fix following issue
>
> Bug Id : https://bugs.openjdk.java.net/browse/JDK-8066291
>
> Solution: provided new method to get size of available zone ids
>
> webrev : 
> http://cr.openjdk.java.net/~bgopularam/bhanu/JDK-8066291/webrev.00 
> <http://cr.openjdk.java.net/%7Ebgopularam/bhanu/JDK-8066291/webrev.00>
>
> Thanks,
>
> Bhanu
>




More information about the core-libs-dev mailing list