PatriciaTrie constructor reuse the stateless singleton

StringKeyAnalyzer.INSTANCE
This commit is contained in:
Gary Gregory 2024-06-23 15:13:27 -04:00
parent 8eba18b3e9
commit 6c609f0d76
2 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@
<action type="fix" dev="ggregory" due-to="Gary Gregory">Package private AbstractEmptyIterator implements ResettableIterator so subclasses don't.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate AbstractEmptyIterator.add(E) without replacement.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Add missing Javadocs.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">PatriciaTrie constructor reuse the stateless singleton StringKeyAnalyzer.INSTANCE.</action>
<!-- ADD -->
<!-- UPDATE -->
</release>

View File

@ -67,11 +67,11 @@ public class PatriciaTrie<V> extends AbstractPatriciaTrie<String, V> {
private static final long serialVersionUID = 4446367780901817838L;
public PatriciaTrie() {
super(new StringKeyAnalyzer());
super(StringKeyAnalyzer.INSTANCE);
}
public PatriciaTrie(final Map<? extends String, ? extends V> m) {
super(new StringKeyAnalyzer(), m);
super(StringKeyAnalyzer.INSTANCE, m);
}
}