golimpio / java-swing-ayatana

Automatically exported from code.google.com/p/java-swing-ayatana
0 stars 0 forks source link

ArrayIndexOutOfBoundsException on Netbeans startup. #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago
sorry, forget this.

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

GoogleCodeExporter commented 9 years ago
The desktopfile utility won't have more support

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