X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FInvoiceFeatures.java;h=31bb70d1e6b48539a8c8cf58f78cfe920deef2d5;hb=1854b5cebef22ace9e9e4dd191f609818df9ce08;hp=6d075ce92d9bd786649188aa968a92ff6d0a70ab;hpb=5fd405f7a48aaeca779c45c88ec6b3d3d3dbf0e4;p=ldk-java diff --git a/src/main/java/org/ldk/structs/InvoiceFeatures.java b/src/main/java/org/ldk/structs/InvoiceFeatures.java index 6d075ce9..31bb70d1 100644 --- a/src/main/java/org/ldk/structs/InvoiceFeatures.java +++ b/src/main/java/org/ldk/structs/InvoiceFeatures.java @@ -4,6 +4,7 @@ import org.ldk.impl.bindings; import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; +import java.lang.ref.Reference; import javax.annotation.Nullable; @@ -26,12 +27,19 @@ public class InvoiceFeatures extends CommonBase { */ public boolean eq(InvoiceFeatures b) { boolean ret = bindings.InvoiceFeatures_eq(this.ptr, b == null ? 0 : b.ptr & ~1); + Reference.reachabilityFence(this); + Reference.reachabilityFence(b); this.ptrs_to.add(b); return ret; } + @Override public boolean equals(Object o) { + if (!(o instanceof InvoiceFeatures)) return false; + return this.eq((InvoiceFeatures)o); + } long clone_ptr() { long ret = bindings.InvoiceFeatures_clone_ptr(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -40,6 +48,7 @@ public class InvoiceFeatures extends CommonBase { */ public InvoiceFeatures clone() { long ret = bindings.InvoiceFeatures_clone(this.ptr); + Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } InvoiceFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new InvoiceFeatures(null, ret); } ret_hu_conv.ptrs_to.add(this); @@ -74,14 +83,7 @@ public class InvoiceFeatures extends CommonBase { */ public boolean requires_unknown_bits() { boolean ret = bindings.InvoiceFeatures_requires_unknown_bits(this.ptr); - return ret; - } - - /** - * Returns whether the `payment_secret` feature is supported. - */ - public boolean supports_payment_secret() { - boolean ret = bindings.InvoiceFeatures_supports_payment_secret(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -90,6 +92,7 @@ public class InvoiceFeatures extends CommonBase { */ public byte[] write() { byte[] ret = bindings.InvoiceFeatures_write(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -98,6 +101,7 @@ public class InvoiceFeatures extends CommonBase { */ public static Result_InvoiceFeaturesDecodeErrorZ read(byte[] ser) { long ret = bindings.InvoiceFeatures_read(ser); + Reference.reachabilityFence(ser); if (ret >= 0 && ret <= 4096) { return null; } Result_InvoiceFeaturesDecodeErrorZ ret_hu_conv = Result_InvoiceFeaturesDecodeErrorZ.constr_from_ptr(ret); return ret_hu_conv;