]> git.bitcoin.ninja Git - ldk-java/commit
Hold a reference when we pass Option<Trait> to rust
authorMatt Corallo <git@bluematt.me>
Thu, 11 Nov 2021 17:34:41 +0000 (17:34 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 11 Nov 2021 17:38:32 +0000 (17:38 +0000)
commita46cc8c472582d1b094f73ded7d691c4695bed0d
treea1800ec2c838c7032213ba9a28695a69cf69b8d4
parentd294ad273a3d99aa2857efb10b225a2e20c84a16
Hold a reference when we pass Option<Trait> to rust

This resolves a NPE when calling trait methods if the user doesn't
hold their own reference to the underlying trait, which is quite
possible for, eg, the `Filter` object.

We also adapt `HumanObjectPeerTest` to test this with a `Filter`.
gen_type_mapping.py
src/test/java/org/ldk/HumanObjectPeerTest.java