Checked exceptions

Thomas May tmay at clearwateranalytics.com
Tue Oct 15 20:15:11 UTC 2019


So, assuming that checked exceptions are here to stay (right or wrong).

Would it be an option to start adding new APIs to the JDK with either no exceptions or unchecked exceptions?

The example that comes to mind is Double#parseDouble.  It's annoying to have to deal with NumberFormatException, the API would jive better if instead it returned an Optional<Double>.  But I realize that isn't possible without a lot of breakage, so what about instead a optionalParseDouble that returns a Optional<Double>?

Or is this too much effort for the gain?

________________________________

NOTICE: This e-mail message, together with any attachments, contains information of Clearwater Analytics and/or its affiliates that may be confidential, proprietary copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please immediately delete it. The information we provide is from sources Clearwater Analytics considers reliable, but Clearwater Analytics provides no warranties regarding the accuracy of the information. Further, nothing in the email should be construed as legal, financial, or tax advice, and any questions regarding the intended recipient's individual circumstances should be addressed to that recipient's lawyer and/or accountant.

Clearwater Analytics, 777 W. Main St, Boise, ID 83702
If you prefer not to receive emails from Clearwater Analytics you may unsubscribe<http://clearwater-analytics.com/unsubscribe>.


More information about the jdk-dev mailing list