mirror of https://github.com/apache/lucene.git
LUCENE-10338: make TestPosition an internal class inside TrivialLookaheadFilter so that it's not picked up as a test.
This commit is contained in:
parent
aab0413b57
commit
09561053c5
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.lucene.tests.analysis;
|
||||
|
||||
import org.junit.Ignore;
|
||||
|
||||
/** Trivial position class. */
|
||||
@Ignore
|
||||
public class TestPosition extends LookaheadTokenFilter.Position {
|
||||
private String fact;
|
||||
|
||||
public String getFact() {
|
||||
return fact;
|
||||
}
|
||||
|
||||
public void setFact(String fact) {
|
||||
this.fact = fact;
|
||||
}
|
||||
}
|
|
@ -25,7 +25,8 @@ import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
|
|||
import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
|
||||
|
||||
/** Simple example of a filter that seems to show some problems with LookaheadTokenFilter. */
|
||||
public final class TrivialLookaheadFilter extends LookaheadTokenFilter<TestPosition> {
|
||||
public final class TrivialLookaheadFilter
|
||||
extends LookaheadTokenFilter<TrivialLookaheadFilter.TestPosition> {
|
||||
|
||||
private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);
|
||||
private final PositionIncrementAttribute posIncAtt =
|
||||
|
@ -34,6 +35,18 @@ public final class TrivialLookaheadFilter extends LookaheadTokenFilter<TestPosit
|
|||
|
||||
private int insertUpto;
|
||||
|
||||
public static class TestPosition extends LookaheadTokenFilter.Position {
|
||||
private String fact;
|
||||
|
||||
public String getFact() {
|
||||
return fact;
|
||||
}
|
||||
|
||||
public void setFact(String fact) {
|
||||
this.fact = fact;
|
||||
}
|
||||
}
|
||||
|
||||
protected TrivialLookaheadFilter(TokenStream input) {
|
||||
super(input);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue