Skip to content

Commit

Permalink
Merge pull request #4 from MAIF/upgrade-jackson
Browse files Browse the repository at this point in the history
Upgrade deps
  • Loading branch information
larousso committed Apr 13, 2021
2 parents 2267a24 + c71f0ae commit eee7c74
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 40 deletions.
74 changes: 38 additions & 36 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import Dependencies._
import ReleaseTransformations._
import sbt.librarymanagement.MavenRepository

organization := "fr.maif"

name := "functional-json"

scalaVersion := "2.12.12"

lazy val root = (project in file("."))
lazy val root = project in file(".")

usePgpKeyHex("ACB29F776DF78DC275FD53D701A8C4DED9143455")

Expand All @@ -19,14 +18,17 @@ resolvers ++= Seq(
)

libraryDependencies ++= Seq(
"io.vavr" % "vavr" % vavrVersion,
"io.vavr" % "vavr-jackson" % vavrVersion,
"com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8" % jacksonVersion,
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % jacksonVersion,
"org.projectlombok" % "lombok" % "1.18.4",
"com.novocode" % "junit-interface" % "0.11" % Test,
"org.assertj" % "assertj-core" % "3.10.0" % Test,
"com.github.everit-org.json-schema" % "org.everit.json.schema" % "1.12.1" % Test
"io.vavr" % "vavr" % vavrVersion,
"io.vavr" % "vavr-jackson" % vavrVersion,
"com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion,
"com.fasterxml.jackson.core" % "jackson-annotations" % jacksonVersion,
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion,
"com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8" % jacksonVersion,
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % jacksonVersion,
"org.projectlombok" % "lombok" % "1.18.4",
"com.novocode" % "junit-interface" % "0.11" % Test,
"org.assertj" % "assertj-core" % "3.10.0" % Test,
"com.github.everit-org.json-schema" % "org.everit.json.schema" % "1.12.1" % Test
)

val javaVersion = "8"
Expand Down Expand Up @@ -64,34 +66,34 @@ inThisBuild(
organization := "fr.maif",
homepage := Some(url(s"https://github.com/$githubRepo")),
licenses := List(
"Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")
),
developers := List(
Developer(
"alexandre.delegue",
"Alexandre Delègue",
"",
url(s"https://github.com/larousso")
),
Developer(
"benjamin.cavy",
"Benjamin Cavy",
"",
url(s"https://github.com/ptitFicus")
"Apache-2.0" -> url("https://www.apache.org/licenses/LICENSE-2.0")
),
Developer(
"gregory.bevan",
"Grégory Bévan",
"",
url(s"https://github.com/GregoryBevan")
developers := List(
Developer(
"alexandre.delegue",
"Alexandre Delègue",
"",
url(s"https://github.com/larousso")
),
Developer(
"benjamin.cavy",
"Benjamin Cavy",
"",
url(s"https://github.com/ptitFicus")
),
Developer(
"gregory.bevan",
"Grégory Bévan",
"",
url(s"https://github.com/GregoryBevan")
),
Developer(
"georges.ginon",
"Georges Ginon",
"",
url(s"https://github.com/ftoumHub")
)
),
Developer(
"georges.ginon",
"Georges Ginon",
"",
url(s"https://github.com/ftoumHub")
)
),
releaseCrossBuild := false,
crossPaths := false
)
Expand Down
5 changes: 2 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

object Dependencies {
val jacksonVersion = "2.10.5"
val vavrVersion = "0.10.0"
val jacksonVersion = "2.11.4"
val vavrVersion = "0.10.3"
}
2 changes: 1 addition & 1 deletion src/main/java/fr/maif/json/Json.java
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ public static ArrayNode arr(String ...nodes) {
* @return the field name / value pair
*/
public static <T> JsPair $(String field, Option<T> value, JsonWrite<T> jsonWrite) {
return new JsPair(field, value.map(jsonWrite::write));
return new JsPair(field, Objects.isNull(value) ? Option.none() : value.map(jsonWrite::write));
}
/**
* An object field for any optional value using a writer
Expand Down

0 comments on commit eee7c74

Please sign in to comment.