svn commit: r13290 - trunk/src_new/org/argouml/persistence/UmlFilePersister.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-08-09 17:26:09-0700
New Revision: 13290

Modified:
   trunk/src_new/org/argouml/persistence/UmlFilePersister.java

Log:
Restore missing line

Modified: trunk/src_new/org/argouml/persistence/UmlFilePersister.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/persistence/UmlFilePersister.java?view=diff&rev=13290&p1=trunk/src_new/org/argouml/persistence/UmlFilePersister.java&p2=trunk/src_new/org/argouml/persistence/UmlFilePersister.java&r1=13289&r2=13290
==============================================================================
--- trunk/src_new/org/argouml/persistence/UmlFilePersister.java	(original)
+++ trunk/src_new/org/argouml/persistence/UmlFilePersister.java	2007-08-09 17:26:09-0700
@@ -533,7 +533,11 @@
             reader = new BufferedReader(new InputStreamReader(inputStream, 
                     Argo.getEncoding()));
             String rootLine = reader.readLine();
-            while (!rootLine.trim().startsWith("<argo ")) {
+            while (rootLine != null && !rootLine.trim().startsWith("<argo ")) {
+                rootLine = reader.readLine();
+            }
+            if (rootLine == null) {
+                return 0;
             }
             return Integer.parseInt(getVersion(rootLine));
         } catch (IOException e) {
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.