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

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: Annotations
    • Labels:
    • keywords:
      annotation fields conversion
    • Similar issues:

      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

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

              Dates

              Created:
              Updated: