camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1460258 - in /camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala: RichExchange.scala dsl/SAbstractDefinition.scala dsl/builder/RouteBuilder.scala
Date Sun, 24 Mar 2013 03:30:10 GMT
Author: ningjiang
Date: Sun Mar 24 03:30:10 2013
New Revision: 1460258

URL: http://svn.apache.org/r1460258
Log:
Fixed some compiling warnings of camel-scala

Modified:
    camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala
    camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
    camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala?rev=1460258&r1=1460257&r2=1460258&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala
(original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/RichExchange.scala
Sun Mar 24 03:30:10 2013
@@ -32,9 +32,9 @@ class RichExchange(val exchange : Exchan
   def in(header:String) : Any = exchange.getIn.getHeader(header)
 
   def in = exchange.getIn.getBody
-  def in[T](implicit manifest: Manifest[T]) : T = exchange.getIn.getBody(manifest.erasure).asInstanceOf[T]
+  def in[T](implicit manifest: Manifest[T]) : T = exchange.getIn.getBody(manifest.runtimeClass).asInstanceOf[T]
 
-  def out : Any = exchange.getOut.getBody
+  def out = exchange.getOut.getBody
 
   def out(header:String) : Any = exchange.getOut.getHeader(header)
 

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala?rev=1460258&r1=1460257&r2=1460258&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
(original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
Sun Mar 24 03:30:10 2013
@@ -74,7 +74,7 @@ abstract class SAbstractDefinition[P <: 
 
   def filter(predicate: Exchange => Any) = SFilterDefinition(target.filter(predicateBuilder(predicate)))
 
-  def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E]) = SOnExceptionDefinition[E](target.onException(manifest.erasure.asInstanceOf[Class[Throwable]])).apply(block)
+  def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E]) = SOnExceptionDefinition[E](target.onException(manifest.runtimeClass.asInstanceOf[Class[Throwable]])).apply(block)
 
   def id(id : String) = wrap(target.id(id))
   def idempotentConsumer(expression: Exchange => Any) = SIdempotentConsumerDefinition(target.idempotentConsumer(expression,
null))

Modified: camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala?rev=1460258&r1=1460257&r2=1460258&view=diff
==============================================================================
--- camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
(original)
+++ camel/trunk/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
Sun Mar 24 03:30:10 2013
@@ -85,7 +85,7 @@ class RouteBuilder extends Preamble with
    */
   def handle[E <: Throwable](block: => Unit)(implicit manifest: Manifest[E]) = {
     stack.size match {
-      case 0 => SOnExceptionDefinition[E](builder.onException(manifest.erasure.asInstanceOf[Class[Throwable]]))(this).apply(block)
+      case 0 => SOnExceptionDefinition[E](builder.onException(manifest.runtimeClass.asInstanceOf[Class[Throwable]]))(this).apply(block)
       case _ => stack.top.handle[E](block)
     }
   }



Mime
View raw message