r111289 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111288‎ | r111289 | r111290 >
Date:10:30, 12 February 2012
Author:oren
Status:deferred
Tags:
Comment:
added Type in Generic Iterators
Modified paths:
  • /trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/spell/CleanIndexImporter.java (modified) (history)
  • /trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/spell/api/SpellCheckIndexer.java (modified) (history)

Diff [purge]

Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/spell/api/SpellCheckIndexer.java
@@ -339,6 +339,7 @@
340340
341341 /** Set omitNorms on all fields of the document */
342342 protected void setOmitNorms(Document doc){
 343+ @SuppressWarnings("rawtypes") //Iterator<Field>
343344 Iterator it = doc.getFields().iterator();
344345 while(it.hasNext()){
345346 ((Field)it.next()).setOmitNorms(true);
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/spell/CleanIndexImporter.java
@@ -5,6 +5,7 @@
66 import java.util.Date;
77 import java.util.Hashtable;
88 import java.util.Iterator;
 9+import java.util.Map;
910 import java.util.Map.Entry;
1011 import org.apache.log4j.Logger;
1112 import org.mediawiki.importer.DumpWriter;
@@ -91,10 +92,10 @@
9293 // nop
9394 }
9495 public void writeSiteinfo(Siteinfo info) throws IOException {
95 - Iterator it = info.Namespaces.orderedEntries();
 96+ Iterator<Map.Entry<Integer,String>> it = info.Namespaces.orderedEntries();
9697 while(it.hasNext()){
9798
98 - Entry<Integer,String> pair = (Entry<Integer,String>)it.next();
 99+ Entry<Integer,String> pair = it.next();
99100 Localization.addCustomMapping(pair.getValue(),pair.getKey(),iid.getDB().getDBname());
100101 }
101102 }

Status & tagging log