You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ki...@apache.org on 2003/12/09 03:51:35 UTC

cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler SmapUtil.java

kinman      2003/12/08 18:51:35

  Modified:    jasper2/src/share/org/apache/jasper/compiler SmapUtil.java
  Log:
  - Fix 25263: bad smap when template text got concatenated.
  
  Revision  Changes    Path
  1.21      +6 -3      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapUtil.java
  
  Index: SmapUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/SmapUtil.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- SmapUtil.java	22 Oct 2003 19:10:58 -0000	1.20
  +++ SmapUtil.java	9 Dec 2003 02:51:35 -0000	1.21
  @@ -613,19 +613,22 @@
               //Add a LineInfo that corresponds to the beginning of this node
               int iInputStartLine = mark.getLineNumber();
               int iOutputStartLine = n.getBeginJavaLine();
  -            smap.addLineData(iInputStartLine, fileName, 1, iOutputStartLine, 1);
  +            int iOutputLineIncrement = breakAtLF? 1: 0;
  +            smap.addLineData(iInputStartLine, fileName, 1, iOutputStartLine, 
  +                             iOutputLineIncrement);
   
               // Output additional mappings in the text
               java.util.ArrayList extraSmap = n.getExtraSmap();
   
               if (extraSmap != null) {
                   for (int i = 0; i < extraSmap.size(); i++) {
  +                    iOutputStartLine += iOutputLineIncrement;
                       smap.addLineData(
                           iInputStartLine+((Integer)extraSmap.get(i)).intValue(),
                           fileName,
                           1,
  -                        ++iOutputStartLine,
  -                        1);
  +                        iOutputStartLine,
  +                        iOutputLineIncrement);
                   }
               }
           }
  
  
  

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