Cleanup (warnings; formatting)

GitOrigin-RevId: 63c35921c10a0817b2aae36b187b70b89606a267
This commit is contained in:
Roman Shevchenko
2020-12-11 20:26:55 +00:00
committed by intellij-monorepo-bot
parent 9ae1d16f4c
commit e0a339957e
2 changed files with 4 additions and 6 deletions
@@ -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;
}
@@ -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 = "<html>" +
DiagnosticBundle.message("error.dialog.disable.prompt", plugin.getName()) + "<br/>" +
DiagnosticBundle.message(hasDependents ? "error.dialog.disable.prompt.deps" : "error.dialog.disable.prompt.lone") + "<br/><br/>" +
@@ -649,7 +649,6 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
"</html>";
}
else {
//noinspection HardCodedStringLiteral
message = "<html>" +
DiagnosticBundle.message("error.dialog.disable.prompt.multiple") + "<br/>" +
DiagnosticBundle.message(hasDependents ? "error.dialog.disable.prompt.deps.multiple" : "error.dialog.disable.prompt.lone.multiple") + "<br/><br/>" +