Play Framework:如何使用“-Xlint:unchecked”选项编译应用程序?

Play Framework: How to compile an application with the option "-Xlint:unchecked"?

当我使用 Play Framework 2.3.8 构建应用程序时,我收到了这条消息。如何为编译添加此选项?

[warn] Note: Some input files use unchecked or unsafe operations.
[warn] Note: Recompile with -Xlint:unchecked for details.

谢谢。

您是如何构建您的应用程序的?

通常很简单:

javac -Xlint:unchecked

如果您使用的是 sbt,那么像这样的东西应该可以工作:

javacOptions ++= Seq("-Xlint:unchecked")

Here's 一个更完整的例子(虽然有不同的 javacOptions)。