Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 237332 - JSP editor complains "Map is a raw type. References to generic type Map<K,V> should be parameterized"
Summary: JSP editor complains "Map is a raw type. References to generic type Map<K,V> ...
Status: VERIFIED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 minor with 2 votes (vote)
Target Milestone: 3.0.3   Edit
Assignee: Nick Sandonato CLA
QA Contact: Nitin Dahyabhai CLA
URL:
Whiteboard:
Keywords:
: 226841 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-16 14:45 EDT by David M. Karr CLA
Modified: 2009-12-08 16:36 EST (History)
3 users (show)

See Also:
thatnitind: review+


Attachments
The JSP that gets multiple flagged lines for the warning (2.14 KB, text/html)
2008-06-16 14:45 EDT, David M. Karr CLA
no flags Details
patch (3.75 KB, patch)
2008-10-10 17:40 EDT, Nick Sandonato CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David M. Karr CLA 2008-06-16 14:45:21 EDT
Created attachment 105064 [details]
The JSP that gets multiple flagged lines for the warning

I have a simple JSP in a Java 5 project.  I reference "${pageContext.request.contextPath}".  On numerous lines in the JSP I see a flagged warning saying:

  Map is a raw type. References to generic type Map<K,V> should be parameterized

I wrote a question about this in the webtools group, and "Nitin Dahyabhai" said the following:

"That's a bug in the underlying servlet source (created from your JSP file) that's being validated--it's not written with generics when the project source level supports/requires it."
Comment 1 Nitin Dahyabhai CLA 2008-06-16 16:40:04 EDT
Should make use of the org.eclipse.jdt.core.compiler.source value from org.eclipse.jdt.core.IJavaProject.getOption(String, boolean) when choosing the main boilerplate for the translation.
Comment 2 Nitin Dahyabhai CLA 2008-06-16 16:43:47 EDT
My mistake, it's the EL generator and not the main translator class.
Comment 3 Nick Sandonato CLA 2008-10-10 17:40:34 EDT
Created attachment 114842 [details]
patch

Checks the compiler source version to determine if the maps used should be parameterized.
Comment 4 Nitin Dahyabhai CLA 2008-10-10 21:44:02 EDT
Looks good, although you should add a check for the TaglibController method call returning null.
Comment 5 Nick Sandonato CLA 2008-10-13 13:22:45 EDT
Released to HEAD and 3_0_maintenance
Comment 6 Nick Sandonato CLA 2008-11-14 11:59:36 EST
Verified in wtp-R-3.0.3-20081113203138
Comment 7 Nick Sandonato CLA 2009-12-08 16:36:56 EST
*** Bug 226841 has been marked as a duplicate of this bug. ***