Suppressing Java unchecked warnings in JSP files

后端 未结 3 881
情书的邮戳
情书的邮戳 2021-01-17 14:13

I have a legacy webapp which uses jstl and Struts 1 tags. When I pre-compile the JSP files with Java 5/6, the jstl and Struts 1 tags throw warnings about \"unchecked or unsa

3条回答
  •  醉梦人生
    2021-01-17 15:02

    You are right that

    -Xlint:unchecked

    does the opposite of what you want, but you can also use

    -Xlint:-unchecked

    Note the extra "-" in there.

    This will disable all warnings about unchecked operations, not just the ones generated by the tag library, but other warnings will still be shown.

提交回复
热议问题