[freenet-cvs] r14677 - trunk/freenet/src/freenet/clients/http/bookmark

nextgens at freenetproject.org nextgens at freenetproject.org
Tue Aug 14 03:54:03 UTC 2007


Author: nextgens
Date: 2007-08-14 03:54:03 +0000 (Tue, 14 Aug 2007)
New Revision: 14677

Modified:
   trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java
Log:
It's better like that

Modified: trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java	2007-08-14 03:44:56 UTC (rev 14676)
+++ trunk/freenet/src/freenet/clients/http/bookmark/BookmarkManager.java	2007-08-14 03:54:03 UTC (rev 14677)
@@ -61,13 +61,13 @@
 							"Frost", node.alerts));
 
 			sc.register("bookmarks", defaultRoot.toStrings(), 0, true, false,"BookmarkManager.list", "BookmarkManager.listLong", configCB);
-
-			configCB.set((sc.getStringArr("bookmarks").length == 0 ? defaultRoot.toStrings() : sc.getStringArr("bookmarks")));
-
+			
+			clear();
+			if(sc.getRawOption("bookmarks") == null)
+				configCB.set(defaultRoot.toStrings());
+			
 		} catch (MalformedURLException mue) {
-			// just ignore that one
 		} catch (InvalidConfigValueException icve) {
-			// TODO
 			icve.printStackTrace();
 		}
 	}
@@ -82,8 +82,6 @@
 		}
 
 		public void set(String[] newVals) throws InvalidConfigValueException {
-			clear();
-			
 			FreenetURI key;
 			for (int i = 0; i < newVals.length; i++) {
 				try {




More information about the cvs mailing list