From 7466aec8b83ecb636326cde99016660806b3f02a Mon Sep 17 00:00:00 2001 From: Aleksei Otts Date: Tue, 25 Sep 2018 14:41:49 +0300 Subject: [PATCH] #35 hotfix selectReader signature --- README.md | 4 ++-- build.sbt | 2 +- .../src/main/scala/tethys/readers/JsonReaderBuilder.scala | 2 +- project/build.properties | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0b0357eb..e8546eeb 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ tethys is a JSON parsing/writing library for Scala Add dependencies to your `build.sbt` ```scala -val tethysVersion = "0.7.0.1" +val tethysVersion = "0.7.0.2" libraryDependecies ++= Seq( "com.tethys-json" %% "tethys-core" % tethysVersion, "com.tethys-json" %% "tethys-jackson" % tethysVchrersion, @@ -22,7 +22,7 @@ or just ```scala libraryDependecies ++= Seq( - "com.tethys-json" %% "tethys" % "0.7.0.1" + "com.tethys-json" %% "tethys" % "0.7.0.2" ) ``` diff --git a/build.sbt b/build.sbt index 2c775397..914651c9 100644 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ lazy val scalaTestVersion = "3.0.5" lazy val commonSettings = Seq( - version := "0.7.0.1", + version := "0.7.0.2", organization := "com.tethys-json", scalaVersion := "2.11.12", crossScalaVersions := Seq("2.11.12", "2.12.6", "2.13.0-M2"), diff --git a/modules/core/src/main/scala/tethys/readers/JsonReaderBuilder.scala b/modules/core/src/main/scala/tethys/readers/JsonReaderBuilder.scala index b1575943..7c3e98eb 100644 --- a/modules/core/src/main/scala/tethys/readers/JsonReaderBuilder.scala +++ b/modules/core/src/main/scala/tethys/readers/JsonReaderBuilder.scala @@ -28,7 +28,7 @@ object JsonReaderBuilder { new SimpleJsonReader[Res](fields())(m => fun(value(m))) } - def selectReader[Res](fun: PartialFunction[A1, JsonReader[_ <: Res]])(implicit Res: ClassTag[Res], A1: ClassTag[A1]): JsonReader[Res] = { + def selectReader[Res](fun: A1 => JsonReader[_ <: Res])(implicit Res: ClassTag[Res], A1: ClassTag[A1]): JsonReader[Res] = { val simpleJsonReader = new SimpleJsonReader[A1](fields())(m => value(m)) new SelectingJsonReader[A1, Res](simpleJsonReader)(fun) } diff --git a/project/build.properties b/project/build.properties index 84d4f68c..8db5ca22 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.2.0 \ No newline at end of file +sbt.version = 1.2.1 \ No newline at end of file