CAMEL-11216: REST-DSL - Producer fails with NPE or other exceptions if you have not set a hostname
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bd83484f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bd83484f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bd83484f Branch: refs/heads/camel-2.19.x Commit: bd83484f9471153f692975d046a5edaeee71caf8 Parents: 9c1439a Author: Claus Ibsen <[email protected]> Authored: Tue May 23 11:33:40 2017 +0200 Committer: Claus Ibsen <[email protected]> Committed: Tue May 23 11:34:26 2017 +0200 ---------------------------------------------------------------------- .../test/java/org/apache/camel/component/rest/RestEndpointTest.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/bd83484f/camel-core/src/test/java/org/apache/camel/component/rest/RestEndpointTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/RestEndpointTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/RestEndpointTest.java index a889811..57f52ab 100644 --- a/camel-core/src/test/java/org/apache/camel/component/rest/RestEndpointTest.java +++ b/camel-core/src/test/java/org/apache/camel/component/rest/RestEndpointTest.java @@ -65,6 +65,7 @@ public class RestEndpointTest { final RestEndpoint restEndpoint = new RestEndpoint("rest:GET:/path", restComponent); restEndpoint.setComponentName("mock-rest"); restEndpoint.setParameters(new HashMap<>()); + restEndpoint.setHost("http://localhost"); restEndpoint.setBindingMode(RestBindingMode.json);
