Author: j16sdiz
Date: 2008-12-20 07:29:02 +0000 (Sat, 20 Dec 2008)
New Revision: 24658

Modified:
   trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
Log:
optimization - e.getMessage(), not getLocalizedMessage()

 - getLocalizedMessage() is really slow (it take seconds!)
 - we don't have LocalizedMessage for FreenetURI anyway

Modified: 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java
===================================================================
--- 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2008-12-20 07:02:36 UTC (rev 24657)
+++ 
trunk/freenet/src/freenet/clients/http/filter/GenericReadFilterCallback.java    
    2008-12-20 07:29:02 UTC (rev 24658)
@@ -111,7 +111,7 @@
                        if(logMINOR) Logger.minor(this, "Resolved: "+resolved);
                } catch (URISyntaxException e1) {
                        if(logMINOR) Logger.minor(this, "Failed to parse URI: 
"+e1);
-                       throw new 
CommentException(l10n("couldNotParseURIWithError", "error", 
e1.getLocalizedMessage()));
+                       throw new 
CommentException(l10n("couldNotParseURIWithError", "error", e1.getMessage()));
                }
                String path = uri.getPath();
                
@@ -163,7 +163,7 @@
                                // Not a FreenetURI
                                if(logMINOR) Logger.minor(this, "Malformed URL 
(a): "+e, e);
                                if(e.getMessage() != null) {
-                                       reason = l10n("malformedAbsoluteURL", 
"error", e.getLocalizedMessage());
+                                       reason = l10n("malformedAbsoluteURL", 
"error", e.getMessage());
                                } else {
                                        reason = 
l10n("couldNotParseAbsoluteFreenetURI");
                                }
@@ -188,7 +188,7 @@
                        } catch (MalformedURLException e) {
                                if(logMINOR) Logger.minor(this, "Malformed URL 
(b): "+e, e);
                                if(e.getMessage() != null) {
-                                       reason = l10n("malformedRelativeURL", 
"error", e.getLocalizedMessage());
+                                       reason = l10n("malformedRelativeURL", 
"error", e.getMessage());
                                } else {
                                        reason = 
l10n("couldNotParseRelativeFreenetURI");
                                }

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to