svn commit: r13557 - trunk/src_new/org/argouml/persistence/ZargoFilePersister.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2007-09-17 13:52:51-0700
New Revision: 13557

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

Log:
Explain the commented out code and add a junit test to prevent reoccurance of bug.

Modified: trunk/src_new/org/argouml/persistence/ZargoFilePersister.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/persistence/ZargoFilePersister.java?view=diff&rev=13557&p1=trunk/src_new/org/argouml/persistence/ZargoFilePersister.java&p2=trunk/src_new/org/argouml/persistence/ZargoFilePersister.java&r1=13556&r2=13557
==============================================================================
--- trunk/src_new/org/argouml/persistence/ZargoFilePersister.java	(original)
+++ trunk/src_new/org/argouml/persistence/ZargoFilePersister.java	2007-09-17 13:52:51-0700
@@ -224,14 +224,24 @@
             throw new OpenException(e);
         }
 
-        Project p;
-//        if (!checkVersion(fileVersion, releaseVersion)) {
+        
+        
+        // TODO: The commented code below was commented out by Bob Tarling
+        // in order to resolve bugs 4845 and 4857. Hopefully we can
+        // determine the cause and reintroduce.
+        
+        //boolean upgradeRequired = !checkVersion(fileVersion, releaseVersion)
+        boolean upgradeRequired = true;
+        
+        LOG.info("Loading zargo file of version " + fileVersion);
+        
+        final Project p;
+        if (upgradeRequired) {
             File combinedFile = zargoToUml(file, progressMgr);
             p = super.doLoad(file, combinedFile, progressMgr);
-//        } else {
-//            LOG.info("Loading uml file of version " + fileVersion);
-//            p = loadFromZargo(file, progressMgr);
-//        }
+        } else {
+            p = loadFromZargo(file, progressMgr);
+        }
 
         progressMgr.nextPhase();
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.