roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r475851 - /incubator/roller/trunk/src/org/apache/roller/util/rome/DiskFeedInfoCache.java
Date Thu, 16 Nov 2006 18:38:23 GMT
Author: snoopdave
Date: Thu Nov 16 10:38:23 2006
New Revision: 475851

URL: http://svn.apache.org/viewvc?view=rev&rev=475851
Log:
Better hash key creation using feed's URL

Modified:
    incubator/roller/trunk/src/org/apache/roller/util/rome/DiskFeedInfoCache.java

Modified: incubator/roller/trunk/src/org/apache/roller/util/rome/DiskFeedInfoCache.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/src/org/apache/roller/util/rome/DiskFeedInfoCache.java?view=diff&rev=475851&r1=475850&r2=475851
==============================================================================
--- incubator/roller/trunk/src/org/apache/roller/util/rome/DiskFeedInfoCache.java (original)
+++ incubator/roller/trunk/src/org/apache/roller/util/rome/DiskFeedInfoCache.java Thu Nov
16 10:38:23 2006
@@ -29,6 +29,7 @@
 
 import com.sun.syndication.fetcher.impl.FeedFetcherCache;
 import com.sun.syndication.fetcher.impl.SyndFeedInfo;
+import org.apache.roller.util.Utilities;
 
 /**
  * @author David M. Johnson
@@ -46,7 +47,8 @@
     public SyndFeedInfo getFeedInfo(URL url)
     {
         SyndFeedInfo info = null;
-        String fileName = cachePath + File.separator + "feed_" + url.hashCode();
+        String fileName = cachePath + File.separator + "feed_" 
+                + Utilities.replaceNonAlphanumeric(url.toString(),'_').trim();        
         FileInputStream fis;
         try
         {
@@ -75,7 +77,8 @@
 
     public void setFeedInfo(URL url, SyndFeedInfo feedInfo)
     {
-        String fileName = cachePath + File.separator + "feed_" + url.hashCode();
+        String fileName = cachePath + File.separator + "feed_" 
+                + Utilities.replaceNonAlphanumeric(url.toString(),'_').trim();  
         FileOutputStream fos;
         try
         {



Mime
View raw message