[Java] Add a reachabilityFence on underlying trait impl calls
authorMatt Corallo <git@bluematt.me>
Thu, 3 Mar 2022 02:32:15 +0000 (02:32 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 3 Mar 2022 06:26:21 +0000 (06:26 +0000)
commit1f873e8aeb7a8395a7a99d244fba7474a0543278
tree097730577fcbd745c9836fae8c1443abb8852681
parentdc1457cedad113904e9120d9427c527f3c72e25f
[Java] Add a reachabilityFence on underlying trait impl calls

Because the implementation instance is implicitly held as a
reference in the `held` field, it seems unlikely this could ever
matter, hwoever, in the simplified implementation in `PeerTest`
(where there is no Human instance to hold a reference to the
underlying bindings instance), we do see the implementation being
free'd while its still in use. Thus, to ensure we can't hit any
such issue in the future, we add one in normal human objects as
well.
java_strings.py
src/test/java/org/ldk/PeerTest.java