/hg/icedtea-web: When system desktop integration directory do no...

jvanek at icedtea.classpath.org jvanek at icedtea.classpath.org
Wed Jan 4 10:27:27 UTC 2017


changeset feceef9f3303 in /hg/icedtea-web
details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=feceef9f3303
author: Jiri Vanek <jvanek at redhat.com>
date: Wed Jan 04 11:34:20 2017 +0100

	When system desktop integration directory do not exists, do not die.

	* netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/JListUtils.java: workarounded NPE when listFiles was invoked on non-existing dir, and so returned null instead of empty array.


diffstat:

 ChangeLog                                                                       |  8 ++++++++
 netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/JListUtils.java |  6 ++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diffs (38 lines):

diff -r edef16b35418 -r feceef9f3303 ChangeLog
--- a/ChangeLog	Wed Jan 04 11:05:51 2017 +0100
+++ b/ChangeLog	Wed Jan 04 11:34:20 2017 +0100
@@ -1,3 +1,11 @@
+2017-01-04  Jiri Vanek <jvanek at redhat.com>
+
+	When system desktop integration directory do not exists, do not die.
+	* netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/JListUtils.java:
+	workarounded NPE when listFiles was invoked on non-existing dir, and so returned
+	null instead of empty array.
+	
+
 2017-01-04  Jiri Vanek <jvanek at redhat.com>
 
 	* netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: "can not open" dialog
diff -r edef16b35418 -r feceef9f3303 netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/JListUtils.java
--- a/netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/JListUtils.java	Wed Jan 04 11:05:51 2017 +0100
+++ b/netx/net/sourceforge/jnlp/controlpanel/desktopintegrationeditor/JListUtils.java	Wed Jan 04 11:34:20 2017 +0100
@@ -136,6 +136,9 @@
                     return mask.matcher(name).matches();
                 }
             });
+            if (list == null) {
+                list = new File[0];
+            }
             return list;
         }
 
@@ -152,6 +155,9 @@
             if (list == null) {
                 populateList();
             }
+            if (list.length == 0) {
+                return "??";
+            }
             return list[index];
         }
 


More information about the distro-pkg-dev mailing list