[ http://issues.apache.org/jira/browse/MYFACES-458?page=comments#action_12363969 ]
Christophe Jolif commented on MYFACES-458: ------------------------------------------ Hi Martin, Indeed the javadoc says: "Any attempt to add a null key or value must throw a NullPointerException." But on the other hand: 1/ the JSF specification doesn't talk about that 2/ the javadoc of the put method also says: "If the property is not writeable, or an attempt is made to set a property of primitive type to null, throw IllegalArgumentException." which sounds to me as if it implies that null on non primitive types is accepted. 3/ the RI accepts null 4/ setters accept null Thus, my understanding would be that you cannot add a new pair with null key (*add*, i.e. put without previous key), but you can put a previously set value back to null. Did you check with the JSR if is it not a javadoc that is just unclear? Indeed we have code failing because of this "fix" in MyFaces. Thanks. > javax.faces.component._ComponentAttributesMap implementation not correct > ------------------------------------------------------------------------ > > Key: MYFACES-458 > URL: http://issues.apache.org/jira/browse/MYFACES-458 > Project: MyFaces > Type: Bug > Components: JSR-127 > Reporter: Oliver Rossmueller > Assignee: Martin Marinschek > Fix For: 1.1.0 > > according the UIComponent.getAttributes javadoc the Map implementation > returned by this method for any attempt to add a null key or value must throw > a NullPointerException > The current implementation is correct for null keys but not does not check > for null values. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
