Update auto-generated bindings to 0.0.103
[ldk-java] / src / main / java / org / ldk / structs / PeerHandleError.java
index 37e984ad0a065374b85ec58db185c3a8b6688c18..ab0f5686b1e9781751777eaf34a134576692f550 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;
 
 
 /**
@@ -42,7 +43,8 @@ public class PeerHandleError extends CommonBase {
         */
        public static PeerHandleError of(boolean no_connection_possible_arg) {
                long ret = bindings.PeerHandleError_new(no_connection_possible_arg);
-               PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new PeerHandleError(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
@@ -52,7 +54,8 @@ public class PeerHandleError extends CommonBase {
         */
        public PeerHandleError clone() {
                long ret = bindings.PeerHandleError_clone(this.ptr);
-               PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
+               if (ret >= 0 && ret <= 4096) { return null; }
+               PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new PeerHandleError(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }