This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 199467 - JSP EL parsing breaks on encountering a string literal that contains '}'
Summary: JSP EL parsing breaks on encountering a string literal that contains '}'
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Expression Language (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-16 15:26 UTC by rjsang
Modified: 2011-12-01 16:46 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rjsang 2011-06-16 15:26:15 UTC
Here is some code that NB 6.9 did not complain about:

Code:
<c:if test="${message eq '{fieldrequired}'}">
    <c:set var="fieldrequired" value="true" />
</c:if>


Netbeans 7 complains and says

Code:
Encountered "\"" at line 1, column 14.
Was expecting one of:
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <STRING_LITERAL> ...
    "true" ...
    "false" ...
    "null" ...
    "(" ...
    "!" ...
    "not" ...
    "empty" ...
    "-" ...
    <IDENTIFIER> ...
Comment 1 Petr Jiricka 2011-07-13 12:27:20 UTC
Reproduced with 7.0.1 build 201107102202. Marku, could this be caused by your changes in EL? Thanks.

Not a stopper for 7.0.1.
Comment 2 Marek Fukala 2011-10-07 07:34:31 UTC
(In reply to comment #1)
> Reproduced with 7.0.1 build 201107102202. Marku, could this be caused by your
> changes in EL? Thanks.

This is an issue of XhtmlELLexer which hasn't been changed for a long time. It closes the EL token on first right curly bracket regardless it's in a string literal.

However from some reason there wasn't an error in <=6.9
Comment 3 Marek Fukala 2011-10-07 08:51:47 UTC
This is not JSP specific problem - the same issue is with facelets.
Comment 4 Marek Fukala 2011-10-07 09:25:31 UTC
fixed for both jsp and xhtml-el lexers in web-main#e0e9f0b6bc99
Comment 5 Quality Engineering 2011-10-10 12:25:46 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/e0e9f0b6bc99
User: Marek Fukala <mfukala@netbeans.org>
Log: #199467 - JSP EL parsing breaks on encountering a string literal that contains '}'
Comment 6 Vladimir Riha 2011-12-01 16:46:29 UTC
verified


Product Version: NetBeans IDE 7.1 RC2 (Build 201111302200)
Java: 1.7.0_02; Java HotSpot(TM) Client VM 22.0-b10
System: Linux version 3.0.0-13-generic-pae running on i386; UTF-8; en_US (nb)