<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Sorry for beating the dead horse of ObjectIdentifier.java change, but I’d suggest that if that code is later revisited, it be changed to "first.compareTo(BigInteger.TWO) > 0" instead of “… == 1”.<div class=""><br class=""></div><div class="">Comparing the return value of compareTo to zero (instead of relying on specific set of return values) is the “suggested idiom for performing these comparisons" as per BigInteger JavaDoc[1] and consistent with the contract of Comparable.compareTo (even though same BigInteger JavaDoc also explicitly specifies that the return values in this particular case are indeed -1, 0, and 1). <div class=""><br class=""></div><div class="">Attila.</div><div class=""><div class=""><br class=""></div><div class="">[1] <a href="http://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html#compareTo-java.math.BigInteger-" class="">http://docs.oracle.com/javase/8/docs/api/java/math/BigInteger.html#compareTo-java.math.BigInteger-</a><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 23 Mar 2016, at 12:23, Xuelei Fan <<a href="mailto:xuelei.fan@oracle.com" class="">xuelei.fan@oracle.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 3/23/2016 5:44 PM, Wang Weijun wrote:<br class=""><blockquote type="cite" class="">Then why not fix the 2 bugs in a single changeset?<br class=""><br class=""></blockquote>Both need spec update approval. As they are completely different spec<br class="">update, better to update in 2 enhancements.<br class=""><br class="">As you have concerns here, I removed ObjectIdentifier.java from this<br class="">update. See the new webrev:<br class=""><br class=""> <a href="http://cr.openjdk.java.net/~xuelei/8152237/webrev.01/" class="">http://cr.openjdk.java.net/~xuelei/8152237/webrev.01/</a><br class=""><br class="">Xuelei<br class=""><br class=""><blockquote type="cite" class="">--Max<br class=""><br class=""><blockquote type="cite" class="">在 2016年3月23日,17:06,Xuelei Fan <<a href="mailto:xuelei.fan@oracle.com" class="">xuelei.fan@oracle.com</a>> 写道:<br class=""><br class=""><blockquote type="cite" class="">On 3/23/2016 3:34 PM, Wang Weijun wrote:<br class=""><br class=""><blockquote type="cite" class="">On Mar 23, 2016, at 12:48 PM, Xuelei Fan <<a href="mailto:Xuelei.Fan@oracle.com" class="">Xuelei.Fan@Oracle.COM</a>> wrote:<br class=""><br class="">On 3/23/2016 12:10 PM, Wang Weijun wrote:<br class=""><blockquote type="cite" class="">Only 3 files touched. Are you going to make the s/BigInteger.valueOf(2)/BigInteger.TWO/ changes in other files with another bug fix?<br class=""></blockquote>There are also uses in security components. I will make the update in another bug.<br class=""></blockquote><br class="">I see. But why is ObjectIdentifier.java included in this fix?<br class=""></blockquote>It happens that the other bug touch those files, but<br class="">ObjectIdentifier.java is not related to that bug.<br class=""><br class="">Does it make sense?<br class=""><br class="">Thanks,<br class="">Xuelei<br class=""><br class=""><blockquote type="cite" class="">In you only keep BigInteger and BigDecimal, then I have no other comment.<br class=""><br class="">Thanks<br class="">Max<br class=""><br class=""><blockquote type="cite" class=""><br class="">Thanks,<br class="">Xuelei<br class=""><br class=""><blockquote type="cite" class="">Thanks<br class="">Max<br class=""><br class=""><blockquote type="cite" class="">On Mar 23, 2016, at 11:26 AM, Xuelei Fan <<a href="mailto:xuelei.fan@oracle.com" class="">xuelei.fan@oracle.com</a>> wrote:<br class=""><br class="">Hi,<br class=""><br class="">Please review the update for the supporting of BigInteger.TWO:<br class=""><br class=""> <a href="http://cr.openjdk.java.net/~xuelei/8152237/webrev/" class="">http://cr.openjdk.java.net/~xuelei/8152237/webrev/</a><br class=""><br class="">BigInteger.valueOf(2) is a common BigInteger value used in binary and cryptography operation calculation. The BigInteger.TWO is not exported, and hence BigInteger.valueOf(2) is used instead in applications and JDK components. The export of static BigInteger.TWO can improve performance and simplify existing code.<br class=""><br class="">Thanks,<br class="">Xuelei<br class=""></blockquote></blockquote></blockquote></blockquote><br class=""></blockquote><br class=""></blockquote><br class=""></div></div></blockquote></div><br class=""></div></div></div></div></body></html>