dev@javaserverfaces.java.net

[jsf 2.0] inconsistent javadoc between UIViewRoot.getComponentResources and UIViewRoot.addComponentResource

From: Leonardo Uribe <lu4242_at_gmail.com>
Date: Sun, 3 May 2009 23:29:27 -0500

Hi

Checking the latest javadoc (jsf-spec-2.0-20090327) for jsf 2.0, there is
something wrong with the description of UIViewRoot.getComponentResources and
UIViewRoot.addComponentResource.

The description on UIViewRoot.getComponentResources(FacesContext context,
String target) says this:

".........Return an unmodifiable List of UIComponents for the provided
target agrument........"

but the description of UIViewRoot.addComponentResource(FacesContext context,
UIComponent componentResource, String target) says this:

"..... ...................
# Call getComponentResources(javax.faces.context.FacesContext,
java.lang.String) to obtain the child list for the given target.
# If the component ID of componentResource matches the the ID of a resource
that has allready been added, remove the old resource.
# Add the component resource to the list.
.............."

The inconsistency is that if getComponentResources return an unmodifiable
List, you can't remove and add components to that list, but the remaining
javadoc comments suggests this. Obviously, the code don't do what javadoc
says.

It is possible that someone correct the javadoc and publish the correct
behavior?.

regards

Leonardo Uribe