tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1156313 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/DefaultErrorHandler.java java/org/apache/jasper/compiler/ErrorDispatcher.java webapps/docs/changelog.xml
Date Wed, 10 Aug 2011 18:51:12 GMT
Author: markt
Date: Wed Aug 10 18:51:11 2011
New Revision: 1156313

URL: http://svn.apache.org/viewvc?rev=1156313&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=41673
Use platform line endings when reporting error messages

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
    tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 18:51:11 2011
@@ -1 +1 @@
-/tomcat/trunk:1156171,1156276
+/tomcat/trunk:1156171,1156276,1156304

Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java?rev=1156313&r1=1156312&r2=1156313&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java Wed Aug
10 18:51:11 2011
@@ -17,6 +17,7 @@
 
 package org.apache.jasper.compiler;
 
+import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 
 /**
@@ -76,24 +77,28 @@ class DefaultErrorHandler implements Err
                 args = new Object[] {
                         Integer.valueOf(details[i].getJspBeginLineNumber()), 
                         details[i].getJspFileName() };
-                buf.append("\n\n");
+                buf.append(Constants.NEWLINE);
+                buf.append(Constants.NEWLINE);
                 buf.append(Localizer.getMessage("jsp.error.single.line.number",
                         args));
-                buf.append("\n");
+                buf.append(Constants.NEWLINE);
                 buf.append(details[i].getErrorMessage());
-                buf.append("\n");
+                buf.append(Constants.NEWLINE);
                 buf.append(details[i].getJspExtract());
             } else {
                 args = new Object[] {
                         Integer.valueOf(details[i].getJavaLineNumber()) };
-                buf.append("\n\n");
+                buf.append(Constants.NEWLINE);
+                buf.append(Constants.NEWLINE);
                 buf.append(Localizer.getMessage("jsp.error.java.line.number",
                         args));
-                buf.append("\n");
+                buf.append(Constants.NEWLINE);
                 buf.append(details[i].getErrorMessage());
             }
         }
-        buf.append("\n\nStacktrace:");
+        buf.append(Constants.NEWLINE);
+        buf.append(Constants.NEWLINE);
+        buf.append("Stacktrace:");
         throw new JasperException(
                 Localizer.getMessage("jsp.error.unable.compile") + ": " + buf);
     }

Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java?rev=1156313&r1=1156312&r2=1156313&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java Wed Aug 10 18:51:11
2011
@@ -22,6 +22,7 @@ import java.io.StringReader;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
 
+import org.apache.jasper.Constants;
 import org.apache.jasper.JasperException;
 import org.apache.jasper.JspCompilationContext;
 import org.xml.sax.SAXException;
@@ -473,7 +474,7 @@ public class ErrorDispatcher {
             // Ignore messages preceding first error
             if (errMsgBuf != null) {
                 errMsgBuf.append(line);
-                errMsgBuf.append("\n");
+                errMsgBuf.append(Constants.NEWLINE);
             }
         }
         

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1156313&r1=1156312&r2=1156313&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Aug 10 18:51:11 2011
@@ -72,6 +72,14 @@
       the connections map during clean-up. Patch provided by zhh. (mark)
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        <bug>41673</bug>: Use platform line-endings when reporting compilation
+        errors. (markt)
+      </fix>
+    </changelog>
+  </subsection>
 </section>
 <section name="Tomcat 7.0.20 (markt)">
   <subsection name="Catalina">



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


Mime
View raw message