• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Java 8 optionals
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Java 8 optionals


  • Subject: Java 8 optionals
  • From: Mark Wardle <email@hidden>
  • Date: Sat, 23 May 2015 22:24:14 +0100

Dear all,

I’ve migrated to java 8 in development and deployment and am now dabbling with new “features”.

Optionals seem a potentially good way of documenting nullability although the syntax is currently rather cumbersome it seems likely that in future versions, the syntax will improve.

However, key value coding fails when an object is encapsulated by an Optional. Intuitively, these should be unwrapped during KVC so that “normal” behaviour continues - i.e. as KVC gracefully handles null pointers in arbitrary key paths it should gracefully handle optionals containing either a value or null.

How would the handling of KVC be patched for future java versions? Is this something fixable now? Does all KVC work via NSKeyValueCoding.DefaultImplementation or are there multiple implementations? I used to have a java decompiler working but haven’t set this up since upgrading eclipse so it has been difficult to fathom the internals.

Mark

-- 
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Deputy Sub-Dean for Assessments and Honorary Lecturer, Cardiff University
Email: email@hidden or email@hidden  Twitter: @mwardle
Telephone: 02920745274 (secretary) or facsimile: 02920744166





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Making AjaxFlexibleFileUpload serializable
  • Next by Date: ERSync
  • Previous by thread: Making AjaxFlexibleFileUpload serializable
  • Next by thread: Re: Java 8 optionals
  • Index(es):
    • Date
    • Thread