On Tuesday 20 November 2007 19:15, nextgens at freenetproject.org wrote:
> +    private void readBookmarks(BookmarkCategory category, SimpleFieldSet 
sfs) {
> +        synchronized (bookmarks) {
> +            String[] categories = sfs.namesOfDirectSubsets();
> +            for (int i = 0; i < categories.length; i++) {
> +                SimpleFieldSet subset = sfs.subset(categories[i]);
> +                BookmarkCategory currentCategory = new 
BookmarkCategory(categories[i]);
> +                category.addBookmark(currentCategory);
> +                addBookmark(currentCategory, currentCategory, false);
> +                readBookmarks(currentCategory, subset);
> +            }
> +
> +            Iterator it = sfs.keyIterator();
> +            while (it.hasNext()) {
> +                String key = (String) it.next();
> +                String line = sfs.get(key);
> +                try {
> +                    BookmarkItem item = new BookmarkItem(line, 
node.alerts);
> +                    category.addBookmark(item);
> +                    addBookmark(category, item, false);
> +                } catch (MalformedURLException e) {
> +                    Logger.error(this, "Error while adding one of the 
bookmarks :"+e.getMessage(), e);
> +                }
> +            }
> +        }
> +        storeBookmarks();

Maybe we shouldn't do this if we had a parse error?
> +    }
>  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20071120/2724fd7a/attachment.pgp>

Reply via email to