projects
/
ldk-java
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #117 from TheBlueMatt/2022-08-fix-npe
[ldk-java]
/
src
/
main
/
java
/
org
/
ldk
/
structs
/
TwoTuple_OutPointScriptZ.java
diff --git
a/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java
b/src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java
index 2cb31e27bfa37983156d66390bd776e66907362a..c0f48c10b3114cd74615bf8af0dc128401d5758c 100644
(file)
--- a/
src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java
+++ b/
src/main/java/org/ldk/structs/TwoTuple_OutPointScriptZ.java
@@
-4,6
+4,7
@@
import org.ldk.impl.bindings;
import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import java.lang.ref.Reference;
import javax.annotation.Nullable;
import javax.annotation.Nullable;
@@
-24,9
+25,10
@@
public class TwoTuple_OutPointScriptZ extends CommonBase {
*/
public OutPoint get_a() {
long ret = bindings.C2Tuple_OutPointScriptZ_get_a(this.ptr);
*/
public OutPoint get_a() {
long ret = bindings.C2Tuple_OutPointScriptZ_get_a(this.ptr);
+ Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
if (ret >= 0 && ret <= 4096) { return null; }
-
OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new
OutPoint(null, ret); }
-
ret_hu_conv.ptrs_to.add(this)
;
+
org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.
OutPoint(null, ret); }
+
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }
;
return ret_hu_conv;
}
return ret_hu_conv;
}
@@
-35,11
+37,13
@@
public class TwoTuple_OutPointScriptZ extends CommonBase {
*/
public byte[] get_b() {
byte[] ret = bindings.C2Tuple_OutPointScriptZ_get_b(this.ptr);
*/
public byte[] get_b() {
byte[] ret = bindings.C2Tuple_OutPointScriptZ_get_b(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
long clone_ptr() {
long ret = bindings.C2Tuple_OutPointScriptZ_clone_ptr(this.ptr);
return ret;
}
long clone_ptr() {
long ret = bindings.C2Tuple_OutPointScriptZ_clone_ptr(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
return ret;
}
@@
-49,9
+53,10
@@
public class TwoTuple_OutPointScriptZ extends CommonBase {
*/
public TwoTuple_OutPointScriptZ clone() {
long ret = bindings.C2Tuple_OutPointScriptZ_clone(this.ptr);
*/
public TwoTuple_OutPointScriptZ clone() {
long ret = bindings.C2Tuple_OutPointScriptZ_clone(this.ptr);
+ Reference.reachabilityFence(this);
if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
-
ret_hu_conv.ptrs_to.add(this)
;
+
if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); }
;
return ret_hu_conv;
}
return ret_hu_conv;
}
@@
-59,10
+64,13
@@
public class TwoTuple_OutPointScriptZ extends CommonBase {
* Creates a new C2Tuple_OutPointScriptZ from the contained elements.
*/
public static TwoTuple_OutPointScriptZ of(OutPoint a, byte[] b) {
* Creates a new C2Tuple_OutPointScriptZ from the contained elements.
*/
public static TwoTuple_OutPointScriptZ of(OutPoint a, byte[] b) {
- long ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr & ~1, b);
+ long ret = bindings.C2Tuple_OutPointScriptZ_new(a == null ? 0 : a.ptr, b);
+ Reference.reachabilityFence(a);
+ Reference.reachabilityFence(b);
if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
if (ret >= 0 && ret <= 4096) { return null; }
TwoTuple_OutPointScriptZ ret_hu_conv = new TwoTuple_OutPointScriptZ(null, ret);
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ 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(a); };
return ret_hu_conv;
}
return ret_hu_conv;
}