Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/PositionalScorer.java |
— | — | @@ -530,14 +530,14 @@ |
531 | 531 | if (!checkedRepeats) { |
532 | 532 | checkedRepeats = true; |
533 | 533 | // check for repeats |
534 | | - HashMap m = null; |
| 534 | + HashMap<PhrasePositionsBoost,Object> m = null; |
535 | 535 | for (PhrasePositionsBoost pp = first; pp != null; pp = pp.next) { |
536 | 536 | int tpPos = pp.position + pp.offset; |
537 | 537 | for (PhrasePositionsBoost pp2 = pp.next; pp2 != null; pp2 = pp2.next) { |
538 | 538 | int tpPos2 = pp2.position + pp2.offset; |
539 | 539 | if (tpPos2 == tpPos) { |
540 | 540 | if (m == null) |
541 | | - m = new HashMap(); |
| 541 | + m = new HashMap<PhrasePositionsBoost,Object>(); |
542 | 542 | pp.repeats = true; |
543 | 543 | pp2.repeats = true; |
544 | 544 | m.put(pp,null); |
— | — | @@ -546,7 +546,7 @@ |
547 | 547 | } |
548 | 548 | } |
549 | 549 | if (m!=null) |
550 | | - repeats = (PhrasePositionsBoost[]) m.keySet().toArray(new PhrasePositionsBoost[0]); |
| 550 | + repeats = m.keySet().toArray(new PhrasePositionsBoost[0]); |
551 | 551 | } |
552 | 552 | |
553 | 553 | // with repeats must advance some repeating pp's so they all start with differing tp's |
Index: trunk/lucene-search-3/src/main/java/org/apache/lucene/search/MultiSearcherBase.java |
— | — | @@ -335,7 +335,7 @@ |
336 | 336 | Query rewrittenQuery = rewrite(original); |
337 | 337 | |
338 | 338 | // step 2 |
339 | | - Set terms = new HashSet(); |
| 339 | + Set<Object> terms = new HashSet<Object>(); |
340 | 340 | rewrittenQuery.extractTerms(terms); |
341 | 341 | |
342 | 342 | // step3 |