Author: batosai
Date: 2008-11-09 17:32:44 +0000 (Sun, 09 Nov 2008)
New Revision: 23445

Modified:
   trunk/plugins/WoT/WoT.java
Log:
Workaround bug #2677.
We simply create the seed identity with a lower number edition so the Fetcher 
thread can fetch it. I'm not proud of that solution, but a clean one would 
require more time that can be better spent.

Modified: trunk/plugins/WoT/WoT.java
===================================================================
--- trunk/plugins/WoT/WoT.java  2008-11-09 16:49:45 UTC (rev 23444)
+++ trunk/plugins/WoT/WoT.java  2008-11-09 17:32:44 UTC (rev 23445)
@@ -9,10 +9,7 @@
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.net.MalformedURLException;
-import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
 import java.util.Map.Entry;

 import javax.xml.parsers.ParserConfigurationException;
@@ -766,7 +763,10 @@
                                seed = Identity.getByURI(db, seedURI);
                        } catch (UnknownIdentityException e) { // Create it.
                                try {
+                                       // Create the seed identity
                                        seed = new Identity(seedURI, "Fetching 
seed identity...", "true");
+                                       // Step down to previous edition as the 
Fetcher is gonna try to fetch next edition
+                                       
seed.setEdition(seed.getRequestURI().getSuggestedEdition() - 1);
                                } catch (Exception e1) { // Should never happen
                                        Logger.error(this, "Seed identity 
creation error", e);
                                        return null;


Reply via email to