Page MenuHomePhabricator

[SECP256K1] JNI tests : remove dependency to obsolete DatatypeConverter
ClosedPublic

Authored by Fabien on Aug 9 2019, 10:46.

Details

Summary

javax.xml.bind.DatatypeConverter is no longer part of the Java JDK
since version 9. This make it impossible to build and run the JNI test
suite with any Java > 8.
This diff replaces the 2 functions from DatatypeConverter with some
very simple ones. Performance is not really an issue here as it is test
only code.

Depends on D3834.

Test Plan
./contrib/teamcity/build-secp256k1.sh # Tested with Java 8 and Java 11

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jasonbcox requested changes to this revision.Aug 9 2019, 16:09
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java
11 ↗(On Diff #10696)

assert(len % 2 != 0)

This revision now requires changes to proceed.Aug 9 2019, 16:09

Assert that the hex string length is even.

This revision is now accepted and ready to land.Aug 16 2019, 00:49