mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for getSqlList
This commit is contained in:
@@ -301,6 +301,10 @@ public class JdbcStatManager implements JdbcStatManagerMBean {
|
||||
for (DataSourceProxyImpl dataSource : DruidDriver.getProxyDataSources().values()) {
|
||||
Map<String, JdbcSqlStat> statMap = dataSource.getDataSourceStat().getSqlStatMap();
|
||||
for (Map.Entry<String, JdbcSqlStat> entry : statMap.entrySet()) {
|
||||
if (entry.getValue().getExecuteCount() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Map<String, Object> map = entry.getValue().getData();
|
||||
map.put("URL", dataSource.getUrl());
|
||||
data.put(new CompositeDataSupport(JdbcSqlStat.getCompositeType(), map));
|
||||
@@ -310,6 +314,10 @@ public class JdbcStatManager implements JdbcStatManagerMBean {
|
||||
for (DruidDataSource dataSource : DruidDataSourceStatManager.getDruidDataSourceInstances()) {
|
||||
Map<String, JdbcSqlStat> statMap = dataSource.getDataSourceStat().getSqlStatMap();
|
||||
for (Map.Entry<String, JdbcSqlStat> entry : statMap.entrySet()) {
|
||||
if (entry.getValue().getExecuteCount() == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Map<String, Object> map = entry.getValue().getData();
|
||||
map.put("URL", dataSource.getUrl());
|
||||
data.put(new CompositeDataSupport(JdbcSqlStat.getCompositeType(), map));
|
||||
|
||||
Reference in New Issue
Block a user