diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 537013a0a3..17c23f958d 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -1,2 +1,5 @@ # Scala Steward: Reformat with scalafmt 3.8.0 870d2491e283d5f6e329fa64ce0725f512dcadae + +# Scala Steward: Reformat with scalafmt 3.8.2 +318a790409a0dab067a060031cbc7c77ab2168e2 diff --git a/.scalafmt.conf b/.scalafmt.conf index fa9faaeb95..ce2f8b2f5d 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.8.1" +version = "3.8.2" runner.dialect = scala3 maxColumn = 120 align.preset = most diff --git a/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala b/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala index 9f7ff090d7..d8b0fcead1 100644 --- a/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala +++ b/integration/src/test/scala/org/knora/webapi/responders/v2/OntologyResponderV2Spec.scala @@ -436,7 +436,7 @@ class OntologyResponderV2Spec extends CoreSpec with ImplicitSender { "", // rdf:type anything:Thing "", // rdf:type anything:BlueThing, a subclass of anything:Thing "", // a subclass of anything:Thing in another ontology - "",// a subproperty of anything:hasOtherThing in another ontology + "", // a subproperty of anything:hasOtherThing in another ontology ) expectedSubjects.forall(s => errorMsg.contains(s)) should ===(true) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 9b352b7bc0..8c21ebf6ac 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -21,7 +21,7 @@ object Dependencies { val PekkoActorVersion = "1.0.2" val PekkoHttpVersion = "1.0.1" val JenaVersion = "5.0.0" - val Rdf4jVersion = "4.3.11" + val Rdf4jVersion = "4.3.12" val ZioConfigVersion = "4.0.2" val ZioLoggingVersion = "2.3.0" @@ -29,7 +29,7 @@ object Dependencies { val ZioMetricsConnectorsVersion = "2.3.1" val ZioPreludeVersion = "1.0.0-RC27" val ZioSchemaVersion = "0.2.0" - val ZioVersion = "2.1.1" + val ZioVersion = "2.1.3" // ZIO val zio = "dev.zio" %% "zio" % ZioVersion @@ -80,7 +80,10 @@ object Dependencies { val jwtSprayJson = "com.github.jwt-scala" %% "jwt-zio-json" % "10.0.1" // jwtSprayJson -> 9.0.2 is the latest version that's compatible with spray-json; if it wasn't for spray, this would be Scala 3 compatible val springSecurityCore = - "org.springframework.security" % "spring-security-core" % "6.3.0" exclude ("commons-logging", "commons-logging") exclude ("org.springframework", "spring-aop") + "org.springframework.security" % "spring-security-core" % "6.3.0" exclude ( + "commons-logging", + "commons-logging", + ) exclude ("org.springframework", "spring-aop") val bouncyCastle = "org.bouncycastle" % "bcprov-jdk15to18" % "1.78.1" // caching @@ -112,7 +115,7 @@ object Dependencies { // found/added by the plugin but deleted anyway val commonsLang3 = "org.apache.commons" % "commons-lang3" % "3.14.0" - val tapirVersion = "1.10.8" + val tapirVersion = "1.10.9" val tapir = Seq( "com.softwaremill.sttp.tapir" %% "tapir-pekko-http-server" % tapirVersion, diff --git a/webapi/src/main/scala/dsp/valueobjects/Iri.scala b/webapi/src/main/scala/dsp/valueobjects/Iri.scala index e4f69152ba..2ddc2f1656 100644 --- a/webapi/src/main/scala/dsp/valueobjects/Iri.scala +++ b/webapi/src/main/scala/dsp/valueobjects/Iri.scala @@ -26,7 +26,7 @@ object Iri { val urlValidator = new UrlValidator( Array("http", "https"), // valid URL schemes - UrlValidator.ALLOW_LOCAL_URLS,// local URLs are URL-encoded IRIs as part of the whole URL + UrlValidator.ALLOW_LOCAL_URLS, // local URLs are URL-encoded IRIs as part of the whole URL ) object KnoraInternal { diff --git a/webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala b/webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala index 5b45056647..a91d15eb2e 100644 --- a/webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala +++ b/webapi/src/main/scala/org/knora/webapi/responders/v2/ResourcesResponderV2.scala @@ -1867,13 +1867,9 @@ final case class ResourcesResponderV2( // find the version of resource which has a value with previousValueIri versionDateAndPreviousVersion <- ZIO - .fromOption( - allResourceVersions.find { case (_, resource) => - resource.values.exists(item => - item._1 == propertyIri && item._2.exists(value => value.valueIri == previousValueIri), - ) - }, - ) + .fromOption(allResourceVersions.find { case (_, resource) => + resource.values.get(propertyIri).exists(_.exists(_.valueIri == previousValueIri)) + }) .orElseFail(NotFoundException(s"Could not find the previous value of ${currentVersionOfValue.valueIri}")) (previousVersionDate, previousVersionOfResource) = versionDateAndPreviousVersion diff --git a/webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/CardinalityHandler.scala b/webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/CardinalityHandler.scala index 0cc92dfd47..335a99fdc6 100644 --- a/webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/CardinalityHandler.scala +++ b/webapi/src/main/scala/org/knora/webapi/responders/v2/ontology/CardinalityHandler.scala @@ -120,7 +120,7 @@ final case class CardinalityHandler( // turn the propertyIri into a ReadPropertyInfoV2 .map(propertyIri => cacheData.ontologies(propertyIri.getOntologyFromEntity).properties(propertyIri)) .filter(_.isLinkProp) // we are only interested in link properties - .map(_.entityInfoContent.propertyIri),// turn whatever is left back to a propertyIri + .map(_.entityInfoContent.propertyIri), // turn whatever is left back to a propertyIri ) .fold(e => throw e.head, v => v) @@ -262,7 +262,7 @@ final case class CardinalityHandler( // turn the propertyIri into a ReadPropertyInfoV2 .map(propertyIri => cacheData.ontologies(propertyIri.getOntologyFromEntity).properties(propertyIri)) .filter(_.isLinkProp) // we are only interested in link properties - .map(_.entityInfoContent.propertyIri),// turn whatever is left back to a propertyIri + .map(_.entityInfoContent.propertyIri), // turn whatever is left back to a propertyIri ) .fold(e => throw e.head, v => v)