[Java] Properly convert strings to/from Modified UTF-8
[ldk-java] / src / main / java / org / ldk / structs / Option_CVec_NetAddressZZ.java
index 3ecf1dfacaa654f950615ff6b742d2398c3f7e6a..09c22d9b4eebf36eb0411c8d07708478740a83c9 100644 (file)
@@ -42,8 +42,8 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                        NetAddress[] some_conv_12_arr = new NetAddress[some_conv_12_len];
                        for (int m = 0; m < some_conv_12_len; m++) {
                                long some_conv_12 = some[m];
-                               NetAddress some_conv_12_hu_conv = NetAddress.constr_from_ptr(some_conv_12);
-                               some_conv_12_hu_conv.ptrs_to.add(this);
+                               org.ldk.structs.NetAddress some_conv_12_hu_conv = org.ldk.structs.NetAddress.constr_from_ptr(some_conv_12);
+                               if (some_conv_12_hu_conv != null) { some_conv_12_hu_conv.ptrs_to.add(this); };
                                some_conv_12_arr[m] = some_conv_12_hu_conv;
                        }
                        this.some = some_conv_12_arr;
@@ -64,8 +64,9 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                long ret = bindings.COption_CVec_NetAddressZZ_some(o != null ? Arrays.stream(o).mapToLong(o_conv_12 -> o_conv_12.ptr).toArray() : null);
                Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
+               for (NetAddress o_conv_12: o) { if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(o_conv_12); }; };
                return ret_hu_conv;
        }
 
@@ -75,8 +76,8 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
        public static Option_CVec_NetAddressZZ none() {
                long ret = bindings.COption_CVec_NetAddressZZ_none();
                if (ret >= 0 && ret <= 4096) { return null; }
-               Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
                return ret_hu_conv;
        }
 
@@ -94,8 +95,8 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                long ret = bindings.COption_CVec_NetAddressZZ_clone(this.ptr);
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
-               Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret);
-               ret_hu_conv.ptrs_to.add(this);
+               org.ldk.structs.Option_CVec_NetAddressZZ ret_hu_conv = org.ldk.structs.Option_CVec_NetAddressZZ.constr_from_ptr(ret);
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };
                return ret_hu_conv;
        }