From a2e667e99a0e11cb624e9e887109d755bf4d66e9 Mon Sep 17 00:00:00 2001 From: Philippus Baalman Date: Mon, 15 Apr 2019 14:21:25 +0200 Subject: Update scala 2.13.0-M5 to 2.13.0-RC1 (#294) * Update specs2 to 4.5.1 * Update scala 2.13.0-M5 to 2.13.0-RC1 * Replace deprecated unicode arrows * Replace deprecated symbol literals * Update scala 2.12.7 to 2.12.8 * Update sbt to 1.2.8 * Update sbt-osgi to 0.9.5 * Update dependencies for scala 2.10.x --- .travis.yml | 6 +++--- build.sbt | 12 ++++++------ project/build.properties | 2 +- project/plugins.sbt | 2 +- src/main/scala/spray/json/JsonParser.scala | 2 +- src/main/scala/spray/json/JsonPrinter.scala | 4 ++-- src/test/scala/spray/json/BasicFormatsSpec.scala | 4 ++-- src/test/scala/spray/json/ProductFormatsSpec.scala | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 00a1123..bd45fa7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ language: scala scala: - 2.10.7 - 2.11.12 - - 2.12.7 - - 2.13.0-M5 + - 2.12.8 + - 2.13.0-RC1 jdk: - oraclejdk8 @@ -12,7 +12,7 @@ jdk: matrix: include: - jdk: openjdk11 - scala: 2.12.7 + scala: 2.12.8 script: - sbt "++ ${TRAVIS_SCALA_VERSION}!" test mimaReportBinaryIssues diff --git a/build.sbt b/build.sbt index cdde0db..bb126e6 100644 --- a/build.sbt +++ b/build.sbt @@ -22,13 +22,13 @@ resolvers += Opts.resolver.sonatypeReleases libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, 10)) => Seq( - "org.specs2" %% "specs2-core" % "3.8.9" % "test", - "org.specs2" %% "specs2-scalacheck" % "3.8.9" % "test", - "org.scalacheck" %% "scalacheck" % "1.13.4" % "test" + "org.specs2" %% "specs2-core" % "3.10.0" % "test", + "org.specs2" %% "specs2-scalacheck" % "3.10.0" % "test", + "org.scalacheck" %% "scalacheck" % "1.14.0" % "test" ) case Some((2, n)) if n >= 11 => Seq( - "org.specs2" %% "specs2-core" % "4.3.5" % "test", - "org.specs2" %% "specs2-scalacheck" % "4.3.5" % "test", + "org.specs2" %% "specs2-core" % "4.5.1" % "test", + "org.specs2" %% "specs2-scalacheck" % "4.5.1" % "test", "org.scalacheck" %% "scalacheck" % "1.14.0" % "test" ) case _ => Nil @@ -67,7 +67,7 @@ mimaBinaryIssueFilters := Seq( // publishing /////////////// -crossScalaVersions := Seq("2.12.7", "2.10.7", "2.11.12", "2.13.0-M5") +crossScalaVersions := Seq("2.12.8", "2.10.7", "2.11.12", "2.13.0-RC1") publishMavenStyle := true diff --git a/project/build.properties b/project/build.properties index 7c58a83..c0bab04 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.2.6 +sbt.version=1.2.8 diff --git a/project/plugins.sbt b/project/plugins.sbt index ed1a250..41badc2 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("io.spray" % "sbt-boilerplate" % "0.6.1") -addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.4") +addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.9.5") addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.2") diff --git a/src/main/scala/spray/json/JsonParser.scala b/src/main/scala/spray/json/JsonParser.scala index 3efdac8..7dfae0a 100644 --- a/src/main/scala/spray/json/JsonParser.scala +++ b/src/main/scala/spray/json/JsonParser.scala @@ -231,7 +231,7 @@ class JsonParser(input: ParserInput, settings: JsonParserSettings = JsonParserSe s"Unexpected $unexpected at input index $cursor (line $lineNr, position $col), expected $expected" } val detail = { - val sanitizedText = text.map(c ⇒ if (Character.isISOControl(c)) '?' else c) + val sanitizedText = text.map(c => if (Character.isISOControl(c)) '?' else c) s"\n$sanitizedText\n${" " * (col-1)}^\n" } throw new ParsingException(summary, detail) diff --git a/src/main/scala/spray/json/JsonPrinter.scala b/src/main/scala/spray/json/JsonPrinter.scala index f132ab9..42cbab4 100644 --- a/src/main/scala/spray/json/JsonPrinter.scala +++ b/src/main/scala/spray/json/JsonPrinter.scala @@ -59,8 +59,8 @@ trait JsonPrinter extends (JsValue => String) { sb.append('"') firstToBeEncoded() match { - case -1 ⇒ sb.append(s) - case first ⇒ + case -1 => sb.append(s) + case first => sb.append(s, 0, first) @tailrec def append(ix: Int): Unit = if (ix < s.length) { diff --git a/src/test/scala/spray/json/BasicFormatsSpec.scala b/src/test/scala/spray/json/BasicFormatsSpec.scala index 8417df2..454e1cc 100644 --- a/src/test/scala/spray/json/BasicFormatsSpec.scala +++ b/src/test/scala/spray/json/BasicFormatsSpec.scala @@ -158,10 +158,10 @@ class BasicFormatsSpec extends Specification with DefaultJsonProtocol { "The SymbolJsonFormat" should { "convert a Symbol to a JsString" in { - 'Hello.toJson mustEqual JsString("Hello") + Symbol("Hello").toJson mustEqual JsString("Hello") } "convert a JsString to a Symbol" in { - JsString("Hello").convertTo[Symbol] mustEqual 'Hello + JsString("Hello").convertTo[Symbol] mustEqual Symbol("Hello") } } diff --git a/src/test/scala/spray/json/ProductFormatsSpec.scala b/src/test/scala/spray/json/ProductFormatsSpec.scala index 9eabc50..f42c46d 100644 --- a/src/test/scala/spray/json/ProductFormatsSpec.scala +++ b/src/test/scala/spray/json/ProductFormatsSpec.scala @@ -65,7 +65,7 @@ class ProductFormatsSpec extends Specification { Test2(42, None).toJson mustEqual JsObject("a" -> JsNumber(42)) } "ignore additional members during deserialization" in { - JsObject("a" -> JsNumber(42), "b" -> JsNumber(4.2), "c" -> JsString('no)).convertTo[Test2] mustEqual obj + JsObject("a" -> JsNumber(42), "b" -> JsNumber(4.2), "c" -> JsString(Symbol("no"))).convertTo[Test2] mustEqual obj } "not depend on any specific member order for deserialization" in { JsObject("b" -> JsNumber(4.2), "a" -> JsNumber(42)).convertTo[Test2] mustEqual obj -- cgit v1.2.3