Skip to content

Commit

Permalink
remove v4.1.0 deprecated JsonApiObject.addError()
Browse files Browse the repository at this point in the history
  • Loading branch information
frett committed Jan 9, 2025
1 parent 33ce3e9 commit 27aead8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
import java.util.Map;
import java.util.Set;

import kotlin.collections.CollectionsKt;

public final class JsonApiConverter {
public static final class Builder {
private final List<Class<?>> mClasses = new ArrayList<>();
Expand Down Expand Up @@ -224,7 +226,7 @@ public <T> JsonApiObject<T> fromJson(@NonNull final String json, @NonNull final
for (int i = 0; i < errors.length(); i++) {
final JsonApiError error = errorFromJson(errors.optJSONObject(i));
if (error != null) {
output.addError(error);
output.setErrors(CollectionsKt.plus(output.getErrors(), error));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,4 @@ open class JsonApiObject<T : Any> private constructor(

@get:JvmName("hasErrors")
val hasErrors get() = errors.isNotEmpty()

@Deprecated("Since v4.1.0, use errors += error instead", ReplaceWith("errors += error"))
fun addError(error: JsonApiError) {
errors += error
}
}

0 comments on commit 27aead8

Please sign in to comment.