dweiss commented on a change in pull request #579: URL: https://github.com/apache/lucene/pull/579#discussion_r777683665
########## 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: > since outputs are supposed to form a semiring with NO_OUTPUT being the identity, ie. we'd be using -1 as a way to represent 0. Absolutely lovely comment, made my day. -- 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