rilian-la-te/java-swing-ayatana

ArrayIndexOutOfBoundsException on Netbeans startup.

Closed this issue · 2 comments

I have a .desktop file with "Path=", no value.

Exception:

SEVERE [org.netbeans.core.modules]
java.lang.ArrayIndexOutOfBoundsException: 1
        at org.java.ayatana.DesktopFile.load(DesktopFile.java:394)
        at org.java.ayatana.DesktopFile.<init>(DesktopFile.java:106)
        at org.java.ayatana.DesktopFile.initialize(DesktopFile.java:63)
        at org.nbs.java.ayatana.Installer.restored(Installer.java:81)
        at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:471)


patch:

$ svn diff DesktopFile.java
Index: DesktopFile.java
===================================================================
--- DesktopFile.java    (revision 173)
+++ DesktopFile.java    (working copy)
@@ -387,7 +387,7 @@
                    new FileReader(deskFile));
            String line;
            while ((line = reader.readLine()) != null) {
-               if (line.contains("=") && !line.startsWith("#")) {
+               if (line.contains("=") && !line.startsWith("#") && !line.endsWith("=")) {
                    String param[] = line.split("=");
                    String key = param[0].trim().toLowerCase();
                    String value = param[1].trim();


Original issue reported on code.google.com by Chen.Tin...@gmail.com on 16 Feb 2013 at 7:10

sorry, forget this.

Original comment by Chen.Tin...@gmail.com on 16 Feb 2013 at 7:14

The desktopfile utility won't have more support

Original comment by danjaredg on 3 Dec 2013 at 7:11

  • Changed state: WontFix