diff --git a/build.sbt b/build.sbt index 1a8729f3a2..9a74b9c345 100644 --- a/build.sbt +++ b/build.sbt @@ -21,7 +21,7 @@ ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-java8-compat" % VersionScheme.Always val commonSettings = Seq( - scalaVersion := "2.12.20", + scalaVersion := "2.13.15", description := "grid", organization := "com.gu", version := "0.1", @@ -75,9 +75,6 @@ val maybeBBCLib: Option[sbt.ProjectReference] = if(bbcBuildProcess) Some(bbcProj lazy val commonLib = project("common-lib").settings( libraryDependencies ++= Seq( - // FIXME - added temporarily to assist code compatible with scala 2.12 and 2.13 - // remove ASAP after completing 2.13 upgrade!!! - "org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0", "com.gu" %% "editorial-permissions-client" % "3.0.0", "com.gu" %% "pan-domain-auth-play_2-8" % "7.0.0", "com.amazonaws" % "aws-java-sdk-iam" % awsSdkVersion, diff --git a/common-lib/src/test/scala/com/gu/mediaservice/model/FileMetadataAggregatorTest.scala b/common-lib/src/test/scala/com/gu/mediaservice/model/FileMetadataAggregatorTest.scala index 305381d035..bbb9915ba9 100644 --- a/common-lib/src/test/scala/com/gu/mediaservice/model/FileMetadataAggregatorTest.scala +++ b/common-lib/src/test/scala/com/gu/mediaservice/model/FileMetadataAggregatorTest.scala @@ -153,9 +153,9 @@ class FileMetadataAggregatorTest extends AnyFlatSpec with Matchers { "xmpMM:History" -> JsArray(Seq( JsArray(Seq( "{'stEvt:softwareAgent':'Adobe Photoshop CC (Macintosh)'}", + "{'stEvt:when':'2018-02-06T16:36:48Z'}", "{'stEvt:action':'created'}", "{'stEvt:instanceID':'xmp.iid:65d63b5e-a24e-4e51-89bd-6693ce193404'}", - "{'stEvt:when':'2018-02-06T16:36:48Z'}", ).map(JsString)), JsArray(Seq( "{'stEvt:action':'saved'}", @@ -167,9 +167,9 @@ class FileMetadataAggregatorTest extends AnyFlatSpec with Matchers { JsArray(Seq( "{'stEvt:action':'saved'}", "{'stEvt:when':'2019-07-04T14:12:26+01:00'}", + "{'stEvt:instanceID':'xmp.iid:adbc5207-3f5b-4480-9e67-ed2a1871deb9'}", "{'stEvt:softwareAgent':'Adobe Photoshop CC 2019 (Macintosh)'}", "{'stEvt:changed':'/'}", - "{'stEvt:instanceID':'xmp.iid:adbc5207-3f5b-4480-9e67-ed2a1871deb9'}", ).map(JsString)), JsArray(Seq( "{'stEvt:parameters':'from application/vnd.adobe.photoshop to image/png'}", diff --git a/thrall/app/lib/elasticsearch/ElasticSearch.scala b/thrall/app/lib/elasticsearch/ElasticSearch.scala index 7b395a4fc8..1d024c94d2 100644 --- a/thrall/app/lib/elasticsearch/ElasticSearch.scala +++ b/thrall/app/lib/elasticsearch/ElasticSearch.scala @@ -639,7 +639,7 @@ class ElasticSearch( val exportsParameter = JsDefined(Json.toJson(exports)).toOption.map { cs: JsValue => // TODO deduplicate with set collections cs.as[JsArray].value.map { c => asNestedMap(c) - } + }.toSeq }.orNull val eventualUpdateResponse = migrationAwareUpdater( @@ -673,7 +673,7 @@ class ElasticSearch( val collectionsParameter = JsDefined(Json.toJson(collections)).toOption.map { cs: JsValue => cs.as[JsArray].value.map { c => asNestedMap(c) - } + }.toSeq }.orNull val eventualUpdateResponse = migrationAwareUpdater(