Hello dear members,
consider following code in a JSP
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%><%!
static class VDataSet
{
public static <T> T get()
{
return (T) "hallo";
}
}
%><%
out.print(VDataSet.get());
%><%= VDataSet.get() %>
MyEclipse is saying for the line
out.print(VDataSet.get());
The method print(boolean) is ambiguous for the type JspWriter
which is correct behaviour (only if you have JDT Compiler >= 4.5.1 and Java 1.8 dependency)
but the line
<%= VDataSet.get() %>
is also incorrect, because it gets translated by the compiler to the same output as the first mentioned line.
The problem is that MyEclipse won’t say that this is also an error. But it actually is
We have tried turning on ALL the Validation/Warnings/Errors options in the configuration of MyEclipse but still no luck
Since we want to update to a newer Tomcat with newer JDT Compiler (MyEclipse already has new JDT Compiler), this is causing all of our JSPs (which uses JSP-Scriptlets for out.print for generic methods) not to be compiled, and there are really a lot of them
Is there anything I can tell MyEclipse to recognize this as an error?
-
This topic was modified 7 years, 9 months ago by
filan.
Attachments:
You must be
logged in to view attached files.