tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kin-Man Chung <Kin-Man.Ch...@Eng.Sun.COM>
Subject [PATCH] TC4.0 Throws NPE in JakartaCommentGenerator
Date Thu, 20 Sep 2001 21:23:40 GMT
This patch fixes the NPE raised when a jsp:useBean has a non empty body.
However, it does not "fix" the problem reported in #3740, since I couldn't
reproduce the same bug, though the test now works!


misto% runsocks cvs diff -u Parser.java
Index: Parser.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/P
arser.java,v
retrieving revision 1.13
diff -u -r1.13 Parser.java
--- Parser.java 2001/09/15 01:18:10     1.13
+++ Parser.java 2001/09/20 20:55:57
@@ -1096,11 +1096,12 @@
        boolean noJspElement = false;
        while (reader.hasMoreInput()) {
 
+            if (tmplStart == null)
+                tmplStart = reader.mark();
+            if (tmplStop == null)
+                tmplStop = reader.mark();
+
             if (until != null && reader.matches(until)) {
-                if (tmplStart == null)
-                    tmplStart = reader.mark();
-                if (tmplStop == null)
-                    tmplStop = reader.mark();
                 return;
             }
 


Mime
View raw message