Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-1304

Proper handling of PropertyType.NAME in MgnlNode.setProperty

    XMLWordPrintable

Details

    • Task
    • Resolution: Won't Do
    • Major
    • None
    • 3.0.1
    • core, workflow
    • None

    Description

      For some unknown reason, the JcrBeanCoder uses PropertyType.NAME when storing Null values - I've only seen this happening with the "openwfe.org.jcr.beancoder.JcrBeanCoder__instance_class" property. As a result, the related beans can't be deserialized.

      I've applied to following fix for now, but it's far from elegant:
      if (type == PropertyType.NAME) {
      log.warn("setProperty(" + propertyName + ", " + valueStr + " with type PropertyType.NAME, will switch to PropertyType.STRING ...");
      type = PropertyType.STRING;
      }

      We should:
      1) understand why/how PropertyType.NAME was used in the first place
      2) if PropertyType.NAME is a valid choice, make it so that the bean can be deserialized anyhow. if not, then fix JcrBeanCoder.

      This was working before MAGNOLIA-1303 because the type parameter was ignored and all properties stored as Strings.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                gjoseph Magnolia International
                gjoseph Magnolia International
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoR