You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/08/02 21:58:05 UTC

DO NOT REPLY [Bug 22084] New: - JSP compiler incorrectly indents code

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.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org