Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-6321

Annotation field values handling should respect the data type declared in the AnnotationClass.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 2.3
    • Annotations
    • annotation fields conversion

    Description

      Currently, when handling an XWiki Annotation in the UI, a fake (in-memory) XWiki object is used and populated with the annotation's values.
      When copying those values, to make sure no NPEs cause problems, "$!

      {ann.get($prop.name)}

      " (quotes included) was used. This has the side effect of passing only string values to the fake object, neglecting it's properties data types.

      The proposed patch simply checks if the value to set is not null before actually setting it to the fake object.

      This way there is no extra conversion involved and no null value is set on the fake object.

      Attachments

        Activity

          People

            Unassigned Unassigned
            enygma Eduard Moraru
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: