Page MenuHomePhabricator

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

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

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Project
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
Branch
secp256k1_jni_remove_dependency
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7115
Build 12276: Bitcoin ABC Teamcity Staging
Build 12275: arc lint + arc unit

Event Timeline

Fabien created this revision.Fri, Aug 9, 10:46
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Aug 9, 10:46
Fabien edited the test plan for this revision. (Show Details)Fri, Aug 9, 10:49
jasonbcox requested changes to this revision.Fri, Aug 9, 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.Fri, Aug 9, 16:09
Fabien updated this revision to Diff 10726.Mon, Aug 12, 13:11

Assert that the hex string length is even.

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