[Java] Update auto-generated Java bindings
[ldk-java] / src / main / java / org / ldk / structs / ChannelManager.java
index 33ea282eba908f522a366a278342b12769f54aa9..c0817308dc3d93ca7f60b949e984a4624d4a41b2 100644 (file)
@@ -78,12 +78,12 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(params);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ChannelManager ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelManager(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(fee_est);
-               ret_hu_conv.ptrs_to.add(chain_monitor);
-               ret_hu_conv.ptrs_to.add(tx_broadcaster);
-               ret_hu_conv.ptrs_to.add(logger);
-               ret_hu_conv.ptrs_to.add(keys_manager);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(fee_est); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(chain_monitor); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(tx_broadcaster); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(keys_manager); };
                return ret_hu_conv;
        }
 
@@ -95,7 +95,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.UserConfig ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.UserConfig(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;
        }
 
@@ -154,7 +154,7 @@ public class ChannelManager extends CommonBase {
                for (int q = 0; q < ret_conv_16_len; q++) {
                        long ret_conv_16 = ret[q];
                        org.ldk.structs.ChannelDetails ret_conv_16_hu_conv = null; if (ret_conv_16 < 0 || ret_conv_16 > 4096) { ret_conv_16_hu_conv = new org.ldk.structs.ChannelDetails(null, ret_conv_16); }
-                       ret_conv_16_hu_conv.ptrs_to.add(this);
+                       if (ret_conv_16_hu_conv != null) { ret_conv_16_hu_conv.ptrs_to.add(this); };
                        ret_conv_16_arr[q] = ret_conv_16_hu_conv;
                }
                return ret_conv_16_arr;
@@ -178,7 +178,7 @@ public class ChannelManager extends CommonBase {
                for (int q = 0; q < ret_conv_16_len; q++) {
                        long ret_conv_16 = ret[q];
                        org.ldk.structs.ChannelDetails ret_conv_16_hu_conv = null; if (ret_conv_16 < 0 || ret_conv_16 > 4096) { ret_conv_16_hu_conv = new org.ldk.structs.ChannelDetails(null, ret_conv_16); }
-                       ret_conv_16_hu_conv.ptrs_to.add(this);
+                       if (ret_conv_16_hu_conv != null) { ret_conv_16_hu_conv.ptrs_to.add(this); };
                        ret_conv_16_arr[q] = ret_conv_16_hu_conv;
                }
                return ret_conv_16_arr;
@@ -348,7 +348,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(payment_secret);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_PaymentIdPaymentSendFailureZ ret_hu_conv = Result_PaymentIdPaymentSendFailureZ.constr_from_ptr(ret);
-               this.ptrs_to.add(route);
+               if (this != null) { this.ptrs_to.add(route); };
                return ret_hu_conv;
        }
 
@@ -371,7 +371,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(payment_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NonePaymentSendFailureZ ret_hu_conv = Result_NonePaymentSendFailureZ.constr_from_ptr(ret);
-               this.ptrs_to.add(route);
+               if (this != null) { this.ptrs_to.add(route); };
                return ret_hu_conv;
        }
 
@@ -422,7 +422,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(payment_preimage);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ ret_hu_conv = Result_C2Tuple_PaymentHashPaymentIdZPaymentSendFailureZ.constr_from_ptr(ret);
-               this.ptrs_to.add(route);
+               if (this != null) { this.ptrs_to.add(route); };
                return ret_hu_conv;
        }
 
@@ -543,7 +543,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(config);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
-               this.ptrs_to.add(config);
+               if (this != null) { this.ptrs_to.add(config); };
                return ret_hu_conv;
        }
 
@@ -868,7 +868,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PhantomRouteHints ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PhantomRouteHints(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;
        }
 
@@ -881,7 +881,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(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;
        }
 
@@ -894,7 +894,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                EventsProvider ret_hu_conv = new EventsProvider(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;
        }
 
@@ -907,7 +907,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Listen ret_hu_conv = new Listen(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;
        }
 
@@ -920,7 +920,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Confirm ret_hu_conv = new Confirm(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;
        }
 
@@ -958,7 +958,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.BestBlock ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BestBlock(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;
        }
 
@@ -971,7 +971,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(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;
        }
 
@@ -993,7 +993,7 @@ public class ChannelManager extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Payer ret_hu_conv = new Payer(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;
        }