diff --git a/platform/lang-api/src/com/intellij/codeInspection/ProblemsHolder.java b/platform/lang-api/src/com/intellij/codeInspection/ProblemsHolder.java index 2ad696ce1e9f..a89139a08f70 100644 --- a/platform/lang-api/src/com/intellij/codeInspection/ProblemsHolder.java +++ b/platform/lang-api/src/com/intellij/codeInspection/ProblemsHolder.java @@ -34,7 +34,6 @@ import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.ConcurrentModificationException; import java.util.List; @@ -144,7 +143,14 @@ public class ProblemsHolder { String message; if (reference instanceof EmptyResolveMessageProvider) { String pattern = ((EmptyResolveMessageProvider)reference).getUnresolvedMessagePattern(); - message = BundleBase.format(pattern, reference.getCanonicalText()); // avoid double formatting + try { + message = BundleBase.format(pattern, reference.getCanonicalText()); // avoid double formatting + } + catch (IllegalArgumentException ex) { + // unresolvedMessage provided by third-party reference contains wrong format string (e.g. {}), tolerate it + message = pattern; + LOG.info(pattern); + } } else { message = CodeInsightBundle.message("error.cannot.resolve.default.message", reference.getCanonicalText());