Cleanup (warnings; typos)

GitOrigin-RevId: 91378d2e47e9e677376f5960644420b5f897b080
This commit is contained in:
Roman Shevchenko
2019-10-09 16:03:53 +00:00
committed by intellij-monorepo-bot
parent 22824f2490
commit f0a2b96bef
2 changed files with 7 additions and 6 deletions
@@ -251,8 +251,8 @@ public class DeleteHandler {
//noinspection deprecation
element.checkDelete();
}
catch (IncorrectOperationException ex) {
Messages.showMessageDialog(project, ex.getMessage(), CommonBundle.getErrorTitle(), Messages.getErrorIcon());
catch (IncorrectOperationException e) {
Messages.showMessageDialog(project, e.getMessage(), CommonBundle.getErrorTitle(), Messages.getErrorIcon());
return;
}
@@ -260,9 +260,9 @@ public class DeleteHandler {
try {
element.delete();
}
catch (IncorrectOperationException ex) {
catch (IncorrectOperationException e) {
ApplicationManager.getApplication().invokeLater(
() -> Messages.showMessageDialog(project, ex.getMessage(), CommonBundle.getErrorTitle(), Messages.getErrorIcon()));
() -> Messages.showMessageDialog(project, e.getMessage(), CommonBundle.getErrorTitle(), Messages.getErrorIcon()));
}
});
}
@@ -100,8 +100,8 @@ public class FileUtilRt {
private static Method ourPathToFileMethod;
private static Method ourAttributesIsOtherMethod;
private static Object ourDeletionVisitor;
private static Class ourNoSuchFileExceptionClass;
private static Class ourAccessDeniedExceptionClass;
private static Class<?> ourNoSuchFileExceptionClass;
private static Class<?> ourAccessDeniedExceptionClass;
static {
boolean initSuccess = false;
@@ -306,6 +306,7 @@ public class FileUtilRt {
return result.toString();
}
@SuppressWarnings("DuplicatedCode")
private static int processRoot(@NotNull String path, @NotNull Appendable result) {
try {
if (SystemInfoRt.isWindows && path.length() > 1 && path.charAt(0) == '/' && path.charAt(1) == '/') {