X-Git-Url: https://git.jetbrains.org/?p=idea%2Fcommunity.git;a=blobdiff_plain;f=platform%2Fanalysis-impl%2Fsrc%2Fcom%2Fintellij%2FcodeInsight%2Fdaemon%2FQuickFixBundle.java;h=fbcef3ca6a3f83862cb31617915ef9f424e8c59d;hp=508aa95cbd89beb62be770e1f6281c0e83303625;hb=1381b541b0bad97e15302309d3eaf7740a396c59;hpb=a7430bf7715a0bbea0e67a8827c2fcca3711aaa8 diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/QuickFixBundle.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/QuickFixBundle.java index 508aa95cbd89..fbcef3ca6a3f 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/QuickFixBundle.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/QuickFixBundle.java @@ -1,5 +1,5 @@ /* - * 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. @@ -17,6 +17,7 @@ package com.intellij.codeInsight.daemon; import com.intellij.CommonBundle; import org.jetbrains.annotations.NonNls; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.PropertyKey; import java.lang.ref.Reference; @@ -34,13 +35,12 @@ public class QuickFixBundle { 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(bundle);