Skip to content

Commit

Permalink
Cleanup NoRetryPolicy unnecessary visibility. (#48146)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #48146

The NoRetryPolicy class is `internal`. Having those `public` modifiers on methods has no effect
and can be safely removed.

Changelog:
[Internal] [Changed] -

Reviewed By: fabriziocucci

Differential Revision: D66875443

fbshipit-source-id: 64c63c7000617cf94c36ce3d25927d3a270ac370
  • Loading branch information
cortinico authored and facebook-github-bot committed Dec 6, 2024
1 parent 8793b7d commit ddfa212
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ package com.facebook.react.jstasks

internal class NoRetryPolicy private constructor() : HeadlessJsTaskRetryPolicy {

override public fun canRetry(): Boolean = false
override fun canRetry(): Boolean = false

override public fun getDelay(): Int {
override fun getDelay(): Int {
throw IllegalStateException("Should not retrieve delay as canRetry is: ${canRetry()}")
}

override public fun update(): HeadlessJsTaskRetryPolicy {
override fun update(): HeadlessJsTaskRetryPolicy {
throw IllegalStateException("Should not update as canRetry is: ${canRetry()}")
}

// Class is immutable so no need to copy
override public fun copy(): HeadlessJsTaskRetryPolicy = this
override fun copy(): HeadlessJsTaskRetryPolicy = this

public companion object {
@JvmField public val INSTANCE: NoRetryPolicy = NoRetryPolicy()
companion object {
@JvmField val INSTANCE: NoRetryPolicy = NoRetryPolicy()
}
}

0 comments on commit ddfa212

Please sign in to comment.