Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 226471 - Expected an operand but found eof
Expected an operand but found eof
Product: javascript
Classification: Unclassified
Component: Editor
PC Windows XP x64
: P3 with 1 vote (vote)
: 7.4
Assigned To: Petr Pisl
Depends on:
  Show dependency treegraph
Reported: 2013-02-21 15:59 UTC by unai
Modified: 2013-08-22 14:28 UTC (History)
1 user (show)

See Also:

Screenshot (60.31 KB, image/png)
2013-02-21 15:59 UTC, unai

Note You need to log in before you can comment on or make changes to this bug.
Description unai 2013-02-21 15:59:30 UTC
Created attachment 131683 [details]

Error shows up for javascript in .JSP files which were OK for NetBeans 7.2.1.

Projects that were fine for NB 7.2 are now invalid for NB 7.3: have to switch back to 7.2 until upgrade gets seamless.
Comment 1 unai 2013-02-21 16:34:44 UTC
Ok, the problem is with the
that ends the javascript-containing comment used to hide the code from very old user-agents not recognizing that script element.

NetBeans 7.2 (and all major rendering engines -- Trident, Gecko, Presto, WebKit, KHTML) allowed for
while NetBeans 7.3 only allows for
(which actually is the right way to do it, but no javascript engine has ever complained about the missing //, and neither did NB7.2, so it looks like a regression. Sort of.).
Comment 2 Petr Pisl 2013-02-21 21:19:17 UTC
NetBeans 7.3 uses different JavaScript parser - Nashorn. It's more strict than Rhino that was used in NetBeans 7.2 - Rhino parser. 

Simple reproducible case:

<!DOCTYPE html>
        <script type="text/javascript"> 
            var result = 20;

I will see what I can do on the NetBeans site.
Comment 3 unai 2013-08-22 14:28:28 UTC
(I accidentally created the bug as P4 instead of default's P3)

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo