Author: nextgens
Date: 2007-04-29 20:33:46 +0000 (Sun, 29 Apr 2007)
New Revision: 13056
Modified:
trunk/freenet/src/freenet/keys/FreenetURI.java
Log:
fix the regexp, logging
Modified: trunk/freenet/src/freenet/keys/FreenetURI.java
===================================================================
--- trunk/freenet/src/freenet/keys/FreenetURI.java 2007-04-29 20:25:31 UTC
(rev 13055)
+++ trunk/freenet/src/freenet/keys/FreenetURI.java 2007-04-29 20:33:46 UTC
(rev 13056)
@@ -230,7 +230,7 @@
}
// Strip http:// prefix
- URI = URI.replaceAll("^http://.*/+", "");
+ URI = URI.replaceFirst("http://(.)*(/)+","");
// check scheme
int colon = URI.indexOf(':');
@@ -242,7 +242,7 @@
// decode keyType
int atchar = URI.indexOf('@');
if (atchar == -1) {
- throw new MalformedURLException();
+ throw new MalformedURLException("There is no @ in that
URI!");
} else {
keyType = URI.substring(colon + 1,
atchar).toUpperCase().trim();
}