uschindler commented on a change in pull request #579: URL: https://github.com/apache/lucene/pull/579#discussion_r781443293
########## 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: > LOL I think this change is fine -- we do rely on `==` to compare `NO_OUTPUT`, but the auto-boxing to a `static` should achieve that too. And if it is not autoboxed, it is still identity. -127L to +127L are cached Long instances, so they also compare correct with `==`. -- 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