mirror of https://github.com/apache/lucene.git
Fix de-serialization of interned field names
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@833095 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
072f9e3218
commit
8375c97131
|
@ -363,8 +363,14 @@ public final class NumericRangeQuery<T extends Number> extends MultiTermQuery {
|
||||||
(Boolean.valueOf(maxInclusive).hashCode()^0x733fa5fe);
|
(Boolean.valueOf(maxInclusive).hashCode()^0x733fa5fe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// field must be interned after reading from stream
|
||||||
|
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||||
|
in.defaultReadObject();
|
||||||
|
field = StringHelper.intern(field);
|
||||||
|
}
|
||||||
|
|
||||||
// members (package private, to be also fast accessible by NumericRangeTermEnum)
|
// members (package private, to be also fast accessible by NumericRangeTermEnum)
|
||||||
final String field;
|
String field;
|
||||||
final int precisionStep, valSize;
|
final int precisionStep, valSize;
|
||||||
final T min, max;
|
final T min, max;
|
||||||
final boolean minInclusive,maxInclusive;
|
final boolean minInclusive,maxInclusive;
|
||||||
|
|
|
@ -354,6 +354,11 @@ implements Serializable {
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// field must be interned after reading from stream
|
||||||
|
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
|
||||||
|
in.defaultReadObject();
|
||||||
|
field = StringHelper.intern(field);
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns the {@link FieldComparator} to use for
|
/** Returns the {@link FieldComparator} to use for
|
||||||
* sorting.
|
* sorting.
|
||||||
|
|
Loading…
Reference in New Issue