Cleanup NoRetryPolicy unnecessary visibility. (#48146)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
Nicola Corti
2024-12-06 12:05:53 -08:00
committed by Facebook GitHub Bot
parent 8793b7d89b
commit ddfa2120ba
@@ -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()
}
}