uschindler commented on a change in pull request #579: URL: https://github.com/apache/lucene/pull/579#discussion_r777599019
########## File path: lucene/core/src/java/org/apache/lucene/util/fst/PositiveIntOutputs.java ########## @@ -17,22 +17,19 @@ package org.apache.lucene.util.fst; import java.io.IOException; + import org.apache.lucene.store.DataInput; import org.apache.lucene.store.DataOutput; import org.apache.lucene.util.RamUsageEstimator; -import org.apache.lucene.util.SuppressForbidden; /** * An FST {@link Outputs} implementation where each output is a non-negative long value. * * @lucene.experimental */ -@SuppressForbidden(reason = "Uses a Long instance as a marker") public final class PositiveIntOutputs extends Outputs<Long> { - // Ignore the deprecated constructor. We do want a unique object here. - @SuppressWarnings({"all"}) - private static final Long NO_OUTPUT = new Long(0); + private static final Long NO_OUTPUT = 0L; Review comment: Hi, just dumb questions: It this really working correct? I am asking this because the original code wanted a separate "unique object". Looked to me like a special value that was checked against with `==`. As it is positive, won't me -1L a better marker? -- 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. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org