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 196188 - AssertionError from EL completion
Summary: AssertionError from EL completion
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Expression Language (show other bugs)
Version: 7.0
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 196550 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-02 09:18 UTC by Marek Fukala
Modified: 2011-04-07 13:33 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacktrace (2.15 KB, text/plain)
2011-03-18 13:22 UTC, malakim
Details
stacktrace (2.15 KB, text/plain)
2011-04-04 01:03 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Fukala 2011-03-02 09:18:54 UTC
1) create an xhtml file
2) type #{"hello"} expression somewhere
3) add < before the hash character
=>

java.lang.AssertionError
	at org.netbeans.modules.web.el.ELElement.findNodeAt(ELElement.java:113)
	at org.netbeans.modules.web.el.completion.ELCodeCompletionHandler.getTargetNode(ELCodeCompletionHandler.java:175)
	at org.netbeans.modules.web.el.completion.ELCodeCompletionHandler.complete(ELCodeCompletionHandler.java:97)
Comment 1 Marek Fukala 2011-03-14 13:59:16 UTC
*** Bug 196550 has been marked as a duplicate of this bug. ***
Comment 2 malakim 2011-03-18 13:22:02 UTC
Created attachment 107105 [details]
stacktrace

Editing a JSP file
Comment 3 David Konecny 2011-04-04 01:03:44 UTC
Created attachment 107452 [details]
stacktrace

I turned Maven Web Application into OSGI bundle and trying JSP editor - messy setup but IDE should not throw an exception.
Comment 4 Marek Fukala 2011-04-05 15:42:02 UTC
I cannot reproduce the issue now. Not a high priority issue, downgrading.

The problem seems to be in the "sanitized" version of ELExpression. If the expression is not resolved as valid and is sanitized, the assertion may possibly not to be true.
Comment 5 David Konecny 2011-04-05 19:32:09 UTC
Actually it does happen even in regular Web Application project:

* create fresh Web App
* change index.jsp to contain for example: 

  <title>JSP Page |${applicationScope} </title>

* place editor caret where | is and open code completion. I always get the exception.
Comment 6 Marek Fukala 2011-04-05 19:40:44 UTC
Great, thanks, now I can fix it... I wonder why the original test case stopped working?!?!
Comment 7 Marek Fukala 2011-04-06 09:56:39 UTC
fixed in web-main#97267100c415
Comment 8 Marek Fukala 2011-04-06 10:01:13 UTC
Since we need to integrate to releases clone ASAP I've tested the fix myself and asked Martin Fousek to do the code review.
Comment 9 Martin Fousek 2011-04-06 11:37:46 UTC
Reviewed, feel free to integrate. 
I tried it locally and debug the code in places around this issue, looks safe.
Comment 10 Marek Fukala 2011-04-06 13:26:29 UTC
integrated into release70 branch: 50e8fb1e01d0
Comment 11 Martin Fousek 2011-04-06 13:44:13 UTC
Verified in rebuilt IDE (from release70). Not marking as verified because I suppose that QE would like perhaps to verify it by themself in RC2.
Comment 12 Quality Engineering 2011-04-07 08:46:51 UTC
Integrated into 'main-golden', will be available in build *201104070400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/97267100c415
User: Marek Fukala <mfukala@netbeans.org>
Log: #196188 - AssertionError from EL completion
Comment 13 Vladimir Riha 2011-04-07 13:33:31 UTC
Verified.

Dev 201104070400
RC2 201104070802