Author: nextgens
Date: 2007-09-14 12:24:13 +0000 (Fri, 14 Sep 2007)
New Revision: 15155

Modified:
   trunk/freenet/src/freenet/keys/BaseClientKey.java
Log:
Putting the constant term before is a good practice and might be better 
optimized.

Modified: trunk/freenet/src/freenet/keys/BaseClientKey.java
===================================================================
--- trunk/freenet/src/freenet/keys/BaseClientKey.java   2007-09-14 05:22:47 UTC 
(rev 15154)
+++ trunk/freenet/src/freenet/keys/BaseClientKey.java   2007-09-14 12:24:13 UTC 
(rev 15155)
@@ -13,13 +13,13 @@
 public abstract class BaseClientKey {

        public static BaseClientKey getBaseKey(FreenetURI origURI) throws 
MalformedURLException {
-               if(origURI.getKeyType().equals("CHK"))
+               if("CHK".equals(origURI.getKeyType()))
                        return new ClientCHK(origURI);
-               if(origURI.getKeyType().equals("SSK"))
+               if("SSK".equals(origURI.getKeyType()))
                        return new ClientSSK(origURI);
-               if(origURI.getKeyType().equals("KSK"))
+               if("KSK".equals(origURI.getKeyType()))
                        return ClientKSK.create(origURI.getDocName());
-               if(origURI.getKeyType().equals("USK"))
+               if("USK".equals(origURI.getKeyType()))
                        return USK.create(origURI);
                throw new UnsupportedOperationException("Unknown keytype from 
"+origURI);
        }


Reply via email to