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: r898126 - /tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
Date Tue, 12 Jan 2010 08:57:40 GMT
On 12/01/2010 01:45, Konstantin Kolinko wrote:
> 2010/1/12  <markt@apache.org>:
>> Author: markt
>> Date: Tue Jan 12 00:10:46 2010
>> New Revision: 898126
>>
>> URL: http://svn.apache.org/viewvc?rev=898126&view=rev
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47977
>> Using a body with tags specified to have empty body content should cause an error
>>
>> Modified:
>>    tomcat/trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
>>
> 
>> @@ -426,9 +430,10 @@
>>                 if (scriptlessBodyNode == null
>>                         && bodyType.equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS))
{
>>                     scriptlessBodyNode = node;
>> -                }
>> -                else if (TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType))
{
>> +                } else if (TagInfo.BODY_CONTENT_TAG_DEPENDENT.equalsIgnoreCase(bodyType))
{
>>                     tagDependentPending = true;
>> +                } else if (TagInfo.BODY_CONTENT_EMPTY.equals(bodyType)) {
>> +                    tagEmptyBody = node;
>>                 }
>>             }
>>         }
> 
> Why there is equalsIgnoreCase() in the old code? Did the specification
> ever allow wrong-cased values there?  If yes, then maybe the added
> clause should also use equalsIgnoreCase.

The spec consistently uses the same case for all possible values of
<body-content>. Since XML is case sensitive one could argue it should
always be "empty" in this case. That said, I think being lenient here is
the pragmatic thing to do so I'll make the check case-insensitive.

Mark



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


Mime
View raw message