RFR 8080418 Add Optional.or()

Stefan Zobel spliterator at gmail.com
Tue Sep 29 09:16:20 UTC 2015


Looks good. One more nitpicking. "ifPresent() " in OptionalDouble/Int/Long
still uses the old wording


 * If a value is present, perform the given action with the value,
 * otherwise do nothing.


whereas in Optional you have the better


 * If a value is present, performS the given action with the value,
 * otherwise doES nothing.


Stefan


2015-09-29 9:39 GMT+02:00 Paul Sandoz <paul.sandoz at oracle.com>:

>
> > On 28 Sep 2015, at 19:45, Stefan Zobel <spliterator at gmail.com> wrote:
> >
> > Hi Paul,
> >
> > is it a good idea to add the "{@inheritDoc}" to the toString() Javadoc of
> > Optional (and to retain it in OptionalDouble/Int/Long)?
> >
> > As Stuart Marks has observed in the Double/Int/LongSummaryStatistics case
> > the inherited Object.toString() doc is "mostly irrelevant"
> > (see
> >
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2015-June/034282.html
> )
> >
> > So the {@inheritDoc} got removed from Double/Int/LongSummaryStatistics in
> > JDK-8080450. I feel this would also be better for Optional.
> >
>
> Done.
>
>
> > On 28 Sep 2015, at 20:00, Stefan Zobel <spliterator at gmail.com> wrote:
> >
> > In the OptionalDouble/Int/Long Javadoc of method "empty()"
> >
> >
> > * {@code Optional.empty()}. There is no guarantee that it is a singleton.
> >
> >
> > should be
> >
> >
> > * {@code OptionalDouble.empty()}.  There is no guarantee that it is a
> > singleton.
> >
> > and so on.
>
> Done.
>
> Thanks,
> Paul.
>



More information about the core-libs-dev mailing list