generics - Suppressing Java unchecked warnings in JSP files -
i have legacy webapp uses jstl , struts 1 tags. when pre-compile jsp files java 5/6, jstl , struts 1 tags throw warnings "unchecked or unsafe operations". example, if use following tag:
<%@ page import="/anotherpage.inc" %>
the following warning thrown:
[javac] note: input files use unchecked or unsafe operations. [javac] note: recompile -xlint:unchecked details.
if recompile -xlint:unchecked, details internal working of offending jsp tag library. suppress unchecked operation warnings. thought using -xlint:-unchecked suppress warnings, did not.
how suppress these warnings when compiling jsp pages? not practical re-code jsp tag libraries or update thousand jsp pages. i'm looking compiler flag globally disable warning can see warnings except unchecked warnings. thanks!
those messages (mandatory jdk >= 1.5) note, not warning.
compiler.note.unchecked.plural=\ input files use unchecked or unsafe operations.
the default compiler behaviour same -xlint:-unchecked
.
with -xlint:unchecked
turn warning on, reporting each instance.
compiler.warn.unchecked.assign=\ [unchecked] unchecked assignment: {0} {1} ...
mandatory notes cannot disabled individually, disabled -xlint:none
. unfortunately, rest of warnings disabled.
you can check other responses alternatives, filtering compiler output messages seems easiest solution.
Comments
Post a Comment