r109916 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109915‎ | r109916 | r109917 >
Date:10:28, 24 January 2012
Author:oren
Status:ok
Tags:
Comment:
removed unneeded suppress warnings
Modified paths:
  • /trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/highlight/Highlight.java (modified) (history)
  • /trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/ranks/Links.java (modified) (history)
  • /trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/spell/CleanIndexImporter.java (modified) (history)

Diff [purge]

Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/spell/CleanIndexImporter.java
@@ -93,6 +93,7 @@
9494 public void writeSiteinfo(Siteinfo info) throws IOException {
9595 Iterator it = info.Namespaces.orderedEntries();
9696 while(it.hasNext()){
 97+
9798 Entry<Integer,String> pair = (Entry<Integer,String>)it.next();
9899 Localization.addCustomMapping(pair.getValue(),pair.getKey(),iid.getDB().getDBname());
99100 }
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/highlight/Highlight.java
@@ -403,7 +403,7 @@
404404 return Math.log(numDocs/(double)(docFreq+1)) + 1.0;
405405 }
406406
407 - @SuppressWarnings("unchecked")
 407+
408408 protected static HashMap<String,Double> getTermsNotInTitle(HashMap<String,Double> weightTerm, Alttitles alttitles, HashMap<String,Integer> wordIndex){
409409 Alttitles.Info info = alttitles.getTitle();
410410 ArrayList<ExtToken> tokens = info.getTokens();
Index: trunk/lucene-search-3/src/main/java/org/wikimedia/lsearch/ranks/Links.java
@@ -641,7 +641,7 @@
642642 /** Get all contexts in which article <i>to<i/> is linked from <i>from</i>.
643643 * Will return null if there is no context, or link is invalid.
644644 * @throws ClassNotFoundException */
645 - @SuppressWarnings("unchecked")
 645+
646646 public ArrayList<String> getContext(String from, String to) throws IOException {
647647 ensureRead();
648648 String cacheKey = "getContext:"+from;
@@ -741,7 +741,7 @@
742742 /** Get all contexts in which article <i>to<i/> is linked from <i>from</i>.
743743 * Will return null if there is no context, or link is invalid.
744744 * @throws ClassNotFoundException */
745 - @SuppressWarnings("unchecked")
 745+
746746 public Collection<String> getContextOld(String from, String to) throws IOException {
747747 ensureRead();
748748

Status & tagging log