[Java] Update auto-generated Java files
[ldk-java] / src / main / java / org / ldk / structs / BackgroundProcessor.java
index 17ea0f3ef4879e120278997dc6ac2e25e9f5e260..fbb0a917919fe07dd2955a3e3c92cdf63ed746ec 100644 (file)
@@ -89,11 +89,9 @@ public class BackgroundProcessor extends CommonBase {
         * [`Persister::persist_graph`]: lightning::util::persist::Persister::persist_graph
         * [`NetworkGraph`]: lightning::routing::gossip::NetworkGraph
         * [`NetworkGraph::write`]: lightning::routing::gossip::NetworkGraph#impl-Writeable
-        * 
-        * Note that scorer (or a relevant inner pointer) may be NULL or all-0s to represent None
         */
-       public static BackgroundProcessor start(Persister persister, EventHandler event_handler, ChainMonitor chain_monitor, ChannelManager channel_manager, GossipSync gossip_sync, PeerManager peer_manager, Logger logger, @Nullable MultiThreadedLockableScore scorer) {
-               long ret = bindings.BackgroundProcessor_start(persister == null ? 0 : persister.ptr, event_handler == null ? 0 : event_handler.ptr, chain_monitor == null ? 0 : chain_monitor.ptr & ~1, channel_manager == null ? 0 : channel_manager.ptr & ~1, gossip_sync.ptr, peer_manager == null ? 0 : peer_manager.ptr & ~1, logger == null ? 0 : logger.ptr, scorer == null ? 0 : scorer.ptr & ~1);
+       public static BackgroundProcessor start(Persister persister, EventHandler event_handler, ChainMonitor chain_monitor, ChannelManager channel_manager, GossipSync gossip_sync, PeerManager peer_manager, Logger logger, Option_WriteableScoreZ scorer) {
+               long ret = bindings.BackgroundProcessor_start(persister == null ? 0 : persister.ptr, event_handler == null ? 0 : event_handler.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, channel_manager == null ? 0 : channel_manager.ptr, gossip_sync.ptr, peer_manager == null ? 0 : peer_manager.ptr, logger == null ? 0 : logger.ptr, scorer.ptr);
                Reference.reachabilityFence(persister);
                Reference.reachabilityFence(event_handler);
                Reference.reachabilityFence(chain_monitor);
@@ -104,14 +102,14 @@ public class BackgroundProcessor extends CommonBase {
                Reference.reachabilityFence(scorer);
                if (ret >= 0 && ret <= 4096) { return null; }
                org.ldk.structs.BackgroundProcessor ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.BackgroundProcessor(null, ret); }
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(persister);
-               ret_hu_conv.ptrs_to.add(event_handler);
-               ret_hu_conv.ptrs_to.add(chain_monitor);
-               ret_hu_conv.ptrs_to.add(channel_manager);
-               ret_hu_conv.ptrs_to.add(peer_manager);
-               ret_hu_conv.ptrs_to.add(logger);
-               ret_hu_conv.ptrs_to.add(scorer);
+               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(persister); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(event_handler); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(chain_monitor); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(channel_manager); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(peer_manager); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(logger); };
+               if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(scorer); };
                return ret_hu_conv;
        }
 
@@ -131,7 +129,7 @@ public class BackgroundProcessor extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
-               this.ptrs_to.add(this);
+               if (this != null) { this.ptrs_to.add(this); };
                // Due to rust's strict-ownership memory model, in some cases we need to "move"
                // an object to pass exclusive ownership to the function being called.
                // In most cases, we avoid this being visible in GC'd languages by cloning the object
@@ -159,7 +157,7 @@ public class BackgroundProcessor extends CommonBase {
                Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_NoneErrorZ ret_hu_conv = Result_NoneErrorZ.constr_from_ptr(ret);
-               this.ptrs_to.add(this);
+               if (this != null) { this.ptrs_to.add(this); };
                // Due to rust's strict-ownership memory model, in some cases we need to "move"
                // an object to pass exclusive ownership to the function being called.
                // In most cases, we avoid this being visible in GC'd languages by cloning the object