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

Bad constructor in PropertyMap

    XMLWordPrintable

    Details

      Description

      In the class org.nuxeo.ecm.automation.client.jaxrs.model.PropertyMap, I think there's a constructor that's not doing what it should:

      public PropertyMap(Map<String, String> map)

      { map = new LinkedHashMap<String, String>(map); }

      It is reassigning the local variable, instead of the instance variable. The left part of the assignment should be preceded by 'this', or the parameter should be renamed.

      Also, why Map<String, String>, when the instance variable is declared as LinkedHashMap<String, Object>?

      I think it should be:

      public PropertyMap(Map<String, Object> map)

      { this.map = new LinkedHashMap<String, String>(map); }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: