OpenEngSB
  1. OpenEngSB
  2. OPENENGSB-3619

EDBConverter fails converting wrapped Number type properties

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: openengsb-3.0.0.M1
    • Component/s: framework
    • Labels:
      None

      Description

      if a model has a wrapped Number type property, then the EDBConverter will fail to create that number, as it first tries to cast the value to a string, and then use NumberUtils to create a number from this string.

        Gliffy Diagrams

        Error rendering 'com.meetme.plugins.jira.gerrit-plugin:gerritreviewsmodule'. Please contact your JIRA administrators.

          Activity

          Hide
          Thomas Rausch added a comment -

          the affected method is EDBConverter.getValueForProperty(PropertyDescriptor, EDBObject), specifically the lines:

          else if (Number.class.isAssignableFrom(parameterType)) {
              value = NumberUtils.createNumber((String) value);
          }

          this is redundant, and removing this fixes the issue.

          Show
          Thomas Rausch added a comment - the affected method is EDBConverter.getValueForProperty(PropertyDescriptor, EDBObject) , specifically the lines: else if (Number.class.isAssignableFrom(parameterType)) { value = NumberUtils.createNumber((String) value); } this is redundant, and removing this fixes the issue.
          Show
          Thomas Rausch added a comment - PR#835 https://github.com/openengsb/openengsb-framework/pull/835

            People

            • Assignee:
              Thomas Rausch
              Reporter:
              Thomas Rausch
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: