mikemccand commented on a change in pull request #1184: LUCENE-9142 Refactor IntSet operations for determinize URL: https://github.com/apache/lucene-solr/pull/1184#discussion_r369107216
########## File path: lucene/core/src/java/org/apache/lucene/util/automaton/SortedIntSet.java ########## @@ -16,59 +16,70 @@ */ package org.apache.lucene.util.automaton; +import java.util.Arrays; import java.util.TreeMap; import java.util.Map; import org.apache.lucene.util.ArrayUtil; +import org.apache.lucene.util.SuppressForbidden; // Just holds a set of int[] states, plus a corresponding -// int[] count per state. Used by -// BasicOperations.determinize -final class SortedIntSet { - int[] values; +// int[] count per state. Used by Operations.determinize() +final class SortedIntSet extends IntSet { int[] counts; int upto; - private int hashCode; + + // Tracks if the hashCode computation is out of date and also if the array is out of sync with the map Review comment: Isn't the array discarded as soon as we switch over to the map (so how could it be out of sync)? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org