Hm. Just noticed this:
BeanModelSourceImpl.java:
...
public <T> BeanModel<T> create(Class<T> beanClass, boolean
filterReadOnlyProperties, Messages messages)
{
assert beanClass != null;
assert messages != null;
...
Why are we using assertions to check the arguments? Even in java 6,assertions
are disabled by default at runtime, and according to:
http://docs.oracle.com/javase/1.5.0/docs/guide/language/assert.html:
"Do not use assertions for argument checking in public methods.
Argument checking is typically part of the published specifications (or
contract) of a method, and these specifications must be obeyed whether
assertions are enabled or disabled. Another problem with using assertions for
argument checking is that erroneous arguments should result in an appropriate
runtime exception (such as IllegalArgumentException, IndexOutOfBoundsException,
orNullPointerException). An assertion failure will not throw an appropriate
exception."
This just tripped up a new user; they received an NPE in
TapestryInternalUtils.defaultLabel due to the message catalog being null.
Robert
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]