tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r656839 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/jasper/compiler/Validator.java webapps/docs/changelog.xml
Date Fri, 16 May 2008 13:08:03 GMT
Markus Schönhaber wrote:
> markt@apache.org wrote:
> 
>> Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java
>> URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java?rev=656839&r1=656838&r2=656839&view=diff
>> ==============================================================================
>> --- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java (original)
>> +++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/Validator.java Thu May 15
14:08:47 2008
>> @@ -323,11 +323,12 @@
>>           * 
>>           * @throws JasperException in case of page encoding mismatch
>>           */
>> -        private String comparePageEncodings(String pageDirEnc,
>> +        private String comparePageEncodings(String thePageDirEnc,
>>                  Node.PageDirective pageDir) throws JasperException {
>>  
>>              Node.Root root = pageDir.getRoot();
>> -            String configEnc = root.getJspConfigPageEncoding();
>> +            String configEnc = root.getJspConfigPageEncoding().toUpperCase();
>> +            String pageDirEnc = thePageDirEnc.toUpperCase();
>>  
>>              /*
>>               * Compare the 'pageEncoding' attribute of the page directive with
>> @@ -355,7 +356,7 @@
>>               * identical.
>>               */
>>              if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog())
|| root.isBomPresent()) {
>> -                String pageEnc = root.getPageEncoding();
>> +                String pageEnc = root.getPageEncoding().toUpperCase();
>>                  if (!pageDirEnc.equals(pageEnc)
>>                          && (!pageDirEnc.startsWith("UTF-16") || !pageEnc
>>                                  .startsWith("UTF-16"))) {
> 
> While a build yesterday - without this change - works fine, a build with
> the above patch applied fails to compile JSPs for me:
> 
>> java.lang.NullPointerException
>> 	at org.apache.jasper.compiler.Validator$DirectiveVisitor.comparePageEncodings(Validator.java:330)

Yep, my bad. I'll take a look over the weekend. Fix should be simple.

Mark


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


Mime
View raw message