X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fldk%2Fstructs%2FAPIError.java;h=f226ddccf13c4468e851ce4b6143c5a3aa30f15d;hb=ff3dacec3be60f870d81f6df11bd9fff92aa6047;hp=1410b0e51d6954c751f9b7528ab0bb9956d0636b;hpb=6d094e745feaf94c1059555cd1c997965a34bc36;p=ldk-java diff --git a/src/main/java/org/ldk/structs/APIError.java b/src/main/java/org/ldk/structs/APIError.java index 1410b0e5..f226ddcc 100644 --- a/src/main/java/org/ldk/structs/APIError.java +++ b/src/main/java/org/ldk/structs/APIError.java @@ -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; @@ -50,7 +51,7 @@ public class APIError extends CommonBase { /** * A human-readable error message */ - public final String err; + public final java.lang.String err; private APIMisuseError(long ptr, bindings.LDKAPIError.APIMisuseError obj) { super(null, ptr); this.err = obj.err; @@ -65,7 +66,7 @@ public class APIError extends CommonBase { /** * A human-readable error message */ - public final String err; + public final java.lang.String err; /** * The feerate which was too high. */ @@ -84,7 +85,7 @@ public class APIError extends CommonBase { /** * A human-readable error message */ - public final String err; + public final java.lang.String err; private RouteError(long ptr, bindings.LDKAPIError.RouteError obj) { super(null, ptr); this.err = obj.err; @@ -99,7 +100,7 @@ public class APIError extends CommonBase { /** * A human-readable error message */ - public final String err; + public final java.lang.String err; private ChannelUnavailable(long ptr, bindings.LDKAPIError.ChannelUnavailable obj) { super(null, ptr); this.err = obj.err; @@ -128,7 +129,7 @@ public class APIError extends CommonBase { /** * The incompatible shutdown script. */ - public final ShutdownScript script; + public final org.ldk.structs.ShutdownScript script; private IncompatibleShutdownScript(long ptr, bindings.LDKAPIError.IncompatibleShutdownScript obj) { super(null, ptr); long script = obj.script; @@ -139,6 +140,7 @@ public class APIError extends CommonBase { } long clone_ptr() { long ret = bindings.APIError_clone_ptr(this.ptr); + Reference.reachabilityFence(this); return ret; } @@ -147,8 +149,9 @@ public class APIError extends CommonBase { */ public APIError clone() { long ret = bindings.APIError_clone(this.ptr); + Reference.reachabilityFence(this); if (ret >= 0 && ret <= 4096) { return null; } - APIError ret_hu_conv = APIError.constr_from_ptr(ret); + org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(this); return ret_hu_conv; } @@ -158,8 +161,9 @@ public class APIError extends CommonBase { */ public static APIError apimisuse_error(java.lang.String err) { long ret = bindings.APIError_apimisuse_error(err); + Reference.reachabilityFence(err); if (ret >= 0 && ret <= 4096) { return null; } - APIError ret_hu_conv = APIError.constr_from_ptr(ret); + org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } @@ -169,8 +173,10 @@ public class APIError extends CommonBase { */ public static APIError fee_rate_too_high(java.lang.String err, int feerate) { long ret = bindings.APIError_fee_rate_too_high(err, feerate); + Reference.reachabilityFence(err); + Reference.reachabilityFence(feerate); if (ret >= 0 && ret <= 4096) { return null; } - APIError ret_hu_conv = APIError.constr_from_ptr(ret); + org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } @@ -180,8 +186,9 @@ public class APIError extends CommonBase { */ public static APIError route_error(java.lang.String err) { long ret = bindings.APIError_route_error(err); + Reference.reachabilityFence(err); if (ret >= 0 && ret <= 4096) { return null; } - APIError ret_hu_conv = APIError.constr_from_ptr(ret); + org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } @@ -191,8 +198,9 @@ public class APIError extends CommonBase { */ public static APIError channel_unavailable(java.lang.String err) { long ret = bindings.APIError_channel_unavailable(err); + Reference.reachabilityFence(err); if (ret >= 0 && ret <= 4096) { return null; } - APIError ret_hu_conv = APIError.constr_from_ptr(ret); + org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } @@ -203,7 +211,7 @@ public class APIError extends CommonBase { public static APIError monitor_update_failed() { long ret = bindings.APIError_monitor_update_failed(); if (ret >= 0 && ret <= 4096) { return null; } - APIError ret_hu_conv = APIError.constr_from_ptr(ret); + org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; } @@ -213,8 +221,9 @@ public class APIError extends CommonBase { */ public static APIError incompatible_shutdown_script(ShutdownScript script) { long ret = bindings.APIError_incompatible_shutdown_script(script == null ? 0 : script.ptr & ~1); + Reference.reachabilityFence(script); if (ret >= 0 && ret <= 4096) { return null; } - APIError ret_hu_conv = APIError.constr_from_ptr(ret); + org.ldk.structs.APIError ret_hu_conv = org.ldk.structs.APIError.constr_from_ptr(ret); ret_hu_conv.ptrs_to.add(ret_hu_conv); return ret_hu_conv; }