Author: j16sdiz
Date: 2008-12-20 05:16:57 +0000 (Sat, 20 Dec 2008)
New Revision: 24655

Modified:
   trunk/freenet/src/freenet/keys/USK.java
Log:
simplify code

Modified: trunk/freenet/src/freenet/keys/USK.java
===================================================================
--- trunk/freenet/src/freenet/keys/USK.java     2008-12-20 05:07:32 UTC (rev 
24654)
+++ trunk/freenet/src/freenet/keys/USK.java     2008-12-20 05:16:57 UTC (rev 
24655)
@@ -61,7 +61,7 @@
        }
 
        public static USK create(FreenetURI uri) throws MalformedURLException {
-               if((uri.getKeyType() == null) || 
!(uri.getKeyType().equals("USK"))) throw new MalformedURLException("Not a USK");
+               if(!uri.isUSK()) throw new MalformedURLException("Not a USK");
                return new USK(uri.getRoutingKey(), uri.getCryptoKey(), 
uri.getExtra(), uri.getDocName(), uri.getSuggestedEdition());
        }
        

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

Reply via email to