Comments (3)
I will verify this in 2.1.3-RC1
from playframework.
Verified under 2.1.3-RC1 with:
package controllers;
import play.mvc.Controller;
import play.mvc.Result;
import views.html.index;
public class AssetController extends Controller {
public static Result getAsset(String platformName, Integer assetId, String expand, String includeRelations) {
return ok(index.render("Your new application is ready."));
}
}
import org.junit.Test;
import static junit.framework.Assert.fail;
import controllers.routes;
public class ApplicationTest {
@Test
public void testReverseRoutingWithDefaultParameters() {
String platformName = "platform";
Integer otherAssetId = 123;
try {
final String url = routes.AssetController.getAsset(platformName, otherAssetId, null, null).url();
} catch (Exception e) {
e.printStackTrace();
fail(e.getMessage());
}
}
}
[issue818] $ test
java.lang.NullPointerException
at java.net.URLEncoder.encode(URLEncoder.java:205)
at play.api.mvc.QueryStringBindable$$anon$9.unbind(Binders.scala:271)
at play.api.mvc.QueryStringBindable$$anon$9.unbind(Binders.scala:269)
at controllers.ReverseAssetController.getAsset(routes_reverseRouting.scala:27)
at ApplicationTest.testReverseRoutingWithDefaultParameters(ApplicationTest.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runners.Suite.runChild(Suite.java:127)
at org.junit.runners.Suite.runChild(Suite.java:26)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at com.novocode.junit.JUnitRunner.run(JUnitRunner.java:84)
at sbt.ForkMain$Run.runTests(ForkMain.java:155)
at sbt.ForkMain$Run.run(ForkMain.java:169)
at sbt.ForkMain.main(ForkMain.java:84)
[error] Test ApplicationTest.testReverseRoutingWithDefaultParameters failed: null
[info] ApplicationTest
[info] x ApplicationTest.testReverseRoutingWithDefaultParameters
[info]
[info]
[info] Total for test ApplicationTest
[info] Finished in 0.002 seconds
[info] 1 tests, 1 failures, 0 errors
[error] Failed: : Total 1, Failed 1, Errors 0, Passed 0, Skipped 0
[error] Failed tests:
[error] ApplicationTest
[error] (test:test) Tests unsuccessful
[error] Total time: 1 s, completed Jul 30, 2013 3:20:12 PM
from playframework.
I think this has been verified -- should it still have the "needs-verification" label on it?
from playframework.
Related Issues (20)
- Set up dependabot to update GitHub actions HOT 1
- POST request fails with java.lang.IllegalStateException: Sink.asPublisher(fanout = false) only supports one subscriber HOT 2
- Play 2.9.0 and JDK 17.0.9 com.typesafe.sslconfig.ssl.FakeKeyStore cannot access class sun.security HOT 2
- [Feature] Add option to disable Javascript routers HOT 10
- Evolutions generated in wrong place in `PlayService` project HOT 6
- InjectedController trait not working with scala 3 HOT 9
- The link for guiding user to source in document is broken HOT 2
- COPY button in document code section would move along with the scroll bar HOT 3
- The link for Zenexity has been broken in Play Philosophy page HOT 1
- sbt-heroku plugin no longer maintained HOT 3
- `TestServer.isRunning` throws an exception when the server is not running. HOT 3
- Loss `Result` attributes by any modification HOT 4
- Requests with Large POST Body Immediately Goes into Delay Cancellation Right After the Server Received the Request HOT 6
- Caffeine cache API has inconsistent behavior with differing types and between sync/async HOT 1
- play hangs on console interacton when using jblas library HOT 4
- 2.9 with Scala 2.13 not supporting pack4j 6.00 dependency :Jackson Data-bind 2.15.x
- Documentation spelling fix HOT 3
- Scala 3.3.2: class file ... is broken, reading aborted with `class java.util.NoSuchElementException` `contextual$` HOT 9
- Replace `3.0.x` with next version HOT 5
- SSL certificate for www.playframework.com is expired HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playframework.