提交 33120d89 authored 作者: Noel Grandin's avatar Noel Grandin

sqlStatement field here can be final

上级 50d1b061
......@@ -62,8 +62,7 @@ public class QueryStatisticsData {
int rowCount) {
QueryEntry entry = map.get(sqlStatement);
if (entry == null) {
entry = new QueryEntry();
entry.sqlStatement = sqlStatement;
entry = new QueryEntry(sqlStatement);
map.put(sqlStatement, entry);
}
entry.update(executionTimeNanos, rowCount);
......@@ -98,7 +97,7 @@ public class QueryStatisticsData {
/**
* The SQL statement.
*/
public String sqlStatement;
public final String sqlStatement;
/**
* The number of times the statement was executed.
......@@ -158,6 +157,10 @@ public class QueryStatisticsData {
private double executionTimeM2Nanos;
private double rowCountM2;
public QueryEntry(String sql) {
this.sqlStatement = sql;
}
/**
* Update the statistics entry.
*
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论