[Java] Update auto-generated Java structs
[ldk-java] / src / main / java / org / ldk / structs / Invoice.java
index 2299daabb209684beebe284e53f96bb6c016f4ec..6faacbd0cc475cb4495ef2100744ecc41e71df2d 100644 (file)
@@ -34,7 +34,7 @@ public class Invoice extends CommonBase {
                boolean ret = bindings.Invoice_eq(this.ptr, b == null ? 0 : b.ptr);
                Reference.reachabilityFence(this);
                Reference.reachabilityFence(b);
-               this.ptrs_to.add(b);
+               if (this != null) { this.ptrs_to.add(b); };
                return ret;
        }
 
@@ -56,7 +56,7 @@ public class Invoice extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Invoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.Invoice(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -68,8 +68,8 @@ public class Invoice extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.SignedRawInvoice ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.SignedRawInvoice(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
-               this.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
+               if (this != null) { this.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -111,7 +111,7 @@ public class Invoice extends CommonBase {
                Reference.reachabilityFence(signed_invoice);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InvoiceSemanticErrorZ ret_hu_conv = Result_InvoiceSemanticErrorZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(signed_invoice);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(signed_invoice); };
                return ret_hu_conv;
        }
 
@@ -174,7 +174,7 @@ public class Invoice extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.InvoiceFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.InvoiceFeatures(null, ret); }
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -237,7 +237,7 @@ public class Invoice extends CommonBase {
                for (int o = 0; o < ret_conv_14_len; o++) {
                        long ret_conv_14 = ret[o];
                        org.ldk.structs.PrivateRoute ret_conv_14_hu_conv = null; if (ret_conv_14 < 0 || ret_conv_14 > 4096) { ret_conv_14_hu_conv = new org.ldk.structs.PrivateRoute(null, ret_conv_14); }
-                       ret_conv_14_hu_conv.ptrs_to.add(this);
+                       if (ret_conv_14_hu_conv != null) { ret_conv_14_hu_conv.ptrs_to.add(this); };
                        ret_conv_14_arr[o] = ret_conv_14_hu_conv;
                }
                return ret_conv_14_arr;
@@ -254,7 +254,7 @@ public class Invoice extends CommonBase {
                for (int l = 0; l < ret_conv_11_len; l++) {
                        long ret_conv_11 = ret[l];
                        org.ldk.structs.RouteHint ret_conv_11_hu_conv = null; if (ret_conv_11 < 0 || ret_conv_11 > 4096) { ret_conv_11_hu_conv = new org.ldk.structs.RouteHint(null, ret_conv_11); }
-                       ret_conv_11_hu_conv.ptrs_to.add(this);
+                       if (ret_conv_11_hu_conv != null) { ret_conv_11_hu_conv.ptrs_to.add(this); };
                        ret_conv_11_arr[l] = ret_conv_11_hu_conv;
                }
                return ret_conv_11_arr;
@@ -277,7 +277,7 @@ public class Invoice extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_u64Z ret_hu_conv = org.ldk.structs.Option_u64Z.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }