Hi all,
I'm wondering why the PropertyModel sends an IndexOutOfBoundException when I
use an expression such as myList.0.name and that the 0 element doesn't
exist, whereas it doesn't sends a NullPointerException when I user
person.name with a null person.
Is it a wanted behavior
with hibernate you will get an empty
list. But doens't contains any elements.
--
View this message in context:
http://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17316645.html
Sent from the Wicket - User mailing list archive at Nabble.com
://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17316664.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
What I meant in my first post, is since I don't get a NPE in that case, I
was thinking that Wicket shouldn't throw a IOOBE in the case of an
inexisting position in my List: according to me Wicket should handle it.
Am i wrong ?
Yes, you are wrong. It's bad practice to refer to a location in
if the object
is null and throws a IllegalArgumentException.
Is a really null?
--
View this message in context:
http://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17316687.html
Sent from the Wicket - User mailing list archive at Nabble.com
/IndexOutOfBoundException-and-PropertyModel-tp17315359p17322053.html
Sent from the Wicket - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
View this message in context:
http://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17322161.html
Sent from the Wicket - User mailing list archive at Nabble.com
I think a good practice is to always take care of null objects and list your
self. You never know when or if the implementation might change.
--
View this message in context:
http://www.nabble.com/IndexOutOfBoundException-and-PropertyModel-tp17315359p17330046.html
Sent from the Wicket - User