[Java] Update auto-generated Java structs
[ldk-java] / src / main / java / org / ldk / structs / Watch.java
index 0aa8e92a5b3ddc731769949f55820e6fd080bf7d..82ecfc05ddb6da30d1bad7894b6252fc25c08fc7 100644 (file)
@@ -86,9 +86,9 @@ public class Watch extends CommonBase {
                impl_holder.held = new Watch(new bindings.LDKWatch() {
                        @Override public long watch_channel(long funding_txo, long monitor) {
                                org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
-                               funding_txo_hu_conv.ptrs_to.add(this);
+                               if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitor monitor_hu_conv = null; if (monitor < 0 || monitor > 4096) { monitor_hu_conv = new org.ldk.structs.ChannelMonitor(null, monitor); }
-                               monitor_hu_conv.ptrs_to.add(this);
+                               if (monitor_hu_conv != null) { monitor_hu_conv.ptrs_to.add(this); };
                                Result_NoneChannelMonitorUpdateErrZ ret = arg.watch_channel(funding_txo_hu_conv, monitor_hu_conv);
                                Reference.reachabilityFence(arg);
                                long result = ret == null ? 0 : ret.clone_ptr();
@@ -96,9 +96,9 @@ public class Watch extends CommonBase {
                        }
                        @Override public long update_channel(long funding_txo, long update) {
                                org.ldk.structs.OutPoint funding_txo_hu_conv = null; if (funding_txo < 0 || funding_txo > 4096) { funding_txo_hu_conv = new org.ldk.structs.OutPoint(null, funding_txo); }
-                               funding_txo_hu_conv.ptrs_to.add(this);
+                               if (funding_txo_hu_conv != null) { funding_txo_hu_conv.ptrs_to.add(this); };
                                org.ldk.structs.ChannelMonitorUpdate update_hu_conv = null; if (update < 0 || update > 4096) { update_hu_conv = new org.ldk.structs.ChannelMonitorUpdate(null, update); }
-                               update_hu_conv.ptrs_to.add(this);
+                               if (update_hu_conv != null) { update_hu_conv.ptrs_to.add(this); };
                                Result_NoneChannelMonitorUpdateErrZ ret = arg.update_channel(funding_txo_hu_conv, update_hu_conv);
                                Reference.reachabilityFence(arg);
                                long result = ret == null ? 0 : ret.clone_ptr();
@@ -134,8 +134,8 @@ public class Watch extends CommonBase {
                Reference.reachabilityFence(monitor);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
-               this.ptrs_to.add(funding_txo);
-               this.ptrs_to.add(monitor);
+               if (this != null) { this.ptrs_to.add(funding_txo); };
+               if (this != null) { this.ptrs_to.add(monitor); };
                return ret_hu_conv;
        }
 
@@ -154,8 +154,8 @@ public class Watch extends CommonBase {
                Reference.reachabilityFence(update);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneChannelMonitorUpdateErrZ ret_hu_conv = Result_NoneChannelMonitorUpdateErrZ.constr_from_ptr(ret);
-               this.ptrs_to.add(funding_txo);
-               this.ptrs_to.add(update);
+               if (this != null) { this.ptrs_to.add(funding_txo); };
+               if (this != null) { this.ptrs_to.add(update); };
                return ret_hu_conv;
        }
 
@@ -178,7 +178,7 @@ public class Watch extends CommonBase {
                for (int x = 0; x < ret_conv_49_len; x++) {
                        long ret_conv_49 = ret[x];
                        ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ ret_conv_49_hu_conv = new ThreeTuple_OutPointCVec_MonitorEventZPublicKeyZ(null, ret_conv_49);
-                       ret_conv_49_hu_conv.ptrs_to.add(this);
+                       if (ret_conv_49_hu_conv != null) { ret_conv_49_hu_conv.ptrs_to.add(this); };
                        ret_conv_49_arr[x] = ret_conv_49_hu_conv;
                }
                return ret_conv_49_arr;