r7368 - dumbhippo/trunk/server/src/com/dumbhippo/services/caches



Author: walters
Date: 2008-03-18 14:06:12 -0500 (Tue, 18 Mar 2008)
New Revision: 7368

Modified:
   dumbhippo/trunk/server/src/com/dumbhippo/services/caches/RhapsodyDownloadCacheBean.java
Log:
Switch to using public text normalization API in OpenJDK 6.


Modified: dumbhippo/trunk/server/src/com/dumbhippo/services/caches/RhapsodyDownloadCacheBean.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/services/caches/RhapsodyDownloadCacheBean.java	2008-03-18 17:51:07 UTC (rev 7367)
+++ dumbhippo/trunk/server/src/com/dumbhippo/services/caches/RhapsodyDownloadCacheBean.java	2008-03-18 19:06:12 UTC (rev 7368)
@@ -5,6 +5,7 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.URLConnection;
+import java.text.Normalizer;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -16,8 +17,6 @@
 
 import org.slf4j.Logger;
 
-import sun.text.Normalizer;
-
 import com.dumbhippo.GlobalSetup;
 import com.dumbhippo.URLUtils;
 import com.dumbhippo.persistence.caches.CachedRhapsodyDownload;
@@ -59,7 +58,7 @@
 		// We try both of the first two ways.
 		
 		if (canonicalize)
-			s = Normalizer.normalize(s, Normalizer.DECOMP_COMPAT, 0);
+			s = Normalizer.normalize(s, Normalizer.Form.NFKD);
 		
 		return s.replaceAll("[^a-zA-Z0-9]","").toLowerCase();
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]