提交 31a0fa4c authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Use Collection.toArray() instead of Collection.toArray(Object[])

上级 694f4750
...@@ -225,8 +225,7 @@ public class ConnectionInfo implements Cloneable { ...@@ -225,8 +225,7 @@ public class ConnectionInfo implements Cloneable {
} }
private void readProperties(Properties info) { private void readProperties(Properties info) {
Object[] list = new Object[info.size()]; Object[] list = info.keySet().toArray();
info.keySet().toArray(list);
DbSettings s = null; DbSettings s = null;
for (Object k : list) { for (Object k : list) {
String key = StringUtils.toUpperEnglish(k.toString()); String key = StringUtils.toUpperEnglish(k.toString());
......
...@@ -469,10 +469,8 @@ public class FullText { ...@@ -469,10 +469,8 @@ public class FullText {
Parser p = new Parser(session); Parser p = new Parser(session);
Expression expr = p.parseExpression(key); Expression expr = p.parseExpression(key);
addColumnData(columns, data, expr); addColumnData(columns, data, expr);
Object[] col = new Object[columns.size()]; Object[] col = columns.toArray();
columns.toArray(col); Object[] dat = data.toArray();
Object[] dat = new Object[columns.size()];
data.toArray(dat);
Object[][] columnData = { col, dat }; Object[][] columnData = { col, dat };
return columnData; return columnData;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论