[Java] Update auto-generated Java structs
[ldk-java] / src / main / java / org / ldk / structs / ChainMonitor.java
index 70c7ce0e371b144e84bc06daaca036e1bf3c79f9..8efa473894a40dc86f999540386e3b8f3a1702f6 100644 (file)
@@ -46,12 +46,12 @@ public class ChainMonitor extends CommonBase {
                Reference.reachabilityFence(persister);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.ChainMonitor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChainMonitor(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(chain_source);
-               ret_hu_conv.ptrs_to.add(broadcaster);
-               ret_hu_conv.ptrs_to.add(logger);
-               ret_hu_conv.ptrs_to.add(feeest);
-               ret_hu_conv.ptrs_to.add(persister);
+               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(chain_source); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(broadcaster); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(feeest); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(persister); };
                return ret_hu_conv;
        }
 
@@ -75,10 +75,10 @@ public class ChainMonitor extends CommonBase {
                for (int j = 0; j < ret_conv_9_len; j++) {
                        long ret_conv_9 = ret[j];
                        org.ldk.structs.Balance ret_conv_9_hu_conv = org.ldk.structs.Balance.constr_from_ptr(ret_conv_9);
-                       ret_conv_9_hu_conv.ptrs_to.add(this);
+                       if (ret_conv_9_hu_conv != null) { ret_conv_9_hu_conv.ptrs_to.add(this); };
                        ret_conv_9_arr[j] = ret_conv_9_hu_conv;
                }
-               for (ChannelDetails ignored_channels_conv_16: ignored_channels) { this.ptrs_to.add(ignored_channels_conv_16); };
+               for (ChannelDetails ignored_channels_conv_16: ignored_channels) { if (this != null) { this.ptrs_to.add(ignored_channels_conv_16); }; };
                return ret_conv_9_arr;
        }
 
@@ -95,7 +95,7 @@ public class ChainMonitor extends CommonBase {
                Reference.reachabilityFence(funding_txo);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_LockedChannelMonitorNoneZ ret_hu_conv = Result_LockedChannelMonitorNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(funding_txo);
+               if (this != null) { this.ptrs_to.add(funding_txo); };
                return ret_hu_conv;
        }
 
@@ -113,7 +113,7 @@ public class ChainMonitor extends CommonBase {
                for (int k = 0; k < ret_conv_10_len; k++) {
                        long ret_conv_10 = ret[k];
                        org.ldk.structs.OutPoint ret_conv_10_hu_conv = null; if (ret_conv_10 < 0 || ret_conv_10 > 4096) { ret_conv_10_hu_conv = new org.ldk.structs.OutPoint(null, ret_conv_10); }
-                       ret_conv_10_hu_conv.ptrs_to.add(this);
+                       if (ret_conv_10_hu_conv != null) { ret_conv_10_hu_conv.ptrs_to.add(this); };
                        ret_conv_10_arr[k] = ret_conv_10_hu_conv;
                }
                return ret_conv_10_arr;
@@ -141,8 +141,8 @@ public class ChainMonitor extends CommonBase {
                Reference.reachabilityFence(completed_update_id);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneAPIErrorZ ret_hu_conv = Result_NoneAPIErrorZ.constr_from_ptr(ret);
-               this.ptrs_to.add(funding_txo);
-               this.ptrs_to.add(completed_update_id);
+               if (this != null) { this.ptrs_to.add(funding_txo); };
+               if (this != null) { this.ptrs_to.add(completed_update_id); };
                return ret_hu_conv;
        }
 
@@ -155,7 +155,7 @@ public class ChainMonitor 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;
        }
 
@@ -168,7 +168,7 @@ public class ChainMonitor 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;
        }
 
@@ -181,7 +181,7 @@ public class ChainMonitor extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Watch ret_hu_conv = new Watch(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;
        }
 
@@ -194,7 +194,7 @@ public class ChainMonitor 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;
        }