replace unicode arrows

* ⇒, →, ←
* because we don't want to show them in documentation snippets and
  then it's complicated to avoid that when snippets are
  located in src/test/scala in individual modules
* dont replace object `→` in FSM.scala and PersistentFSM.scala
This commit is contained in:
Patrik Nordwall 2019-02-09 15:25:39 +01:00
parent e4d38f92a4
commit 5c96a5f556
1521 changed files with 18846 additions and 18786 deletions

View file

@ -7,7 +7,7 @@ package akka.stream.impl
import java.util.concurrent.Flow
import akka.annotation.InternalApi
import org.{ reactivestreams rs }
import org.{ reactivestreams => rs }
import JavaFlowAndRsConverters.Implicits._
/**
@ -62,48 +62,48 @@ private[akka] object JavaFlowAndRsConverters {
}
final def asJava[T](p: rs.Publisher[T]): Flow.Publisher[T] = p match {
case null null // null remains null
case adapter: JavaFlowPublisherToRsAdapter[T] adapter.delegate // unwrap adapter instead of wrapping again
case delegate new RsPublisherToJavaFlowAdapter(delegate) // adapt, it is a real Publisher
case null => null // null remains null
case adapter: JavaFlowPublisherToRsAdapter[T] => adapter.delegate // unwrap adapter instead of wrapping again
case delegate => new RsPublisherToJavaFlowAdapter(delegate) // adapt, it is a real Publisher
}
final def asRs[T](p: Flow.Publisher[T]): rs.Publisher[T] = p match {
case null null // null remains null
case adapter: RsPublisherToJavaFlowAdapter[T] adapter.delegate // unwrap adapter instead of wrapping again
case _ new JavaFlowPublisherToRsAdapter[T](p)
case null => null // null remains null
case adapter: RsPublisherToJavaFlowAdapter[T] => adapter.delegate // unwrap adapter instead of wrapping again
case _ => new JavaFlowPublisherToRsAdapter[T](p)
}
final def asJava[T](s: rs.Subscription): Flow.Subscription = s match {
case null null // null remains null
case adapter: JavaFlowSubscriptionToRsAdapter adapter.delegate // unwrap adapter instead of wrapping again
case _ new RsSubscriptionToJavaFlowAdapter(s)
case null => null // null remains null
case adapter: JavaFlowSubscriptionToRsAdapter => adapter.delegate // unwrap adapter instead of wrapping again
case _ => new RsSubscriptionToJavaFlowAdapter(s)
}
final def asRs[T](s: Flow.Subscription): rs.Subscription = s match {
case null null // null remains null
case adapter: RsSubscriptionToJavaFlowAdapter adapter.delegate // unwrap adapter instead of wrapping again
case _ new JavaFlowSubscriptionToRsAdapter(s)
case null => null // null remains null
case adapter: RsSubscriptionToJavaFlowAdapter => adapter.delegate // unwrap adapter instead of wrapping again
case _ => new JavaFlowSubscriptionToRsAdapter(s)
}
final def asJava[T](s: rs.Subscriber[T]): Flow.Subscriber[T] =
s match {
case null null // null remains null
case adapter: JavaFlowSubscriberToRsAdapter[T] adapter.delegate // unwrap adapter instead of wrapping again
case _ new RsSubscriberToJavaFlowAdapter[T](s)
case null => null // null remains null
case adapter: JavaFlowSubscriberToRsAdapter[T] => adapter.delegate // unwrap adapter instead of wrapping again
case _ => new RsSubscriberToJavaFlowAdapter[T](s)
}
final def asRs[T](s: Flow.Subscriber[T]): rs.Subscriber[T] = s match {
case null null // null remains null
case adapter: RsSubscriberToJavaFlowAdapter[T] adapter.delegate // unwrap adapter instead of wrapping again
case _ new JavaFlowSubscriberToRsAdapter[T](s)
case null => null // null remains null
case adapter: RsSubscriberToJavaFlowAdapter[T] => adapter.delegate // unwrap adapter instead of wrapping again
case _ => new JavaFlowSubscriberToRsAdapter[T](s)
}
final def asJava[T, R](p: rs.Processor[T, R]): Flow.Processor[T, R] = p match {
case null null // null remains null
case adapter: JavaFlowProcessorToRsAdapter[T, R] adapter.delegate // unwrap adapter instead of wrapping again
case _ new RsProcessorToJavaFlowAdapter[T, R](p)
case null => null // null remains null
case adapter: JavaFlowProcessorToRsAdapter[T, R] => adapter.delegate // unwrap adapter instead of wrapping again
case _ => new RsProcessorToJavaFlowAdapter[T, R](p)
}
final def asRs[T, R](p: Flow.Processor[T, R]): rs.Processor[T, R] = p match {
case null null // null remains null
case adapter: RsProcessorToJavaFlowAdapter[T, R] adapter.delegate // unwrap adapter instead of wrapping again
case _ new JavaFlowProcessorToRsAdapter[T, R](p)
case null => null // null remains null
case adapter: RsProcessorToJavaFlowAdapter[T, R] => adapter.delegate // unwrap adapter instead of wrapping again
case _ => new JavaFlowProcessorToRsAdapter[T, R](p)
}
}