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 177926 - NullPointerException at org.netbeans.modules.web.core.syntax.completion.api.ELExpression.isResolvedExpression
Summary: NullPointerException at org.netbeans.modules.web.core.syntax.completion.api.E...
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-01 08:04 UTC by doctorlux
Modified: 2010-01-27 13:06 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 162654


Attachments
stacktrace (2.73 KB, text/plain)
2009-12-01 08:04 UTC, doctorlux
Details
stacktrace (2.61 KB, text/plain)
2010-01-09 07:40 UTC, Petr Dvorak
Details
stacktrace (2.61 KB, text/plain)
2010-01-09 13:32 UTC, Petr Dvorak
Details
stacktrace (2.61 KB, text/plain)
2010-01-24 20:06 UTC, David Konecny
Details
test case (11.79 KB, application/x-gzip)
2010-01-25 13:57 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description doctorlux 2009-12-01 08:04:30 UTC
Build: NetBeans IDE Dev (Build nbms-and-javadoc-4387-on-091126)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Linux, 2.6.31-15-generic, i386

User Comments:
GUEST: Code completetion on facelets file using #{}

zhujinyue@gmail.com: when I use a datatable in xhtml file and write the value, netbeans throw exception.

Chiana: Inserted an "{" inside a quoted string, it automatically added an "}" and then this error occured.

Chiana: Same as last time, type a "{" inside a quoted string, it added "}" and then errored...

zhujinyue@gmail.com: when I click the "Ctr+\" in <h:commandLink action="#{}", netbeans throw exception.

Chiana: Same again, I think it should not just blindly add a "}" just because you type "{"...

Chiana: Tried replicating 177498. Hope it is the correct bug replicated...

Had a string 
<f:actionlistener for="testBean.value" 
then you realized you forgot the #{ and the } at the end.
used arrow to move back and on the way inserted the } at the end and then using backarrows moved to the beginning of the string and typed #{ and then the editor inserted an extraenous } thats when...

Chiana: And again... Definatley reproducable B-)

Chiana: Clicked control-space inside "{}" on the line
<h:dataTable rendered="#{}">

zhujinyue@gmail.com: when I use the hot key "Ctr + \" in <h:datatable value="#{}" in XHTML, netbeans throw exception.

Chiana: Had text
<f:actionlistener for="testdata" />
positioned cursor on t in testdata and typed #{

Chiana: Checked again, the error occured BEFORE the extra } was deleted, the string look like
<f:actionlistener for="#{}te... }"



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.web.core.syntax.completion.api.ELExpression.isResolvedExpression(ELExpression.java:1149)
        at org.netbeans.modules.web.core.syntax.completion.api.ELExpression$BaseELTaskClass.getTypeMirrorPreceedingCaret(ELExpression.java:790)
        at org.netbeans.modules.web.core.syntax.completion.api.ELExpression$InspectPropertiesTask.getTypePreceedingCaret(ELExpression.java:657)
        at org.netbeans.modules.web.jsf.editor.el.JsfElExpression$2.run(JsfElExpression.java:328)
        at org.netbeans.modules.web.jsf.editor.el.JsfElExpression$2.run(JsfElExpression.java:325)
        at org.netbeans.api.java.source.JavaSource$MimeTask.run(JavaSource.java:538)
Comment 1 doctorlux 2009-12-01 08:04:33 UTC
Created attachment 91935 [details]
stacktrace
Comment 2 Exceptions Reporter 2009-12-15 04:28:16 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=162654
Comment 3 Petr Dvorak 2010-01-09 07:40:20 UTC
Created attachment 93149 [details]
stacktrace

I was editing the JSF page
Comment 4 Petr Dvorak 2010-01-09 08:06:36 UTC
... occurred while typing this code in XHTML/JSF page:

<h:commandButton action="#{IndeepAuthManagedBean.login("user")}" value="Login"/>
Comment 5 Petr Dvorak 2010-01-09 13:32:28 UTC
Created attachment 93151 [details]
stacktrace

Editing JSF, just introduced a new variable (<c:set ...) and used it...
Comment 6 David Konecny 2010-01-24 20:06:27 UTC
Created attachment 93517 [details]
stacktrace

I just opened CC.
Comment 7 David Konecny 2010-01-24 20:11:49 UTC
Happens to me always whenever I open code completion at the beginning of expression, eg. (pipe character is caret place):

<h:outputText value="#{|item.city}"/>

or 

<h:outputText value="#{|}"/>
Comment 8 Marek Fukala 2010-01-25 04:00:57 UTC
dkonecny, please attach the project where the issue is reproducible. I cannot reproduce the issue on my own projects. If you were not to be able to reproduce it I would have to spend some time making theories how it could happen. Thanks for your help.
Comment 9 David Konecny 2010-01-25 13:57:37 UTC
Created attachment 93534 [details]
test case

You are right Marek, it is not reproducible on simplest xhtml file. In attached project try to open code completion in index.xhtml in

   value="#{|}"

where pipe char is.
Comment 10 Marek Fukala 2010-01-26 05:13:36 UTC
fixed in web-main#b92a805c5344
Comment 11 Quality Engineering 2010-01-27 13:06:44 UTC
Integrated into 'main-golden', will be available in build *201001271614* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b92a805c5344
User: Marek Fukala <mfukala@netbeans.org>
Log: #177926 - NullPointerException at org.netbeans.modules.web.core.syntax.completion.api.ELExpression.isResolvedExpression