[jboss-cvs] jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/ui ...
Christian Bauer
christian at hibernate.org
Thu Sep 6 09:17:29 EDT 2007
User: cbauer
Date: 07/09/06 09:17:29
Modified: examples/wiki/src/main/org/jboss/seam/wiki/core/ui
FileServlet.java
Log:
Fixed NPE
Revision Changes Path
1.10 +3 -3 jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: FileServlet.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/examples/wiki/src/main/org/jboss/seam/wiki/core/ui/FileServlet.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- FileServlet.java 25 Aug 2007 17:59:25 -0000 1.9
+++ FileServlet.java 6 Sep 2007 13:17:29 -0000 1.10
@@ -119,8 +119,8 @@
// If it's not a picture or if it's a picture that is an attachment, tell the browser to download
// the file instead of displaying it
// TODO: What about PDFs? Lot's of people want to show PDFs inline...
- if ( file.getImageMetaInfo() == null ||
- (file.getImageMetaInfo() != null && file.getImageMetaInfo().getThumbnail() == 'A')
+ if ( file != null &&
+ ( file.getImageMetaInfo() == null || (file.getImageMetaInfo() != null && file.getImageMetaInfo().getThumbnail() == 'A') )
) {
response.setHeader("Content-Disposition", "attachement; filename=\"" + file.getFilename() + "\"" );
}
More information about the jboss-cvs-commits
mailing list