Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-115

Ability to set NilReason on Boolean, Integer, Double and String objects

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.3
    • Fix Version/s: 0.4
    • Component/s: Utilities
    • Labels:
      None

      Description

      In SIS 0.3, NilReason are stored by implementations of the org.apache.sis.xml.NilObject interface. However we can not implement this interface for Boolean, Integer, Double, String and other JDK classes that are final.

      The proposed workaround is to provide an internal PrimitiveTypeProperties class which will assign NilReason to a specific instance of Boolean or other JDK classes, using an IdentityHashMap. Inconvenient is that testing if (object instanceof NilObject) is no longer sufficient - we now need to use the NilReason.forObject(Object) method.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                desruisseaux Martin Desruisseaux
                Reporter:
                desruisseaux Martin Desruisseaux
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: