svn commit: r18240 - trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReferenceResolverImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2010-04-12 00:00:38-0700
New Revision: 18240

Modified:
   trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReferenceResolverImpl.java

Log:
Fix NullPointerException

Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReferenceResolverImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReferenceResolverImpl.java?view=diff&pathrev=18240&r1=18239&r2=18240
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReferenceResolverImpl.java	(original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReferenceResolverImpl.java	2010-04-12 00:00:38-0700
@@ -425,10 +425,12 @@
         if (baseDir.exists() && baseDir.isDirectory()) {
             dirs.add(baseDir);
             File[] files = baseDir.listFiles();
-            for (File file : files) {
-                if (file.isDirectory()) {
-                    dirs.add(file);
-                    dirs.addAll(findAllInternalDirectories(file));
+            if (files != null) { // API says not possible, but it happens
+                for (File file : files) {
+                    if (file.isDirectory()) {
+                        dirs.add(file);
+                        dirs.addAll(findAllInternalDirectories(file));
+                    }
                 }
             }
         }

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2566020

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.