Play框架反向路由期望在IntelliJ IDEA中将Nothing作为参数

时间:2016-04-05 01:02:43

标签: java templates intellij-idea playframework playframework-2.3

我正在使用适用于 Play Framework 2.3.10 的反向路由,但 IntelliJ IDEA 16 (目前为止的最新版本)指出错误:

@helper.form(routes.MyController.doSomething(userEmail)) {
    ...
}

IDEA期望参数Nothing,因此此更改"删除" IDEA错误(但显然不会起作用,因为参数是String)。

@helper.form(routes.MyController.doSomething(new Nothing)) {
    ...
}

顺便说一句,没有争议的方法没有这个问题:

@helper.form(routes.MyController.doWhatever()) {
    ...
}

控制器就像:

public class MyController extends Controller {

    public Result doSomething(String email) {
        ...
    }

    public Result doWhatever() {
        ...
    }
}

您知道如何删除IntelliJ IDEA中的错误吗?

谢谢!

1 个答案:

答案 0 :(得分:2)

听起来你和我有类似的问题,你可以在这里看到:

Intellij Play Intellisense issues

对我来说,代码会编译,但intellij的“intellisense”认为参数不正确,即使它们是。