Ferran Maylinch
Ferran Maylinch

Reputation: 11529

Play framework reverse route expects Nothing as parameter in IntelliJ IDEA

I'm using a reverse route that works on Play Framework 2.3.10 but IntelliJ IDEA 16 (latest version so far) points an error:

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

IDEA expects a parameter of Nothing, so this change "removes" the IDEA error (but it won't work, obviously, since the parameter is a String).

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

By the way, methods without arguments don't have that issue:

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

The controller is like:

public class MyController extends Controller {

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

    public Result doWhatever() {
        ...
    }
}

Do you know how to remove the error in IntelliJ IDEA?

Thank you!

Upvotes: 1

Views: 87

Answers (1)

tigerdev2000
tigerdev2000

Reputation: 235

It sounds like you are having very similar issues to me as you can see here:

Intellij Play Intellisense issues

For me the code will compile but intellij's "intellisense" is thinking the parameters aren't correct, even though they are.

Upvotes: 2

Related Questions