Update auto-updated Java files
[ldk-java] / src / main / java / org / ldk / structs / Option_FilterZ.java
index 117215e19381560dfcffbafd71ce6f787bcaf784..d94c6de20b669d368d23307257ff8ee2401f2002 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import java.lang.ref.Reference;
 import javax.annotation.Nullable;
 
 
@@ -29,6 +30,9 @@ public class Option_FilterZ extends CommonBase {
                assert false; return null; // Unreachable without extending the (internal) bindings interface
        }
 
+       /**
+        * When we're in this state, this COption_FilterZ contains a crate::lightning::chain::Filter
+        */
        public final static class Some extends Option_FilterZ {
                public final Filter some;
                private Some(long ptr, bindings.LDKCOption_FilterZ.Some obj) {
@@ -39,6 +43,9 @@ public class Option_FilterZ extends CommonBase {
                        this.some = ret_hu_conv;
                }
        }
+       /**
+        * When we're in this state, this COption_FilterZ contains nothing
+        */
        public final static class None extends Option_FilterZ {
                private None(long ptr, bindings.LDKCOption_FilterZ.None obj) {
                        super(null, ptr);
@@ -49,7 +56,8 @@ public class Option_FilterZ extends CommonBase {
         */
        public static Option_FilterZ some(Filter o) {
                long ret = bindings.COption_FilterZ_some(o == null ? 0 : o.ptr);
-               if (ret < 1024) { return null; }
+               Reference.reachabilityFence(o);
+               if (ret >= 0 && ret <= 4096) { return null; }
                Option_FilterZ ret_hu_conv = Option_FilterZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(o);
@@ -61,7 +69,7 @@ public class Option_FilterZ extends CommonBase {
         */
        public static Option_FilterZ none() {
                long ret = bindings.COption_FilterZ_none();
-               if (ret < 1024) { return null; }
+               if (ret >= 0 && ret <= 4096) { return null; }
                Option_FilterZ ret_hu_conv = Option_FilterZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;