gpt4 book ai didi

java - 解释警告 : non-varargs call of varargs method with inexact argument type for last parameter

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:13:22 26 4
gpt4 key购买 nike

<分区>

这是我收到警告的示例代码。

String lsSQL = foMetaQuery.getSQL();
String lsNewSQL = replace(lsSQL,"'' {","''{");
lsNewSQL = replace(lsNewSQL," } ''","}''");
lsNewSQL = replace(lsNewSQL," }","}");
lsNewSQL = MessageFormat.format(lsNewSQL,foSubstitutionArray);
loVSQueryDef.setSQL(lsNewSQL);

编译器说

cast to java.lang.Object for a varargs call cast to java.lang.Object[] for a non-varargs call and to suppress this warning

lsNewSQL  = MessageFormat.format(lsNewSQL,foSubstitutionArray);

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com