Skip to content

Commit

Permalink
Fix Method declared 'final' in 'final' class. (#13492)
Browse files Browse the repository at this point in the history
  • Loading branch information
vsop-479 authored Jun 21, 2024
1 parent cfbf8d9 commit 3ae59a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lucene/core/src/java/org/apache/lucene/index/Term.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,23 @@ public Term(String fld) {
* Returns the field of this term. The field indicates the part of a document which this term came
* from.
*/
public final String field() {
public String field() {
return field;
}

/**
* Returns the text of this term. In the case of words, this is simply the text of the word. In
* the case of dates and other types, this is an encoding of the object as a string.
*/
public final String text() {
public String text() {
return toString(bytes);
}

/**
* Returns human-readable form of the term text. If the term is not unicode, the raw bytes will be
* printed instead.
*/
public static final String toString(BytesRef termText) {
public static String toString(BytesRef termText) {
// the term might not be text, but usually is. so we make a best effort
CharsetDecoder decoder =
StandardCharsets.UTF_8
Expand All @@ -124,7 +124,7 @@ public static final String toString(BytesRef termText) {
}

/** Returns the bytes of this term, these should not be modified. */
public final BytesRef bytes() {
public BytesRef bytes() {
return bytes;
}

Expand Down Expand Up @@ -160,7 +160,7 @@ public int hashCode() {
* <p>The ordering of terms is first by field, then by text.
*/
@Override
public final int compareTo(Term other) {
public int compareTo(Term other) {
if (field.equals(other.field)) {
return bytes.compareTo(other.bytes);
} else {
Expand All @@ -181,7 +181,7 @@ final void set(String fld, BytesRef bytes) {
}

@Override
public final String toString() {
public String toString() {
return field + ":" + text();
}

Expand Down

0 comments on commit 3ae59a9

Please sign in to comment.