Author: pete.muir(a)jboss.org
Date: 2008-10-01 09:48:02 -0400 (Wed, 01 Oct 2008)
New Revision: 9161
Modified:
trunk/src/mail/org/jboss/seam/mail/ui/UIAttachment.java
Log:
Need to check for null when seeing if attachment is a pdf.
Modified: trunk/src/mail/org/jboss/seam/mail/ui/UIAttachment.java
===================================================================
--- trunk/src/mail/org/jboss/seam/mail/ui/UIAttachment.java 2008-10-01 13:44:57 UTC (rev
9160)
+++ trunk/src/mail/org/jboss/seam/mail/ui/UIAttachment.java 2008-10-01 13:48:02 UTC (rev
9161)
@@ -126,7 +126,7 @@
InputStream is = (InputStream) getValue();
ds = new ByteArrayDataSource(is, getContentType());
}
- else if (Reflections.isInstanceOf(getValue().getClass(),
"org.jboss.seam.document.DocumentData"))
+ else if (getValue() != null &&
Reflections.isInstanceOf(getValue().getClass(),
"org.jboss.seam.document.DocumentData"))
{
Method dataGetter = Reflections.getGetterMethod(getValue().getClass(),
"data");
Method docTypeGetter = Reflections.getGetterMethod(getValue().getClass(),
"documentType");
Show replies by date