-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Java 9 BigInteger constructors #9953
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In more closely looking at the Javadoc for BigInteger, I see there is another new constructor:
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigInteger.html#%3Cinit%3E(int,byte%5B%5D,int,int)
There are also other new methods (sqrt
, sqrtAndRemainder
), and a new constant TWO. I'll make another issue for these new members, but as long as the other constructor is similar work, it seems worth adding now?
user/test/com/google/gwt/emultest/java/math/BigIntegerConstructorsTest.java
Outdated
Show resolved
Hide resolved
user/test/com/google/gwt/emultest/java/math/BigIntegerConstructorsTest.java
Outdated
Show resolved
Hide resolved
having a byte[] with zero length is allowed for constructor BigInteger(int signum, byte[] val, int offset, int length)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full build passed: https://github.com/vegegoku/gwt/actions/runs/9192280404
Emulate the
BigInteger(byte[] bytes, int offset, int length)
andBigInteger(int signum, byte[] magnitude, int offset, int length)
constructors that were added in java 9.Fixes #9901