inspect: fix error handling in command line parsing
authorRoland Illig <roland.illig@jetbrains.com>
Thu, 19 May 2022 09:42:28 +0000 (11:42 +0200)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Thu, 19 May 2022 16:14:33 +0000 (16:14 +0000)
Since 2019-08-06, the command line is parsed as a list instead of an
array, which no longer throws an ArrayIndexOutOfBoundsException.

GitOrigin-RevId: 2f808f7bc3af00f361ee62d9a10d312572c7f7f3

platform/inspect/src/com/intellij/codeInspection/InspectionMain.java

index 9c99784ae2545f92b80cca1ec8cabbefad910236..a54255cb9ee369867d90c1705cbcb2259d1f94b1 100644 (file)
@@ -102,7 +102,7 @@ public class InspectionMain implements ApplicationStarter {
         }
       }
     }
-    catch (ArrayIndexOutOfBoundsException e) {
+    catch (IndexOutOfBoundsException e) {
       e.printStackTrace();
       printHelp();
     }