Fixed scala compiler warnings
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/9050c779 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9050c779 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9050c779 Branch: refs/heads/master Commit: 9050c7793e4579471925157824dceb889a15d4a8 Parents: 683b0ff Author: Claus Ibsen <[email protected]> Authored: Thu Jul 24 10:43:37 2014 +0200 Committer: Claus Ibsen <[email protected]> Committed: Thu Jul 24 10:43:37 2014 +0200 ---------------------------------------------------------------------- .../scala/org/apache/camel/scala/dsl/InterceptFromTest.scala | 4 ++-- .../scala/org/apache/camel/scala/dsl/OnExceptionTest.scala | 8 +++++--- .../org/apache/camel/scala/dsl/SetExchangePatternTest.scala | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/9050c779/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptFromTest.scala ---------------------------------------------------------------------- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptFromTest.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptFromTest.scala index f5f34be..4674ba0 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptFromTest.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/InterceptFromTest.scala @@ -30,7 +30,7 @@ class SInterceptFromSimpleRouteTest extends InterceptFromSimpleRouteTest with Ro def livingIn(city: String)(exchange: Exchange) = exchange.in("city") == city override def createRouteBuilder = new RouteBuilder { - interceptFrom().when(livingIn("London")) { + interceptFrom.when(livingIn("London")) { to ("mock:intercepted") }.stop @@ -62,7 +62,7 @@ class SInterceptFromWhenWithChoiceTest extends InterceptFromWhenWithChoiceTest w override def createRouteBuilder = new RouteBuilder { context.addInterceptStrategy(new Tracer()) - interceptFrom().when(simple("${body} contains 'Goofy'")) { + interceptFrom.when(simple("${body} contains 'Goofy'")) { choice { when (_.in[String].contains("Hello")) { to ("mock:hello") http://git-wip-us.apache.org/repos/asf/camel/blob/9050c779/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala ---------------------------------------------------------------------- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala index adebbf7..2dbf0e6 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/OnExceptionTest.scala @@ -34,7 +34,7 @@ class SOnExceptionHandledTest extends OnExceptionHandledTest with RouteBuilderSu to("mock:handled") }.handled - "direct:start" throwException(new IllegalArgumentException("Forced")) + "direct:start" throwException new IllegalArgumentException("Forced") } } @@ -51,7 +51,9 @@ class SOnExceptionComplexRouteTest extends OnExceptionComplexRouteTest with Rout }.maximumRedeliveries(2).handled "direct:start" ==> { - handle[MyFunctionalException]().maximumRedeliveries(0) + handle[MyFunctionalException]{ + }.maximumRedeliveries(0) + to("bean:myServiceBean") to("mock:result") } @@ -97,7 +99,7 @@ class SOnExceptionRetryUntilWithDefaultErrorHandlerTest extends ScalaTestSupport transform("Sorry") }.retryWhile(threeTimes).handled - "direct:start" throwException(new MyFunctionalException("Sorry, you cannot do this")) + "direct:start" throwException new MyFunctionalException("Sorry, you cannot do this") } } http://git-wip-us.apache.org/repos/asf/camel/blob/9050c779/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SetExchangePatternTest.scala ---------------------------------------------------------------------- diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SetExchangePatternTest.scala b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SetExchangePatternTest.scala index eda6c24..4964eb2 100644 --- a/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SetExchangePatternTest.scala +++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SetExchangePatternTest.scala @@ -62,8 +62,8 @@ class SetExchangePatternTest extends ScalaTestSupport { val builder = new RouteBuilder { //START SNIPPET: simple - "direct:a" inOnly() to ("mock:a") - "direct:c" inOut() to ("mock:c") + "direct:a" inOnly to ("mock:a") + "direct:c" inOut to ("mock:c") //END SNIPPET: simple //START SNIPPET: block
