mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
add a contract
GitOrigin-RevId: 39e8c09ae20d0fa8d0ad2c3dfc1957991c962b55
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b4d5235ad4
commit
b7691795b2
@@ -2,10 +2,7 @@
|
||||
package com.intellij;
|
||||
|
||||
import com.intellij.openapi.util.SystemInfo;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.annotations.PropertyKey;
|
||||
import org.jetbrains.annotations.*;
|
||||
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.SoftReference;
|
||||
@@ -37,6 +34,7 @@ public final class CommonBundle extends BundleBase {
|
||||
return bundle;
|
||||
}
|
||||
|
||||
@Contract("null, _, _, _ -> param3")
|
||||
public static String messageOrDefault(@Nullable ResourceBundle bundle, @NotNull String key, @Nullable String defaultValue, @NotNull Object... params) {
|
||||
if (bundle == null) {
|
||||
return defaultValue;
|
||||
@@ -44,9 +42,7 @@ public final class CommonBundle extends BundleBase {
|
||||
else if (!bundle.containsKey(key)) {
|
||||
return postprocessValue(bundle, useDefaultValue(bundle, key, defaultValue), params);
|
||||
}
|
||||
else {
|
||||
return BundleBase.messageOrDefault(bundle, key, defaultValue, params);
|
||||
}
|
||||
return BundleBase.messageOrDefault(bundle, key, defaultValue, params);
|
||||
}
|
||||
|
||||
@Nls
|
||||
|
||||
Reference in New Issue
Block a user