Give OffsetsRetrievalStrategy implementations public constructors (#11983)

OffsetsFromMatchIterator and OffsetsFromPositions both have package-
private constructors, which makes them difficult to use as components in a
separate highlighter implementation.
This commit is contained in:
Alan Woodward 2022-11-28 16:22:46 +00:00 committed by GitHub
parent 5c4896321d
commit 0cc6f69536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -206,6 +206,9 @@ Other
* GITHUB#11752: Added interface to relate a LatLonShape with another shape represented as Component2D. (Navneet Verma)
* GITHUB#11983: Make constructors for OffsetFromPositions and OffsetsFromMatchIterator
public. (Alan Woodward)
Build
---------------------

View File

@ -30,7 +30,7 @@ public final class OffsetsFromMatchIterator implements OffsetsRetrievalStrategy
private final String field;
private final OffsetsFromPositions noOffsetsFallback;
OffsetsFromMatchIterator(String field, OffsetsFromPositions noOffsetsFallback) {
public OffsetsFromMatchIterator(String field, OffsetsFromPositions noOffsetsFallback) {
this.field = field;
this.noOffsetsFallback = Objects.requireNonNull(noOffsetsFallback);
}

View File

@ -36,7 +36,7 @@ public final class OffsetsFromPositions implements OffsetsRetrievalStrategy {
private final String field;
private final Analyzer analyzer;
OffsetsFromPositions(String field, Analyzer analyzer) {
public OffsetsFromPositions(String field, Analyzer analyzer) {
this.field = field;
this.analyzer = analyzer;
}