[Java] Update auto-generated bindings to 0.0.115
[ldk-java] / src / main / java / org / ldk / structs / Option_HTLCDestinationZ.java
index 68aaca31d0cc4eb2fcda6327d4ba04b777d5cd8f..c82c9dfd3f30165f18de47d8fd610b232451a0ff 100644 (file)
@@ -9,7 +9,7 @@ import javax.annotation.Nullable;
 
 
 /**
- * An enum which can either contain a crate::lightning::util::events::HTLCDestination or not
+ * An enum which can either contain a crate::lightning::events::HTLCDestination or not
  */
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class Option_HTLCDestinationZ extends CommonBase {
@@ -31,7 +31,7 @@ public class Option_HTLCDestinationZ extends CommonBase {
        }
 
        /**
-        * When we're in this state, this COption_HTLCDestinationZ contains a crate::lightning::util::events::HTLCDestination
+        * When we're in this state, this COption_HTLCDestinationZ contains a crate::lightning::events::HTLCDestination
         */
        public final static class Some extends Option_HTLCDestinationZ {
                public final org.ldk.structs.HTLCDestination some;
@@ -39,7 +39,7 @@ public class Option_HTLCDestinationZ extends CommonBase {
                        super(null, ptr);
                        long some = obj.some;
                        org.ldk.structs.HTLCDestination some_hu_conv = org.ldk.structs.HTLCDestination.constr_from_ptr(some);
-                       some_hu_conv.ptrs_to.add(this);
+                       if (some_hu_conv != null) { some_hu_conv.ptrs_to.add(this); };
                        this.some = some_hu_conv;
                }
        }
@@ -52,14 +52,15 @@ public class Option_HTLCDestinationZ extends CommonBase {
                }
        }
        /**
-        * Constructs a new COption_HTLCDestinationZ containing a crate::lightning::util::events::HTLCDestination
+        * Constructs a new COption_HTLCDestinationZ containing a crate::lightning::events::HTLCDestination
         */
-       public static Option_HTLCDestinationZ some(HTLCDestination o) {
+       public static Option_HTLCDestinationZ some(org.ldk.structs.HTLCDestination o) {
                long ret = bindings.COption_HTLCDestinationZ_some(o.ptr);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_HTLCDestinationZ ret_hu_conv = org.ldk.structs.Option_HTLCDestinationZ.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(o); };
                return ret_hu_conv;
        }
 
@@ -70,7 +71,7 @@ public class Option_HTLCDestinationZ extends CommonBase {
                long ret = bindings.COption_HTLCDestinationZ_none();
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_HTLCDestinationZ ret_hu_conv = org.ldk.structs.Option_HTLCDestinationZ.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;
        }
 
@@ -89,7 +90,7 @@ public class Option_HTLCDestinationZ extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.Option_HTLCDestinationZ ret_hu_conv = org.ldk.structs.Option_HTLCDestinationZ.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;
        }