Bad constructor in PropertyMap
------------------------------
Key: NXP-6016
URL: https://jira.nuxeo.org/browse/NXP-6016
Project: Nuxeo Enterprise Platform
Issue Type: Bug
Components: Web API (REST or WS*)
Affects Versions: 5.4
Reporter: Daniel Perez Alvarez
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);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets