Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove @deprecation annotations #2937

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import dsp.errors.InconsistentRepositoryDataException
* @tparam A the type of keys in the map.
* @tparam B the type of values in the map.
*/
@deprecated("Deprecated!")
class ErrorHandlingMap[A, B](
toWrap: Map[A, B],
private val errorTemplateFun: A => String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ case class JsonLDObject(value: Map[String, JsonLDValue]) extends JsonLDValue {
* @tparam T the type returned by the validation function.
* @return the return value of the validation function.
*/
@deprecated("Use getIri() instead")
@throws[BadRequestException]
def toIri[T](validationFun: (String, => Nothing) => T): T =
getIri match {
Expand Down Expand Up @@ -526,7 +525,6 @@ case class JsonLDObject(value: Map[String, JsonLDValue]) extends JsonLDValue {
* @tparam T the type of the validation function's return value.
* @return the return value of the validation function.
*/
@deprecated("Use getString(String) instead")
@throws[BadRequestException]
def requireStringWithValidation[T](key: String, validationFun: (String, => Nothing) => T): T = {
val str: String = getRequiredString(key).fold(msg => throw BadRequestException(msg), identity)
Expand Down Expand Up @@ -566,7 +564,6 @@ case class JsonLDObject(value: Map[String, JsonLDValue]) extends JsonLDValue {
* @tparam T the type of the validation function's return value.
* @return the return value of the validation function, or `None` if the value was not present.
*/
@deprecated("Use getString(String) instead")
@throws[BadRequestException]
def maybeStringWithValidation[T](key: String, validationFun: (String, => Nothing) => T): Option[T] =
getString(key)
Expand All @@ -582,7 +579,6 @@ case class JsonLDObject(value: Map[String, JsonLDValue]) extends JsonLDValue {
* @param key the key of the required value.
* @return the validated IRI.
*/
@deprecated("use getIdIriInObject(String) instead")
@throws[BadRequestException]
def requireIriInObject[T](key: String, validationFun: (String, => Nothing) => T): T =
getRequiredObject(key)
Expand All @@ -602,7 +598,6 @@ case class JsonLDObject(value: Map[String, JsonLDValue]) extends JsonLDValue {
* @tparam T the type of the validation function's return value.
* @return the return value of the validation function, or `None` if the value was not present.
*/
@deprecated("use getIdIriInObject(String) instead")
def maybeIriInObject[T](key: String, validationFun: (String, => Nothing) => T): Option[T] =
getObject(key)
.fold(e => throw BadRequestException(e), identity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,12 @@ private object ReorderPatternsByDependency {
* @return the optimised query patterns.
*/
def reorderPatternsByDependency(patterns: Seq[QueryPattern]): Seq[QueryPattern] = {
val (statementPatterns: Seq[StatementPattern], otherPatterns: Seq[QueryPattern]) =
patterns.partition {
case _: StatementPattern => true
case _ => false
}
val (statementPatterns, otherPatterns) = patterns.partition {
case _: StatementPattern => true
case _ => false
}

val sortedStatementPatterns = createAndSortGraph(statementPatterns)
val sortedStatementPatterns = createAndSortGraph(statementPatterns.asInstanceOf[Seq[StatementPattern]])

val sortedOtherPatterns = otherPatterns.map {
case unionPattern: UnionPattern =>
Expand Down