Anomaly identified by the detector. Please review whether this anomaly corresponds to a misuse.
Finding:
17
In File:
org/apache/lucene/index/TermEnum.java
In Method:
skipTo(Term)
Code with Finding:
class TermEnum {
/** Skips terms to the first beyond the current whose value is
* greater or equal to <i>target</i>. <p>Returns true iff there is such
* an entry. <p>Behaves as if written: <pre>
* public boolean skipTo(Term target) {
* do {
* if (!next())
* return false;
* } while (target > term());
* return true;
* }
* </pre>
* Some implementations *could* be considerably more efficient than a linear scan.
* Check the implementation to be sure.
* @deprecated This method is not performant and will be removed in Lucene 3.0.
* Use {@link IndexReader#terms(Term)} to create a new TermEnum positioned at a
* given term.
*/
public boolean skipTo(Term target) throws IOException {
do {
if (!next())
return false;
} while (target.compareTo(term()) > 0);
return true;
}
}