tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 22084] New: - JSP compiler incorrectly indents code
Date Sat, 02 Aug 2003 19:58:05 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22084>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22084

JSP compiler incorrectly indents code

           Summary: JSP compiler incorrectly indents code
           Product: Tomcat 5
           Version: Nightly Build
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Jasper2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: ecarmich@alumni.rice.edu


If the text in a TemplateText node ends in "\n", then if the mappedfile init 
parameter is set to true, or the line length exceeds CHUNKSIZE, the first line 
of Java code generated from the succeeding node will be indented too far.

The problem is that when visit(Node.TemplateText n) in Generator.java sees 
the "\n", it finishes the current line, and then calls out.printin() in order 
to properly indent the text that follows.  This works fine if there is text 
that follows, but if there isn't, the effect is to overindent the first line 
in whatever code is generated by the next node to be visited.

I will attach a patch that fixes this.

Mime
View raw message