fix: wrap_java

This commit is contained in:
reider745
2026-07-05 08:59:10 +03:00
parent 57e5d0b5d4
commit a0b678a7f8
4 changed files with 3 additions and 4 deletions
@@ -989,7 +989,7 @@ public final class JavaBindingGenerator {
return expr + " instanceof Wrapper ? (long) ((Wrapper) " + expr + ").unwrap() : ((Number) "
+ expr + ").longValue()";
} else if (arg.type.equals(BASE_TYPE_STRING)) {
return expr + " instanceof String ? " + expr + ".toString() : (" + expr + " != null && " + expr
return expr + " instanceof CharSequence ? " + expr + ".toString() : (" + expr + " != null && " + expr
+ " != Undefined.instance ? ScriptRuntime.toString(" + expr + ") : " + nullCase + ")";
} else if (arg.type.equals(BASE_TYPE_BOOL)) {
return expr + " instanceof Boolean ? (Boolean) " + expr + " : ScriptRuntime.toBoolean(" + expr + ")";