Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / UpdateFulfillHTLC.java
index 5c74f8bc82eeac4bb8078c8863a57513113eda9e..0b34f89869b7c4680a420611ca0670d35bc62653 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import javax.annotation.Nullable;
 
 
 /**
@@ -68,7 +69,8 @@ public class UpdateFulfillHTLC extends CommonBase {
         */
        public static UpdateFulfillHTLC of(byte[] channel_id_arg, long htlc_id_arg, byte[] payment_preimage_arg) {
                long ret = bindings.UpdateFulfillHTLC_new(channel_id_arg, htlc_id_arg, payment_preimage_arg);
-               UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UpdateFulfillHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UpdateFulfillHTLC(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
@@ -78,7 +80,8 @@ public class UpdateFulfillHTLC extends CommonBase {
         */
        public UpdateFulfillHTLC clone() {
                long ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
-               UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               UpdateFulfillHTLC ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new UpdateFulfillHTLC(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -96,6 +99,7 @@ public class UpdateFulfillHTLC extends CommonBase {
         */
        public static Result_UpdateFulfillHTLCDecodeErrorZ read(byte[] ser) {
                long ret = bindings.UpdateFulfillHTLC_read(ser);
+               if (ret >= 0 && ret <= 4096) { return null; }
                Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }