Skip to content

Commit

Permalink
refactor(DeliveryStatus): made DeliveryStatus.forHttpResponseCode Jvm…
Browse files Browse the repository at this point in the history
…Static for easier use in Java
  • Loading branch information
lemnik committed Oct 24, 2024
1 parent 810e12c commit 997be71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions bugsnag-android-core/api/bugsnag-android-core.api
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ public final class com/bugsnag/android/DeliveryStatus : java/lang/Enum {
public static final field DELIVERED Lcom/bugsnag/android/DeliveryStatus;
public static final field FAILURE Lcom/bugsnag/android/DeliveryStatus;
public static final field UNDELIVERED Lcom/bugsnag/android/DeliveryStatus;
public static final fun forHttpResponseCode (I)Lcom/bugsnag/android/DeliveryStatus;
public static fun valueOf (Ljava/lang/String;)Lcom/bugsnag/android/DeliveryStatus;
public static fun values ()[Lcom/bugsnag/android/DeliveryStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ enum class DeliveryStatus {
FAILURE;

companion object {
@JvmStatic
fun forHttpResponseCode(responseCode: Int): DeliveryStatus {
return when {
responseCode in HTTP_OK..299 -> DELIVERED
Expand Down

0 comments on commit 997be71

Please sign in to comment.