Revision: 17943
          http://sourceforge.net/p/gate/code/17943
Author:   ian_roberts
Date:     2014-05-10 22:09:16 +0000 (Sat, 10 May 2014)
Log Message:
-----------
Don't throw an exception if files is null (e.g. if we're trying to view an
OntoRoot Gaz)

Modified Paths:
--------------
    gate/trunk/src/main/gate/gui/GazetteerEditor.java

Modified: gate/trunk/src/main/gate/gui/GazetteerEditor.java
===================================================================
--- gate/trunk/src/main/gate/gui/GazetteerEditor.java   2014-05-10 17:13:36 UTC 
(rev 17942)
+++ gate/trunk/src/main/gate/gui/GazetteerEditor.java   2014-05-10 22:09:16 UTC 
(rev 17943)
@@ -834,10 +834,9 @@
             && !linearDefinition.getLists().contains(name);
         }
       });
-      String[] filenames = new String[files.length];
-      int i = 0;
-      for (File file : files) {
-        filenames[i++] = file.getName();
+      String[] filenames = new String[files == null ? 0 : files.length];
+      for (int i = 0; i < filenames.length; i++) {
+        filenames[i] = files[i].getName();
       }
       Arrays.sort(filenames, collator);
       newListComboBox.setModel(new DefaultComboBoxModel<String>(filenames));

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to