webwork/src/main/webwork/view/taglib PropertyTag.java,1.6,1.7

[email protected] Thu, 23 May 2002 06:13:18 -0700
Newsgroups gmane.comp.java.webwork.cvs
Message-ID <[email protected]>
Update of /cvsroot/webwork/webwork/src/main/webwork/view/taglib
In directory usw-pr-cvs1:/tmp/cvs-serv15759

Modified Files:
	PropertyTag.java 
Log Message:
fixed NPE that showed up under Resin 2.1.1

Index: PropertyTag.java
===================================================================
RCS file: /cvsroot/webwork/webwork/src/main/webwork/view/taglib/PropertyTag.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- PropertyTag.java	21 May 2002 03:30:43 -0000	1.6
+++ PropertyTag.java	23 May 2002 13:13:16 -0000	1.7
@@ -65,7 +65,12 @@
       // This is a workaround for a bug in Jasper.
       // http://znutar.cortexity.com/BugRatViewer/ShowReport/652
       // Resin 1.2.1 also has this bug (i.e. body is called even though it is empty)
-      String body = getBodyContent().getString();
+      String body = null;
+      try {
+         body = getBodyContent().getString();
+      } catch (Exception e) {
+         body = new String("");
+      }
       hadBody = body.length() != 0;
       //by default, we do not want to escape the body
       if (escape == null) {



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm