Code Monkey home page Code Monkey logo

Comments (3)

wsargent avatar wsargent commented on May 14, 2024

I will verify this in 2.1.3-RC1

from playframework.

wsargent avatar wsargent commented on May 14, 2024

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.

wsargent avatar wsargent commented on May 14, 2024

I think this has been verified -- should it still have the "needs-verification" label on it?

from playframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.