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 108744 - error in '@page include' underlined on wrong line
Summary: error in '@page include' underlined on wrong line
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker with 1 vote (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-03 12:28 UTC by Jindrich Sedek
Modified: 2015-09-17 13:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
snap shot (26.62 KB, image/png)
2007-07-03 12:51 UTC, Jindrich Sedek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Sedek 2007-07-03 12:28:39 UTC
Create new WebApplication
in index.jsp use these directives:

<%@page contentType="text/html"%>
<%@page import="static java.util.LinkedList" %>


first line is red underlined and red exclamation mark is shown near first line
it anounces an error in static import but it is on second line
Comment 1 Jindrich Sedek 2007-07-03 12:51:14 UTC
Created attachment 44666 [details]
snap shot
Comment 2 Tomasz Slota 2007-11-01 15:46:31 UTC
reproducible, errors in the import directive are always reported on the first line.
Comment 3 Jiri Prox 2008-04-11 01:15:15 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 4 Petr Jiricka 2009-11-04 16:14:56 UTC
Still reproducible. Tomasz, is this easily fixable, or not really?
Comment 5 Tomasz Slota 2009-11-13 07:43:04 UTC
reproducible. weird, it looks like the warning does not come from Java
Comment 6 Anton Chechel 2011-04-27 12:17:30 UTC
Reproducible
TM <= 6.8 to TM=Dev
Comment 7 Marek Fukala 2013-01-03 12:12:25 UTC
what is the whole issue about???

static import is not ment for classes and interfaces but for their members so 

import static java.util.LinkedList;

resp.

<%@page import="static java.util.LinkedList" %>

is a nonsense.

As the simplified servlet contains the code

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import static java.util.LinkedList;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

public class SimplifiedJSPServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;


	void mergedScriptlets(
		HttpServletRequest request,
		HttpServletResponse response,
		HttpSession session,
		ServletContext application,
		JspWriter out,
		ServletConfig config,
		JspContext jspContext,
		Object page,
		PageContext pageContext,
		Throwable exception
	) throws Throwable {

	}
}

the java parser correctly says it is invalid construct.

for example 

<%@page import="static java.util.LinkedList.*" %>

is correct and also works fine in netbeans.
Comment 8 Marek Fukala 2013-01-03 12:13:19 UTC
ok, I see - the fact the error is on wrong line :-)
Comment 9 Martin Balin 2015-09-17 13:09:58 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.