Skip to content

Commit

Permalink
Don't have deprecated methods in an unreleased class
Browse files Browse the repository at this point in the history
  • Loading branch information
mpgirro committed May 4, 2021
1 parent e55d3e9 commit dd60da1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
2 changes: 0 additions & 2 deletions api/stalla.api
Original file line number Diff line number Diff line change
Expand Up @@ -1419,8 +1419,6 @@ public final class dev/stalla/model/podcastindex/GeographicLocation {
public final fun getParameters ()Ljava/util/List;
public final fun getUncertainty ()Ljava/lang/Double;
public fun hashCode ()I
public final fun match (Ldev/stalla/model/podcastindex/GeographicLocation;)Z
public final fun match (Ljava/lang/String;)Z
public final fun matches (Ldev/stalla/model/podcastindex/GeographicLocation;)Z
public final fun matches (Ljava/lang/String;)Z
public static fun of (Ljava/lang/String;)Ldev/stalla/model/podcastindex/GeographicLocation;
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/dev/stalla/model/MediaType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public open class MediaType private constructor(

/**
* Checks if `this` type matches a [pattern] type taking into account placeholder symbols `*` and parameters.
* @since 1.1.0
*/
public fun matches(pattern: MediaType?): Boolean {
contract {
Expand All @@ -108,6 +109,7 @@ public open class MediaType private constructor(
/**
* Checks if `this` type matches a [pattern] type taking
* into account placeholder symbols `*` and parameters.
* @since 1.1.0
*/
public fun matches(pattern: String): Boolean = matches(of(pattern))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,6 @@ public class GeographicLocation public constructor(
/** Checks if `this` type matches a [pattern] type taking parameters into account. */
public fun matches(pattern: String): Boolean = matches(of(pattern))

/** Checks if `this` type matches a [pattern] type taking parameters into account. */
@Deprecated(
message = "This method is scheduled for removal in v2.0.0",
replaceWith = ReplaceWith("matches")
)
public fun match(pattern: GeographicLocation?): Boolean = matches(pattern)

/** Checks if `this` type matches a [pattern] type taking parameters into account. */
@Deprecated(
message = "This method is scheduled for removal in v2.0.0",
replaceWith = ReplaceWith("matches")
)
public fun match(pattern: String): Boolean = matches(pattern)

private fun match(parameters1: List<Parameter>, parameters2: List<Parameter>): Boolean {
for (param1 in parameters1) {
val value2 = parameter(param1.key, parameters2)
Expand Down

0 comments on commit dd60da1

Please sign in to comment.