This is how I solved it. Previous, it was like this:
return new Promise<ObjectNode>(result);
After I changed to this, it worked!
Future<ObjectNode> ft = Futures.successful(result);
return new Promise<ObjectNode>(ft);
Pergunta
I have an application migrated from Play 2.0.4 to 2.1. When compile in Play 2.1, this error was thrown out.
[error] /Users/XXX/app/controllers/SomePost.java:93: cannot find symbol
[error] symbol : constructor Promise(org.codehaus.jackson.node.ObjectNode)
[error] location: class play.libs.F.Promise<org.codehaus.jackson.node.ObjectNode>
[error] return new Promise<ObjectNode>(result);
How could I fix this?
Solução
This is how I solved it. Previous, it was like this:
return new Promise<ObjectNode>(result);
After I changed to this, it worked!
Future<ObjectNode> ft = Futures.successful(result);
return new Promise<ObjectNode>(ft);