<p>Has the optional classes been verified to serialize/deserialize correctly? I noticed it tries to use the null object pattern with the use of EMPTY private instance. When I have implemented the NULL pattern I have used a private subclass of the object as opposed to an instance variable to insure it unmarshalls correctly with a simple override of the default desearization to insure this.</p>

<p>I also wonder why a marker interface wasn't used or something more substantial at least for methods like isPresent(). Also why does the static factory initialization parameters use primatives as opposed to objects? If objects were used then there would be the oppertunity to use a abstract base class, which has the potential to move the use of isPresent() strictly  into the base class.</p>

<p>Finally, are these utilities critical to some other part JDK 8 that they were pushed out now as opposed to JDK 9?</p>
<div class="gmail_quote">On Mar 19, 2013 7:18 PM,  <<a href="mailto:mike.duigou@oracle.com">mike.duigou@oracle.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Changeset: 2241a2d34085<br>
Author:    mduigou<br>
Date:      2013-03-19 16:05 -0700<br>
URL:       <a href="http://hg.openjdk.java.net/jdk8/tl/jdk/rev/2241a2d34085" target="_blank">http://hg.openjdk.java.net/jdk8/tl/jdk/rev/2241a2d34085</a><br>
<br>
8001642: Add Optional<T>, OptionalDouble, OptionalInt, OptionalLong<br>
Reviewed-by: mduigou, darcy, alanb, jjb<br>
Contributed-by: Brian Goetz <<a href="mailto:brian.goetz@oracle.com">brian.goetz@oracle.com</a>><br>
<br>
+ src/share/classes/java/util/Optional.java<br>
+ src/share/classes/java/util/OptionalDouble.java<br>
+ src/share/classes/java/util/OptionalInt.java<br>
+ src/share/classes/java/util/OptionalLong.java<br>
+ test/java/util/Optional/Basic.java<br>
+ test/java/util/Optional/BasicDouble.java<br>
+ test/java/util/Optional/BasicInt.java<br>
+ test/java/util/Optional/BasicLong.java<br>
<br>
</blockquote></div>