users@javaserverfaces.java.net

Re: Does the EL swallow NullPointerExceptions?

From: Adam Brod <ABrod_at_intralinks.com>
Date: Wed, 2 May 2007 16:02:29 -0400

Hmm, we're using JSF 1.2_04. I also just using EL 1.0. I will test out
JSF 1.2_04P1.

Thanks for your quick response!

Adam Brod
Product Development Team




From:
Ryan Lubke <Ryan.Lubke_at_Sun.COM>
To:
users_at_javaserverfaces.dev.java.net
Date:
05/02/2007 04:00 PM
Subject:
Re: Does the EL swallow NullPointerExceptions?


Adam,

What version of 1.2 are you using? If I recall correctly, Ed added a
fix in the EL wrapper area to prevent exception
swallowing. This fix was made available in 1.2_04 P01.



Adam Brod wrote:
>
> Is it possible that the EL would swallow NullPointerExceptions that
> bubble up from the persistence layer? We have a bean property in a
> managed bean that loads some items from the DB and wraps them in a
> DataModel. It seems that when the method is called through the EL:
>
> <h:dataTable value="#{myBean.dataModel}" var="item">
>
> The NullPointerException is swallowed and the page continues to render
> (causing all sorts of problems). If this is expected EL behavior,
> then I'll have to ensure my javabean properties never throw NPEs. I
> know the EL is pretty relaxed about handling null values when trying
> to output Strings on the page. However, since this value is a
> DataModel, and is not being coerced into a String, I would think the
> NPE should propagate up and send the user to an error page.
>
> Any tips would be greatly appreciated.
> *
> Adam Brod*/
> Product Development Team/
> Disclaimer: This electronic mail and any attachments are confidential
and may be privileged. If you are not the intended recipient, please
notify the sender immediately by replying to this email, and destroy all
copies of this email and any attachments. Thank you.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net



Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.