You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Gus Heck <gu...@gmail.com> on 2018/10/10 02:31:26 UTC
Funny constants in MaxMetric class
https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/metrics/MaxMetric.java#L28
Seems like the default value for longs in the MaxMetric is probably not
right?
--
http://www.the111shift.com
Re: Funny constants in MaxMetric class
Posted by Gus Heck <gu...@gmail.com>.
Once I came back to actually check it out I of course realized that it's the
same as Long.MIN_VALUE
<https://en.wikipedia.org/wiki/Two%27s_complement#Most_negative_number>...
just harder to read at a glance, and the -Long.MIN_VALUE version gets
flagged by the IDE for numeric overflow... why not just use Long.MIN_VALUE?
On Tue, Oct 9, 2018 at 10:31 PM Gus Heck <gu...@gmail.com> wrote:
>
> https://github.com/apache/lucene-solr/blob/master/solr/solrj/src/java/org/apache/solr/client/solrj/io/stream/metrics/MaxMetric.java#L28
>
> Seems like the default value for longs in the MaxMetric is probably not
> right?
>
> --
> http://www.the111shift.com
>
--
http://www.the111shift.com