Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Mar 21, 2019
1 parent 517ef7e commit a975b40
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -154,11 +154,11 @@ class ChannelStatsMapper implements ISqlRowMapper<ChannelStats> {
public ChannelStats mapRow(Row rs) {
ChannelStats stats = new ChannelStats();
stats.setNodeId(rs.getString("node_id"));
try {
if (rs.containsKey("host_name")) {
stats.setHostName(rs.getString("host_name"));
stats.setChannelId(rs.getString("channel_id"));
}
catch (Exception e) {
if (rs.containsKey("channel_id")) {
stats.setChannelId(rs.getString("channel_id"));
}
stats.setStartTime(truncateToMinutes(rs.getDateTime("start_time")));
stats.setEndTime(truncateToMinutes(rs.getDateTime("end_time")));
Expand Down

0 comments on commit a975b40

Please sign in to comment.