mirror of https://github.com/apache/lucene.git
Make static final Set immutable (#13055): EnumSet.of() returns a mutable Set that should not be used for static final constants.
This commit is contained in:
parent
6566e33ff1
commit
4f0bc4f35c
|
@ -204,6 +204,8 @@ Improvements
|
||||||
|
|
||||||
* GITHUB#13043: Support getMaxScore of ConjunctionScorer for non top level scoring clause. (Shintaro Murakami)
|
* GITHUB#13043: Support getMaxScore of ConjunctionScorer for non top level scoring clause. (Shintaro Murakami)
|
||||||
|
|
||||||
|
* GITHUB#13055: Make DEFAULT_STOP_TAGS in KoreanPartOfSpeechStopFilter immutable (Dmitry Cherniachenko)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
package org.apache.lucene.analysis.ko;
|
package org.apache.lucene.analysis.ko;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.apache.lucene.analysis.FilteringTokenFilter;
|
import org.apache.lucene.analysis.FilteringTokenFilter;
|
||||||
|
@ -33,37 +34,38 @@ public final class KoreanPartOfSpeechStopFilter extends FilteringTokenFilter {
|
||||||
|
|
||||||
/** Default list of tags to filter. */
|
/** Default list of tags to filter. */
|
||||||
public static final Set<POS.Tag> DEFAULT_STOP_TAGS =
|
public static final Set<POS.Tag> DEFAULT_STOP_TAGS =
|
||||||
EnumSet.of(
|
Collections.unmodifiableSet(
|
||||||
POS.Tag.EP,
|
EnumSet.of(
|
||||||
POS.Tag.EF,
|
POS.Tag.EP,
|
||||||
POS.Tag.EC,
|
POS.Tag.EF,
|
||||||
POS.Tag.ETN,
|
POS.Tag.EC,
|
||||||
POS.Tag.ETM,
|
POS.Tag.ETN,
|
||||||
POS.Tag.IC,
|
POS.Tag.ETM,
|
||||||
POS.Tag.JKS,
|
POS.Tag.IC,
|
||||||
POS.Tag.JKC,
|
POS.Tag.JKS,
|
||||||
POS.Tag.JKG,
|
POS.Tag.JKC,
|
||||||
POS.Tag.JKO,
|
POS.Tag.JKG,
|
||||||
POS.Tag.JKB,
|
POS.Tag.JKO,
|
||||||
POS.Tag.JKV,
|
POS.Tag.JKB,
|
||||||
POS.Tag.JKQ,
|
POS.Tag.JKV,
|
||||||
POS.Tag.JX,
|
POS.Tag.JKQ,
|
||||||
POS.Tag.JC,
|
POS.Tag.JX,
|
||||||
POS.Tag.MAG,
|
POS.Tag.JC,
|
||||||
POS.Tag.MAJ,
|
POS.Tag.MAG,
|
||||||
POS.Tag.MM,
|
POS.Tag.MAJ,
|
||||||
POS.Tag.SP,
|
POS.Tag.MM,
|
||||||
POS.Tag.SSC,
|
POS.Tag.SP,
|
||||||
POS.Tag.SSO,
|
POS.Tag.SSC,
|
||||||
POS.Tag.SC,
|
POS.Tag.SSO,
|
||||||
POS.Tag.SE,
|
POS.Tag.SC,
|
||||||
POS.Tag.XPN,
|
POS.Tag.SE,
|
||||||
POS.Tag.XSA,
|
POS.Tag.XPN,
|
||||||
POS.Tag.XSN,
|
POS.Tag.XSA,
|
||||||
POS.Tag.XSV,
|
POS.Tag.XSN,
|
||||||
POS.Tag.UNA,
|
POS.Tag.XSV,
|
||||||
POS.Tag.NA,
|
POS.Tag.UNA,
|
||||||
POS.Tag.VSV);
|
POS.Tag.NA,
|
||||||
|
POS.Tag.VSV));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@link KoreanPartOfSpeechStopFilter} with the default list of stop tags {@link
|
* Create a new {@link KoreanPartOfSpeechStopFilter} with the default list of stop tags {@link
|
||||||
|
|
Loading…
Reference in New Issue