Use AutoCloseable for structs named Locked*
[ldk-java] / src / main / java / org / ldk / structs / UpdateFailHTLC.java
index b1cb03290b8e7952b4a66ba17133e25b54f0b6b7..50147508fdcd19a2fc6f618437ef4c2f19f93aff 100644 (file)
@@ -7,7 +7,8 @@ public class UpdateFailHTLC extends CommonBase {
        UpdateFailHTLC(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
-               bindings.UpdateFailHTLC_free(ptr); super.finalize();
+               super.finalize();
+               bindings.UpdateFailHTLC_free(ptr);
        }
 
        public UpdateFailHTLC(UpdateFailHTLC orig) {