cleanup [whats new]: fix warnings and dead code

Signed-off-by: Dmitry Batkovich <dmitry.batkovich@jetbrains.com>

GitOrigin-RevId: 8f8a0023012821cf77cbcfb6ca9df520e8cd8450
This commit is contained in:
Dmitry Batkovich
2026-02-13 13:47:19 +00:00
committed by intellij-monorepo-bot
parent 7dd10b82b1
commit ba48df2800
3 changed files with 5 additions and 10 deletions
@@ -6,12 +6,12 @@ import org.jetbrains.annotations.Nls
import org.jetbrains.annotations.PropertyKey
object WhatsNewBundle {
private const val pathToBundle = "messages.WhatsNewBundle"
private val bundle by lazy { DynamicBundle(WhatsNewBundle::class.java, pathToBundle); }
private const val BUNDLE = "messages.WhatsNewBundle"
private val bundle by lazy { DynamicBundle(WhatsNewBundle::class.java, BUNDLE); }
@Nls
fun message(
@PropertyKey(resourceBundle = pathToBundle) key: String,
@PropertyKey(resourceBundle = BUNDLE) key: String,
vararg params: Any
): String {
return bundle.getMessage(key, *params)
@@ -44,7 +44,7 @@ import kotlinx.coroutines.withContext
import java.net.HttpURLConnection
import java.net.URL
internal abstract class WhatsNewContent() {
internal abstract class WhatsNewContent {
companion object {
suspend fun getWhatsNewContent(): WhatsNewContent? {
return if (WhatsNewInVisionContentProvider.getInstance().isAvailable() &&
@@ -57,10 +57,6 @@ internal abstract class WhatsNewContent() {
ExternalProductResourceUrls.getInstance().whatIsNewPageUrl?.toDecodedForm()?.let { WhatsNewUrlContent(it) }
}
}
suspend fun hasWhatsNewContent() = WhatsNewInVisionContentProvider.getInstance().isAvailable()
|| ExternalProductResourceUrls.getInstance().whatIsNewPageUrl != null
}
// Year and release have to be strings, because this is the ApplicationInfo.xml format.
@@ -169,7 +165,7 @@ internal class WhatsNewVisionContent(val contentProvider: WhatsNewInVisionConten
const val WHATS_NEW_VISION_SCHEME = "whatsnew-vision"
const val LOCALHOST = "localhost"
private const val THEME_KEY = "\$__VISION_PAGE_SETTINGS_THEME__$"
private const val THEME_KEY = $$"$__VISION_PAGE_SETTINGS_THEME__$"
private const val DARK_THEME = "dark"
private const val LIGHT_THEME = "light"
@@ -81,7 +81,6 @@ internal class WhatsNewStatus {
}
internal class WhatsNewShowOnStartCheckService(private val environment: WhatsNewEnvironmentAccessor) : ProjectActivity {
@Suppress("unused") // used by the component container
constructor() : this(WhatsNewEnvironmentAccessorImpl())
private val wasStarted = AtomicBoolean(false)