Author: vmassol
Date: 2007-11-14 20:34:01 +0100 (Wed, 14 Nov 2007)
New Revision: 5877

Modified:
   
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocumentArchive.java
Log:
XWIKI-1851:  Cannot upgrade XE 1.1.2 to XE 1.2.x: premature end of file error

Added comment giving some explanation (althought the explanation is still not 
good enough as we need to explain why we're keeping that invalid revision 
instead of renumbering them for example).

Modified: 
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocumentArchive.java
===================================================================
--- 
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocumentArchive.java
      2007-11-14 19:13:52 UTC (rev 5876)
+++ 
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/doc/XWikiDocumentArchive.java
      2007-11-14 19:34:01 UTC (rev 5877)
@@ -194,6 +194,8 @@
                     Version ver = nodeInfo.getVersion();
                     String xml = archive.getRevisionAsString(ver);
                     XWikiDocument doc = new XWikiDocument();
+                    // Some time in the past there was a bug in XWiki where 
version were starting at 1.2. When this
+                    // happens the returned xml has a value of "\n". Thus we 
simply skip it.
                     if (xml.length()>1) {
                         doc.fromXML(xml);
                         // set this fields from old document

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to