Author: chris.laprun(a)jboss.com
Date: 2010-10-25 09:23:48 -0400 (Mon, 25 Oct 2010)
New Revision: 4817
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java
Log:
- GTNWSRP-116: avoid NPE when there's no cause in the parent exception.
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java
===================================================================
---
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java 2010-10-25
11:12:16 UTC (rev 4816)
+++
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java 2010-10-25
13:23:48 UTC (rev 4817)
@@ -97,10 +97,17 @@
}
String details = message;
+
+ // todo: this should be more generic
if (additionalParams != null && additionalParams.length > 0)
{
- details = ((Exception)additionalParams[0]).getLocalizedMessage();
+ Exception exception = (Exception)additionalParams[0];
+ if (exception != null)
+ {
+ details = exception.getLocalizedMessage();
+ }
}
+
FacesMessage msg = new FacesMessage(jsfSeverity, message, details);
facesContext.addMessage(target, msg);
}
Show replies by date