diff --git a/platform/indexing-impl/src/com/intellij/ide/highlighter/custom/SyntaxTable.java b/platform/indexing-impl/src/com/intellij/ide/highlighter/custom/SyntaxTable.java index d3fbf73d06bc..708175188afa 100644 --- a/platform/indexing-impl/src/com/intellij/ide/highlighter/custom/SyntaxTable.java +++ b/platform/indexing-impl/src/com/intellij/ide/highlighter/custom/SyntaxTable.java @@ -16,11 +16,11 @@ package com.intellij.ide.highlighter.custom; import com.intellij.ide.highlighter.custom.tokens.KeywordParser; +import gnu.trove.THashSet; import org.jetbrains.annotations.NotNull; import java.util.Arrays; import java.util.Set; -import java.util.TreeSet; /** * @author Yura Cangea @@ -48,10 +48,10 @@ public class SyntaxTable implements Cloneable { private volatile KeywordParser myKeywordParser; public SyntaxTable() { - myKeywords1 = new TreeSet(); - myKeywords2 = new TreeSet(); - myKeywords3 = new TreeSet(); - myKeywords4 = new TreeSet(); + myKeywords1 = new THashSet<>(); + myKeywords2 = new THashSet<>(); + myKeywords3 = new THashSet<>(); + myKeywords4 = new THashSet<>(); } KeywordParser getKeywordParser() { @@ -70,10 +70,10 @@ public class SyntaxTable implements Cloneable { @Override protected Object clone() throws CloneNotSupportedException { SyntaxTable cl = (SyntaxTable)super.clone(); - cl.myKeywords1 = new TreeSet(myKeywords1); - cl.myKeywords2 = new TreeSet(myKeywords2); - cl.myKeywords3 = new TreeSet(myKeywords3); - cl.myKeywords4 = new TreeSet(myKeywords4); + cl.myKeywords1 = new THashSet<>(myKeywords1); + cl.myKeywords2 = new THashSet<>(myKeywords2); + cl.myKeywords3 = new THashSet<>(myKeywords3); + cl.myKeywords4 = new THashSet<>(myKeywords4); cl.myKeywordParser = null; return cl; }