RFR: 8028816: Add value-type notice to Optional* classes

Stuart Marks stuart.marks at oracle.com
Wed Dec 4 02:06:31 UTC 2013

Overall looks fine.

If you're listing yourself as the reviewer, jcheck will object if you're also 
the changeset author. Instead of listing Brian Goetz in Contributed-by, make him 
the changeset author instead. Using MQ, do "hg qref -u briangoetz".

The gist of the paragraph being added to each class is,

     Use of identity-sensitive operations ... on instances of <class>
     may have unpredictable effects and should be avoided.

The phrase "unpredictable effects" strikes me oddly. This phrase is also used at 
the very end of the HTML doc. It makes it sound as if using an 
identity-sensitive operation might have side effects. That won't be the case, as 
far as I know. Using such an operation will indeed have "unpredictable results". 
That phrase is used at the beginning of the last paragraph of the HTML doc, and 
it makes much more sense to me than "unpredictable effects".


On 12/3/13 2:21 PM, Mike Duigou wrote:
> Hello all;
> There's been a discussion on the lambda spec experts list (http://mail.openjdk.java.net/pipermail/lambda-spec-experts/) about adding a notice to the Optional classes about implications of their likely future as values. This discussion recently completed so now there's a doc patch to review:
> http://cr.openjdk.java.net/~mduigou/JDK-8028816/0/webrev/
> I have already reviewed this but will hold off pushing it for a few hours in case someone notices a mistake that I did not.
> Mike

More information about the core-libs-dev mailing list