Nicolai Parlog 10/22/2014

Why Isn't Optional Serializable?

Read Original

This article analyzes why Java's Optional type does not implement Serializable. It delves into the original design intent of Optional as a short-lived return type, not for storage in fields, and summarizes discussions from JDK mailing lists and developer comments explaining this deliberate choice to prevent misuse.

Why Isn't Optional Serializable?

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser