jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r664498 - /incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/content/PageRenamer.java
Date Sun, 08 Jun 2008 13:01:38 GMT
Author: jalkanen
Date: Sun Jun  8 06:01:37 2008
New Revision: 664498

URL: http://svn.apache.org/viewvc?rev=664498&view=rev
Log:
Now uses a Set to collect referrers, not a List.  No need to update referrers twice.

Modified:
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/content/PageRenamer.java

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/content/PageRenamer.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/content/PageRenamer.java?rev=664498&r1=664497&r2=664498&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/content/PageRenamer.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/content/PageRenamer.java Sun Jun  8 06:01:37
2008
@@ -20,8 +20,9 @@
  */
 package com.ecyrd.jspwiki.content;
 
-import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Set;
+import java.util.TreeSet;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -173,7 +174,7 @@
     private void updateReferrers( WikiContext context, WikiPage fromPage, WikiPage toPage
)
     {
         WikiEngine engine = context.getEngine();
-        Collection<String> referrers = new ArrayList<String>();
+        Set<String> referrers = new TreeSet<String>();
         
         Collection<String> r = engine.getReferenceManager().findReferrers( fromPage.getName()
);
         if( r != null ) referrers.addAll( r );



Mime
View raw message