Author: batosai
Date: 2008-09-27 15:31:52 +0000 (Sat, 27 Sep 2008)
New Revision: 22861

Modified:
   trunk/plugins/WoT/WoT.java
Log:
Create a default OwnIdentity if none exists. Should speed up plugin usability 
for newbies.

Modified: trunk/plugins/WoT/WoT.java
===================================================================
--- trunk/plugins/WoT/WoT.java  2008-09-27 15:25:31 UTC (rev 22860)
+++ trunk/plugins/WoT/WoT.java  2008-09-27 15:31:52 UTC (rev 22861)
@@ -122,6 +122,15 @@
                        return;
                }

+               // Create a default OwnIdentity if none exists. Should speed up 
plugin usability for newbies
+               if(OwnIdentity.getNbOwnIdentities(db) == 0) {
+                       try {
+                               createIdentity("Anonymous", "true", "testing");
+                       } catch (Exception e) {
+                               Logger.error(this, "Error creating default 
identity : ", e);
+                       }
+               }
+               
                // Start the inserter thread
                inserter = new IdentityInserter(db, client, 
pr.getNode().clientCore.tempBucketFactory);
                pr.getNode().executor.execute(inserter, "WoTinserter");


Reply via email to