/*
- * Copyright 2000-2009 JetBrains s.r.o.
+ * Copyright 2000-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import com.intellij.CommonBundle;
import org.jetbrains.annotations.NonNls;
+import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;
import java.lang.ref.Reference;
private QuickFixBundle() {
}
- public static String message(@NonNls @PropertyKey(resourceBundle = BUNDLE)String key, Object... params) {
+ public static String message(@NotNull @NonNls @PropertyKey(resourceBundle = BUNDLE)String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
private static ResourceBundle getBundle() {
- ResourceBundle bundle = null;
- if (ourBundle != null) bundle = ourBundle.get();
+ ResourceBundle bundle = com.intellij.reference.SoftReference.dereference(ourBundle);
if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<ResourceBundle>(bundle);