Uploaded image for project: 'Labs (Retired)'
  1. Labs (Retired)
  2. LABS-175

Define a common behaviour for converters and null values

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • Current
    • Future
    • Magma
    • None

    Description

      A converter has to deal with null values in both directions (from and to string) in a way that :

      • Converting a null to string and back should return again null
      • The String returned converting a null value should with no doubt be reconverted to a null value
      • The string returned converting a null value should not be null itself.

      The only exceptions are converters on a primitive type, which should return the proper "null" value (like 0 for numerics, false for boolean etc..) cause there is no other way to support a null value there, and "no value = 0" is a well established java default.

      The most problematic one is the string converter, which obviously have some problems converting a null to a not null and back being both its input and output a string.

      As opposed as it is now, converters will not be used for human display (except in urls, which are "humanly intelligible" but not human oriented), so magic values like "_NULL" or "null" are perfectly acceptable.

      Attachments

        Activity

          People

            s.gianni Simone Gianni
            s.gianni Simone Gianni
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: