From 039378f784dc42eef051ce7ebcf257879904b928 Mon Sep 17 00:00:00 2001 From: zsxwing Date: Mon, 19 May 2014 10:25:17 +0800 Subject: [PATCH] Fix the initialization order --- .../src/main/scala/rx/lang/scala/Subscriber.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Subscriber.scala b/language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Subscriber.scala index 38934742c9..2b5d714076 100644 --- a/language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Subscriber.scala +++ b/language-adaptors/rxjava-scala/src/main/scala/rx/lang/scala/Subscriber.scala @@ -3,16 +3,16 @@ package rx.lang.scala trait Subscriber[-T] extends Observer[T] with Subscription { self => - - private [scala] override val asJavaObserver: rx.Observer[_ >: T] = asJavaSubscriber - private [scala] override val asJavaSubscription: rx.Subscription = asJavaSubscriber - + private [scala] val asJavaSubscriber: rx.Subscriber[_ >: T] = new rx.Subscriber[T] { def onNext(value: T): Unit = self.onNext(value) def onError(error: Throwable): Unit = self.onError(error) def onCompleted(): Unit = self.onCompleted() } - + + private [scala] override val asJavaObserver: rx.Observer[_ >: T] = asJavaSubscriber + private [scala] override val asJavaSubscription: rx.Subscription = asJavaSubscriber + /** * Used to register an unsubscribe callback. */