RFR: JDK-8134373: explore potential uses of convenience factories within the JDK

Pavel Rappo pavel.rappo at oracle.com
Thu Sep 15 11:32:39 UTC 2016


Daniel, if you're referring to

  388     List<ZoneOffset> getValidOffsets() {
  389         if (isGap()) {
> 390             return List.of();
  391         }
  392         return List.of(getOffsetBefore(), getOffsetAfter());
  393     }

I think in this particular case, List.of is more consistent.

> On 15 Sep 2016, at 12:06, Daniel Fuchs <daniel.fuchs at oracle.com> wrote:
> 
> I find emptyList() more expressive (+ it always returns
> the same instance).



More information about the core-libs-dev mailing list