Hello all,

Currenty, FacesBean.getProperty(null) throws a NullPointerException from the
checkNotListKey method call. However, I feel it should rather return null
and not throw an exception. That way, we would no longer have to use the
following code snippet in our renderer to know if the property is supported
on any given component:
if (someKey == null)
{
  return null;
}
else
{
  return ComponentUtils.resolveSomeType(bean.getProperty(someKey),
someDefaultValue);
}

If getProperty were to return null instead of throwing an exception, only
return line would be needed, reducing some boilerplate code in the various
renderers.

Any objection to make that change to FacesBeanImpl and reflect it in the
FacesBean's javadoc?


Regards,

~ Simon

Reply via email to