Author: nextgens
Date: 2007-11-30 17:22:45 +0000 (Fri, 30 Nov 2007)
New Revision: 16142
Modified:
trunk/freenet/src/freenet/clients/http/BookmarkEditorToadlet.java
Log:
simplify the code
Modified: trunk/freenet/src/freenet/clients/http/BookmarkEditorToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/BookmarkEditorToadlet.java
2007-11-30 17:14:02 UTC (rev 16141)
+++ trunk/freenet/src/freenet/clients/http/BookmarkEditorToadlet.java
2007-11-30 17:22:45 UTC (rev 16142)
@@ -135,12 +135,12 @@
String error = L10n.getString("BookmarkEditorToadlet.error");
HTMLNode pageNode = pageMaker.getPageNode(editorTitle, ctx);
HTMLNode content = pageMaker.getContentNode(pageNode);
-
- if(req.getParam("action").length() > 0 &&
req.getParam("bookmark").length() > 0) {
+ String originalBookmark = req.getParam("bookmark");
+ if(req.getParam("action").length() > 0 &&
originalBookmark.length() > 0) {
String action = req.getParam("action");
String bookmarkPath;
try {
- bookmarkPath =
URLDecoder.decode(req.getParam("bookmark"), false);
+ bookmarkPath =
URLDecoder.decode(originalBookmark, false);
} catch(URLEncodedFormatException e) {
HTMLNode errorBox =
content.addChild(pageMaker.getInfobox("infobox-error", error));
pageMaker.getContentNode(errorBox).addChild("#",
L10n.getString("BookmarkEditorToadlet.urlDecodeError"));