Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-16226

Review document property values conversion at the core level

    XMLWordPrintable

    Details

      Description

      The EL DocumentModelResolver performs conversions on types before calling the document model setPropertyValue and getPropertyValue API.

      At least on set, more property types should be handled, see conversion use cases only handled by the DocumentModelResolver:

      • Date/Calendar conversions seem to be already handled by core, but conversion on get might still be useful for JSF components handling dates (they might not handle Calendar instances properly)
      • Long properties conversion could be made safer by handling BigDecimal properties (or at least BigInteger), same for Double (floating point) properties

      LongProperty#normalize method should also be reviewed, using BigDecimal#longValueExact is better than BigDecimal#longValue.

      In the case of NXP-16225, the DocumentModelResolver#getType method might need a check too (there might be a missing use case in there, explaining why a BigDecimal is generated instead of a BigInteger)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.