From: Matt Corallo Date: Sat, 7 Aug 2021 22:24:22 +0000 (+0000) Subject: Use explicit paths for function arguments in Java X-Git-Tag: v0.0.99.2~4 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=48908aa4bff44de4a5a7894c8f1ffc1b25a5d8d9;p=ldk-java Use explicit paths for function arguments in Java When we have an enum with a variant named the same as a struct we need to specify a full concrete path when referring to it. The simplest approach is to just use full concrete paths for all function arguments, which we do here. --- diff --git a/java_strings.py b/java_strings.py index ed9381c4..3482dfb9 100644 --- a/java_strings.py +++ b/java_strings.py @@ -1173,7 +1173,10 @@ import javax.annotation.Nullable; else: if arg.nullable: out_java_struct += "@Nullable " - out_java_struct += (arg.java_hu_ty + " " + arg.arg_name) + ty_string = arg.java_hu_ty + if arg.java_fn_ty_arg[0] == "L" and arg.java_fn_ty_arg[len(arg.java_fn_ty_arg) - 1] == ";": + ty_string = arg.java_fn_ty_arg.strip("L;").replace("/", ".") + out_java_struct += ty_string + " " + arg.arg_name out_java += (");\n") out_c += (") {\n") if out_java_struct is not None: