Msgstr "No suitable constructor found" Compilation error in case of varargs

I constantly have the same error

error: no suitable constructor found for FootballCriterionSet(String,FootballCriterion,FootballCriterion) 

in case of constructor with varargs:

 public FootballCriterionSet(String name, FootballCriterion... fc){} 

The problem can be solved in two ways:

  • Defining a constructor with the exact number of parameters (1 + 2 in this case) that just calls the varargs constructor.
  • Stop the playback server, run "play clean-all" and restart the server (waiting for all classes to compile).

Is there any way to solve / solve the problem?

In particular, I think that somehow forcing Play to do "clean everything" with every class change without stopping the server will work for me. Is it possible?

+4
source share

All Articles