diff --git a/platform/platform-api/src/com/intellij/openapi/diagnostic/ErrorReportSubmitter.java b/platform/platform-api/src/com/intellij/openapi/diagnostic/ErrorReportSubmitter.java
index 6308fc2b4c57..92fe36f9642f 100644
--- a/platform/platform-api/src/com/intellij/openapi/diagnostic/ErrorReportSubmitter.java
+++ b/platform/platform-api/src/com/intellij/openapi/diagnostic/ErrorReportSubmitter.java
@@ -37,13 +37,12 @@ public abstract class ErrorReportSubmitter implements PluginAware {
/**
* @return an action text to be used in Error Reporter user interface, e.g. "Report to JetBrains".
*/
- @NotNull
- public abstract @NlsActions.ActionText String getReportActionText();
+ public abstract @NlsActions.ActionText @NotNull String getReportActionText();
/**
* @return a text of a privacy notice to be shown in the dialog (in HTML; links are allowed).
*/
- public @Nullable @DetailedDescription String getPrivacyNoticeText() {
+ public @DetailedDescription @Nullable String getPrivacyNoticeText() {
return null;
}
diff --git a/platform/platform-impl/src/com/intellij/diagnostic/IdeErrorsDialog.java b/platform/platform-impl/src/com/intellij/diagnostic/IdeErrorsDialog.java
index fbecc67c27ca..c551194f2581 100644
--- a/platform/platform-impl/src/com/intellij/diagnostic/IdeErrorsDialog.java
+++ b/platform/platform-impl/src/com/intellij/diagnostic/IdeErrorsDialog.java
@@ -63,6 +63,7 @@ import java.util.zip.CRC32;
import static com.intellij.openapi.util.Pair.pair;
import static java.awt.GridBagConstraints.*;
+import static java.util.Objects.requireNonNullElse;
public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListener, DataProvider {
private static final Logger LOG = Logger.getInstance(IdeErrorsDialog.class);
@@ -613,7 +614,7 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
Container parentComponent = getRootPane();
if (dialogClosed) {
IdeFrame frame = ComponentUtil.getParentOfType((Class extends IdeFrame>)IdeFrame.class, (Component)parentComponent);
- parentComponent = frame != null ? frame.getComponent() : WindowManager.getInstance().findVisibleFrame();
+ parentComponent = requireNonNullElse(frame != null ? frame.getComponent() : WindowManager.getInstance().findVisibleFrame(), parentComponent);
}
boolean accepted = submitter.submit(events, message.getAdditionalInfo(), parentComponent, reportInfo -> {
@@ -641,7 +642,6 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
String message;
if (pluginsToDisable.size() == 1) {
IdeaPluginDescriptor plugin = pluginsToDisable.iterator().next();
- //noinspection HardCodedStringLiteral
message = "" +
DiagnosticBundle.message("error.dialog.disable.prompt", plugin.getName()) + "
" +
DiagnosticBundle.message(hasDependents ? "error.dialog.disable.prompt.deps" : "error.dialog.disable.prompt.lone") + "
" +
@@ -649,7 +649,6 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
"";
}
else {
- //noinspection HardCodedStringLiteral
message = "" +
DiagnosticBundle.message("error.dialog.disable.prompt.multiple") + "
" +
DiagnosticBundle.message(hasDependents ? "error.dialog.disable.prompt.deps.multiple" : "error.dialog.disable.prompt.lone.multiple") + "
" +