Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/related/TitleReader.java |
— | — | @@ -2,6 +2,7 @@ |
3 | 3 | |
4 | 4 | import java.io.IOException; |
5 | 5 | import java.util.Iterator; |
| 6 | +import java.util.Map; |
6 | 7 | import java.util.Map.Entry; |
7 | 8 | |
8 | 9 | import org.mediawiki.importer.DumpWriter; |
— | — | @@ -55,9 +56,9 @@ |
56 | 57 | } |
57 | 58 | public void writeSiteinfo(Siteinfo info) throws IOException { |
58 | 59 | // write siteinfo to localization |
59 | | - Iterator it = info.Namespaces.orderedEntries(); |
| 60 | + Iterator<Map.Entry<Integer,String>> it = info.Namespaces.orderedEntries(); |
60 | 61 | while(it.hasNext()){ |
61 | | - Entry<Integer,String> pair = (Entry<Integer,String>)it.next(); |
| 62 | + Entry<Integer,String> pair = it.next(); |
62 | 63 | Localization.addCustomMapping(pair.getValue(),pair.getKey(),iid.getDBname()); |
63 | 64 | } |
64 | 65 | } |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/prefix/PrefixIndexBuilder.java |
— | — | @@ -411,6 +411,7 @@ |
412 | 412 | |
413 | 413 | /** Set omitNorms on all fields of the document */ |
414 | 414 | protected void setOmitNorms(Document doc){ |
| 415 | + @SuppressWarnings("rawtypes") //Iterator<Field> |
415 | 416 | Iterator it = doc.getFields().iterator(); |
416 | 417 | while(it.hasNext()){ |
417 | 418 | ((Field)it.next()).setOmitNorms(true); |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/importer/DumpImporter.java |
— | — | @@ -6,6 +6,7 @@ |
7 | 7 | import java.util.Enumeration; |
8 | 8 | import java.util.Hashtable; |
9 | 9 | import java.util.Iterator; |
| 10 | +import java.util.Map; |
10 | 11 | import java.util.Map.Entry; |
11 | 12 | import org.apache.log4j.Logger; |
12 | 13 | import org.mediawiki.importer.DumpWriter; |
— | — | @@ -137,9 +138,9 @@ |
138 | 139 | // nop |
139 | 140 | } |
140 | 141 | public void writeSiteinfo(Siteinfo info) throws IOException { |
141 | | - Iterator it = info.Namespaces.orderedEntries(); |
| 142 | + Iterator<Map.Entry<Integer,String>> it = info.Namespaces.orderedEntries(); |
142 | 143 | while(it.hasNext()){ |
143 | | - Entry<Integer,String> pair = (Entry<Integer,String>)it.next(); |
| 144 | + Entry<Integer,String> pair = it.next(); |
144 | 145 | Localization.addCustomMapping(pair.getValue(),pair.getKey(),iid.getDBname()); |
145 | 146 | } |
146 | 147 | } |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/oai/IndexUpdatesCollector.java |
— | — | @@ -6,6 +6,7 @@ |
7 | 7 | import java.util.HashMap; |
8 | 8 | import java.util.Hashtable; |
9 | 9 | import java.util.Iterator; |
| 10 | +import java.util.Map; |
10 | 11 | import java.util.Map.Entry; |
11 | 12 | |
12 | 13 | import org.apache.log4j.Logger; |
— | — | @@ -94,9 +95,9 @@ |
95 | 96 | RMIMessengerClient messenger = new RMIMessengerClient(true); |
96 | 97 | // write to localization |
97 | 98 | HashMap<Integer,String> map = new HashMap<Integer,String>(); |
98 | | - Iterator it = info.Namespaces.orderedEntries(); |
| 99 | + Iterator<Map.Entry<Integer,String>> it = info.Namespaces.orderedEntries(); |
99 | 100 | while(it.hasNext()){ |
100 | | - Entry<Integer,String> pair = (Entry<Integer,String>)it.next(); |
| 101 | + Entry<Integer,String> pair = it.next(); |
101 | 102 | map.put(pair.getKey(),pair.getValue()); |
102 | 103 | } |
103 | 104 | messenger.addLocalizationCustomMapping(iid.getIndexHost(),map,iid.getDBname()); |
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/ranks/LinkReader.java |
— | — | @@ -3,6 +3,7 @@ |
4 | 4 | import java.io.IOException; |
5 | 5 | import java.util.HashSet; |
6 | 6 | import java.util.Iterator; |
| 7 | +import java.util.Map; |
7 | 8 | import java.util.Map.Entry; |
8 | 9 | import org.apache.log4j.Logger; |
9 | 10 | import org.mediawiki.importer.DumpWriter; |
— | — | @@ -60,9 +61,9 @@ |
61 | 62 | public void writeSiteinfo(Siteinfo info) throws IOException { |
62 | 63 | siteinfo = info; |
63 | 64 | // write siteinfo to localization |
64 | | - Iterator it = info.Namespaces.orderedEntries(); |
| 65 | + Iterator<Map.Entry<Integer,String>> it = info.Namespaces.orderedEntries(); |
65 | 66 | while(it.hasNext()){ |
66 | | - Entry<Integer,String> pair = (Entry<Integer,String>)it.next(); |
| 67 | + Entry<Integer,String> pair = it.next(); |
67 | 68 | Localization.addCustomMapping(pair.getValue(),pair.getKey(),iid.getDBname()); |
68 | 69 | links.addToNamespaceMap(pair.getValue(),pair.getKey()); |
69 | 70 | } |