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 94585 - NPE: PageInfo obtained from JspParserAPI.ParseResult is null! at
Summary: NPE: PageInfo obtained from JspParserAPI.ParseResult is null! at
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
Depends on: 109620
Blocks:
  Show dependency tree
 
Reported: 2007-02-06 07:57 UTC by Martin Schovanek
Modified: 2008-08-22 17:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
java.lang.NullPointerException: PageInfo obtained from JspParserAPI.ParseResult is null! (1.44 KB, text/plain)
2007-02-06 08:00 UTC, Martin Schovanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Schovanek 2007-02-06 07:57:19 UTC
[#200702011900, jdk1.5.0]

to reproduce:
-------------
1) create a .tag file
2) remove <%@tag description="..." attribute
3) add <%@attribute description="aaaa"%> directive into the .tag file
4) open a .jsp
5) insert into the .jsp: <%@taglib tagdir="/WEB-INF/tags/" prefix="t"%>
6) <%
NOTE: auto CC window appears
7) press Enter
NOTE: IDE completes the line to: <%@ include  %>
8) delete completed text (only '<% ' string remains)
9) copy-paste 'javax.servlet.jsp.jstl.sql.Resul' string on the current cursor
position
10) invoke CC
ERROR: IDE Throws:
Comment 1 Martin Schovanek 2007-02-06 08:00:44 UTC
Created attachment 38089 [details]
java.lang.NullPointerException: PageInfo obtained from JspParserAPI.ParseResult is null!
Comment 2 Marek Fukala 2007-02-06 11:54:47 UTC
Looks like the problem is the same as in the Issue #94582 - the web module is
not properly parsed by jsp parser and thus it is throwing the exceptions. Can
you reproduce the problem/s on a brand new web project? 
Comment 3 Marek Fukala 2007-02-16 15:39:56 UTC
Martine, can you react to my last comment please?
Comment 4 Marek Fukala 2007-07-13 12:08:28 UTC
Petre, can you please clarify the behaviour of the JSPParserAPI.getPageInfo()? Is that legal that it returns null under
some circumstances? Or is that a parser bug? Since you are the expert on the parser I would like to ask you to elaborate
how it should behave. Updating javadoc of the API would be superb.

I can remove the logged NPE from the JspSyntaxSupport.getImports() easily, but just in case that the null being returned
is valid in the testcase.
Comment 5 Marek Fukala 2007-10-12 18:42:10 UTC
We need #109620 resolved first!
Comment 6 Marek Fukala 2008-08-22 12:05:02 UTC
hopefully fixed + added more logging.

changeset:   97503:482eb85c61ce
user:        Marek Fukala <mfukala@netbeans.org>
date:        Fri Aug 22 13:00:39 2008 +0200
summary:     #94582 - NPE at .JspSyntaxSupport.getTagLibraries():208

changeset:   97504:b7e4821bdf03
tag:         tip
user:        Marek Fukala <mfukala@netbeans.org>
date:        Fri Aug 22 13:03:47 2008 +0200
summary:     #94585 - NPE: PageInfo obtained from JspParserAPI.ParseResult is null! at
Comment 7 Quality Engineering 2008-08-22 17:16:44 UTC
Integrated into 'main-golden', available in build *200808221401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/b7e4821bdf03
User: Marek Fukala <mfukala@netbeans.org>
Log: #94585 - NPE: PageInfo obtained from JspParserAPI.ParseResult is null! at