We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
此段代码如果输出的结果是非 String 类型 的数据会报错,因为无法强转,建议改为
/**
The text was updated successfully, but these errors were encountered:
当然详细的内容我并没有测试,这个例子并不知道会产生什么后果,,仅供参考
Sorry, something went wrong.
这个方法就是假设你传入的参数是字符串,如果不是,请自己明确去转换,比如自己实现一个 to_string 方法。 隐式转换带来的 bug 将很难查。
to_string
No branches or pull requests
此段代码如果输出的结果是非 String 类型 的数据会报错,因为无法强转,建议改为
/**
*/
public static final String getStringValue(final AviatorObject arg,
final Map<String, Object> env) {
final Object value = arg.getValue(env);
if(value != null){
return value.toString();
}
return null;
}
The text was updated successfully, but these errors were encountered: