Use AutoCloseable for structs named Locked*
[ldk-java] / src / main / java / org / ldk / structs / NodeAnnouncementInfo.java
index 2f55d6732b9ce902d77e486ab2ecb8a12c6c54f2..e9a35ffb9f1126a5867466b96a125b0af5d058fb 100644 (file)
@@ -7,7 +7,8 @@ public class NodeAnnouncementInfo extends CommonBase {
        NodeAnnouncementInfo(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
-               bindings.NodeAnnouncementInfo_free(ptr); super.finalize();
+               super.finalize();
+               bindings.NodeAnnouncementInfo_free(ptr);
        }
 
        public NodeFeatures get_features(NodeAnnouncementInfo this_ptr) {
@@ -16,12 +17,7 @@ public class NodeAnnouncementInfo extends CommonBase {
                return ret;
        }
 
-       public void set_features(NodeAnnouncementInfo this_ptr, NodeFeatures val) {
-               bindings.NodeAnnouncementInfo_set_features(this_ptr == null ? 0 : this_ptr.ptr & ~1, val == null ? 0 : val.ptr & ~1);
-               this.ptrs_to.add(this_ptr);
-               this.ptrs_to.add(val);
-       }
-
+       // Skipped NodeAnnouncementInfo_set_features
        public int get_last_update(NodeAnnouncementInfo this_ptr) {
                int ret = bindings.NodeAnnouncementInfo_get_last_update(this_ptr == null ? 0 : this_ptr.ptr & ~1);
                this.ptrs_to.add(this_ptr);