Skip to content

Commit 9ed3f08

Browse files
committed
fixed scala-2.12 deprecations
1 parent 86a02b1 commit 9ed3f08

File tree

7 files changed

+9
-12
lines changed

7 files changed

+9
-12
lines changed

build.sbt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ name:="scala-gopher"
33

44
organization:="com.github.rssh"
55

6-
//scalaVersion := "2.12.0"
7-
scalaVersion := "2.12.1-SNAPSHOT"
6+
scalaVersion := "2.12.0"
87

98
resolvers += Resolver.sonatypeRepo("snapshots")
109

@@ -17,7 +16,7 @@ scalacOptions ++= Seq("-unchecked","-deprecation", "-feature"
1716

1817
libraryDependencies <+= scalaVersion( "org.scala-lang" % "scala-reflect" % _ )
1918

20-
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.7-SNAPSHOT-p1"
19+
libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.6"
2120
//libraryDependencies += "org.scala-lang.modules" %% "scala-async" % "0.9.6-SNAPSHOT"
2221

2322
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.0" % "test"

src/main/scala/gopher/channels/DuppedInput.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class DuppedInput[A](origin:Input[A])
2828
await(f2)
2929
();
3030
}(ec) )
31-
selector.go.onFailure{
31+
selector.go.failed.foreach{
3232
case ex: ChannelClosedException =>
3333
sink1.close()
3434
sink2.close()

src/test/scala/gopher/channels/DuppedChannelsSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import org.scalatest.concurrent._
1313

1414
import scala.concurrent.ExecutionContext.Implicits.global
1515

16-
class DuppedChannelsSuite extends FunSuite with AsyncAssertions {
16+
class DuppedChannelsSuite extends FunSuite with Waiters {
1717

1818

1919
test("duped input must show two") {
@@ -60,7 +60,7 @@ class DuppedChannelsSuite extends FunSuite with AsyncAssertions {
6060
in1.aread map { x => w(assert(x==1)); w.dismiss() } onComplete {
6161
case Failure(ex) => w( throw ex )
6262
case Success(_) =>
63-
in1.aread onFailure{ case ex => w(assert(ex.isInstanceOf[ChannelClosedException]));
63+
in1.aread.failed.foreach{ ex => w(assert(ex.isInstanceOf[ChannelClosedException]));
6464
w.dismiss()
6565
}
6666
}

src/test/scala/gopher/channels/FoldSelectSuite.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ class FoldSelectSuite extends FunSuite
3333
}
3434
}
3535
}
36-
generator.onFailure{
37-
case ex: Throwable => ex.printStackTrace()
38-
}
36+
generator.failed.foreach{ _.printStackTrace() }
3937
in.awriteAll(2 to 100)
4038
//in.awriteAllDebug(2 to 100)
4139
val read = go {

src/test/scala/gopher/channels/IOTimeoutsSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import scala.concurrent._
1616
import scala.concurrent.duration._
1717
import scala.concurrent.ExecutionContext.Implicits.global
1818

19-
class IOTimeoutsSuite extends FunSuite with AsyncAssertions {
19+
class IOTimeoutsSuite extends FunSuite with Waiters {
2020

2121

2222
test("messsaged from timeouts must be appear during reading attempt from empty channel") {

src/test/scala/gopher/channels/InputOpsSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import org.scalatest.concurrent._
1313

1414
import scala.concurrent.ExecutionContext.Implicits.global
1515

16-
class InputOpsSuite extends FunSuite with AsyncAssertions {
16+
class InputOpsSuite extends FunSuite with Waiters {
1717

1818

1919
test("map operation for input") {

src/test/scala/gopher/channels/UnbufferedSelectSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import scala.concurrent.duration._
1212
import org.scalatest._
1313
import org.scalatest.concurrent._
1414

15-
class UnbufferedSelectSuite extends FunSuite with AsyncAssertions
15+
class UnbufferedSelectSuite extends FunSuite with Waiters
1616
{
1717

1818
import scala.concurrent.ExecutionContext.Implicits.global

0 commit comments

Comments
 (0)