Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1023

Value conversion is not consistent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.4.0.Final, 2.2.1.GA
    • 2.3.0.Final
    • JCR
    • None
    • Low

    Description

      When obtaining a value from a javax.jcr.Value instance, conversion between property types is not always consistent. For example, if a property type is BOOLEAN but the underlying graph value is a String instance, then converting that type to a NAME will succeed because the conversion at the graph-level is done based upon the value's class. In other words, conversion from a String to a Boolean will always succeed (as would conversion from a JCR STRING to a JCR BOOLEAN), since that conversion is defined by the specification to use Boolean.valueOf(String), which returns 'true' if the String value is case-independently equal to "true" or 'false' in all other cases.

      Our JcrValue implementation should be a bit more strict about the type of conversions that are allowed, and it should do this by ensuring that the 'value' is an instance of the appropriate class given it's property type.

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: