[Java] Update auto-generated Java bindings for 0.0.113
[ldk-java] / src / main / java / org / ldk / structs / PaymentError.java
index 458abea8a0a9e2581d7f6df17cf27925697bac4e..e4bc100abe14744f469a35eb7375fc213c289eb9 100644 (file)
@@ -52,7 +52,7 @@ public class PaymentError extends CommonBase {
                        super(null, ptr);
                        long routing = obj.routing;
                        org.ldk.structs.LightningError routing_hu_conv = null; if (routing < 0 || routing > 4096) { routing_hu_conv = new org.ldk.structs.LightningError(null, routing); }
-                       routing_hu_conv.ptrs_to.add(this);
+                       if (routing_hu_conv != null) { routing_hu_conv.ptrs_to.add(this); };
                        this.routing = routing_hu_conv;
                }
        }
@@ -65,7 +65,7 @@ public class PaymentError extends CommonBase {
                        super(null, ptr);
                        long sending = obj.sending;
                        org.ldk.structs.PaymentSendFailure sending_hu_conv = org.ldk.structs.PaymentSendFailure.constr_from_ptr(sending);
-                       sending_hu_conv.ptrs_to.add(this);
+                       if (sending_hu_conv != null) { sending_hu_conv.ptrs_to.add(this); };
                        this.sending = sending_hu_conv;
                }
        }
@@ -83,7 +83,7 @@ public class PaymentError extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PaymentError ret_hu_conv = org.ldk.structs.PaymentError.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(this);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }
 
@@ -95,31 +95,32 @@ public class PaymentError extends CommonBase {
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PaymentError ret_hu_conv = org.ldk.structs.PaymentError.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                return ret_hu_conv;
        }
 
        /**
         * Utility method to constructs a new Routing-variant PaymentError
         */
-       public static PaymentError routing(LightningError a) {
-               long ret = bindings.PaymentError_routing(a == null ? 0 : a.ptr & ~1);
+       public static PaymentError routing(org.ldk.structs.LightningError a) {
+               long ret = bindings.PaymentError_routing(a == null ? 0 : a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PaymentError ret_hu_conv = org.ldk.structs.PaymentError.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               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(a); };
                return ret_hu_conv;
        }
 
        /**
         * Utility method to constructs a new Sending-variant PaymentError
         */
-       public static PaymentError sending(PaymentSendFailure a) {
+       public static PaymentError sending(org.ldk.structs.PaymentSendFailure a) {
                long ret = bindings.PaymentError_sending(a.ptr);
                Reference.reachabilityFence(a);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.PaymentError ret_hu_conv = org.ldk.structs.PaymentError.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                return ret_hu_conv;
        }