Skip to content
Permalink
Browse files
refactor: remove warnings (DEV-621) (#2015)
  • Loading branch information
subotic committed Mar 9, 2022
1 parent e3d576c commit 70630f17de1d684b15726a9e28cf8e58193104cf
@@ -1485,6 +1485,8 @@ class InferringGravsearchTypeInspector(nextInspector: Option[GravsearchTypeInspe
rightEntity = rightIriRef,
usageIndex = usageIndex
)

case _ => throw GravsearchException(s"An invalid `rightEntity` with value: $rightEntity was used.")
}

case _ =>
@@ -216,7 +216,7 @@ class CkanResponderV1(responderData: ResponderData) extends Responder(responderD

result = limit match {
case Some(n) if n > 0 => bilder.take(n)
case None => bilder
case _ => bilder
}

} yield result
@@ -344,7 +344,7 @@ class CkanResponderV1(responderData: ResponderData) extends Responder(responderD

result = limit match {
case Some(n) if n > 0 => booksWithPages.take(n)
case None => booksWithPages
case _ => booksWithPages
}

} yield result
@@ -412,7 +412,7 @@ class CkanResponderV1(responderData: ResponderData) extends Responder(responderD
resIri = resourcesResponseRows.groupBy(_.rowMap("s")).keys.toVector
result = limit match {
case Some(n) if n > 0 => resIri.take(n)
case None => resIri
case _ => resIri
}
} yield result

@@ -1752,7 +1752,7 @@ class ResourcesResponderV2(responderData: ResponderData) extends ResponderWithSt
}
}

case None =>
case _ =>
throw InconsistentRepositoryDataException(
s"Resource $gravsearchTemplateIri has no property ${OntologyConstants.KnoraBase.HasTextFileValue}"
)
@@ -1828,7 +1828,7 @@ class ResourcesResponderV2(responderData: ResponderData) extends ResponderWithSt
)
}

case None => throw BadRequestException(s"$textProperty is expected to occur once on $resourceIri")
case _ => throw BadRequestException(s"$textProperty is expected to occur once on $resourceIri")
}

/**
@@ -224,9 +224,9 @@ class StandoffResponderV2(responderData: ResponderData) extends Responder(respon
}
}

case None =>
case _ =>
throw InconsistentRepositoryDataException(
s"${OntologyConstants.KnoraBase.XSLTransformation} has no property ${OntologyConstants.KnoraBase.HasTextFileValue}"
s"${OntologyConstants.KnoraBase.XSLTransformation} has no or more than one property ${OntologyConstants.KnoraBase.HasTextFileValue}"
)
}

@@ -48,7 +48,7 @@ class StoreRouteADM(routeData: KnoraRouteData)
post {
/* ResetTriplestoreContent */
entity(as[Seq[RdfDataObject]]) { apiRequest =>
parameter('prependdefaults.as[Boolean] ? true) { prependDefaults => requestContext =>
parameter(Symbol("prependdefaults").as[Boolean] ? true) { prependDefaults => requestContext =>
val msg = ResetTriplestoreContentRequestADM(
rdfDataObjects = apiRequest,
prependDefaults = prependDefaults,
@@ -28,7 +28,7 @@ class CkanRouteV1(routeData: KnoraRouteData) extends KnoraRoute(routeData) with
featureFactoryConfig = featureFactoryConfig
)
params = requestContext.request.uri.query().toMap
project: Option[Seq[String]] = params.get("project").map(_.split(","))
project: Option[Seq[String]] = params.get("project").map(_.split(",").toSeq)
limit: Option[Int] = params.get("limit").map(_.toInt)
info: Boolean = params.getOrElse("info", false) == true
} yield CkanRequestV1(
@@ -1135,7 +1135,7 @@ class ResourcesRouteV1(routeData: KnoraRouteData) extends KnoraRoute(routeData)
timeVal,
throw BadRequestException(s"Invalid decimal value in element '${node.label}: '$timeVal'")
)
}
}.toSeq

CreateResourceValueV1(interval_value = Some(tVals))

@@ -83,7 +83,7 @@ class AuthenticationRouteV2(routeData: KnoraRouteData)
}
} ~
post { // called by html login interface (necessary for IIIF Authentication API support)
formFields('username, 'password) { (username, password) => requestContext =>
formFields(Symbol("username"), Symbol("password")) { (username, password) => requestContext =>
{
requestContext.complete {
doLoginV2(
@@ -268,6 +268,7 @@ class ValuesV1R2RSpec extends R2RSpec {

val (mostRecentVersion, originalVersion) = versionHistory match {
case JsArray(Vector(mostRecent, original)) => (mostRecent.asJsObject.fields, original.asJsObject.fields)
case _ => fail("expected an array, but got something else.")
}

assert(

0 comments on commit 70630f1

Please sign in to comment.