I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit bf8f1508 authored by dev's avatar dev
Browse files

Changed the equals method to rely on the protected ConcurrentHashMap.equals().

parent 0235c5ef
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ public class RateStat { ...@@ -20,7 +20,7 @@ public class RateStat {
/** describe the stat */ /** describe the stat */
private final String _description; private final String _description;
/** actual rate objects for this statistic */ /** actual rate objects for this statistic */
private final ConcurrentHashMap<Long, Rate> _rates; protected final ConcurrentHashMap<Long, Rate> _rates;
/** component we tell about events as they occur */ /** component we tell about events as they occur */
private StatLog _statLog; private StatLog _statLog;
...@@ -158,9 +158,7 @@ public class RateStat { ...@@ -158,9 +158,7 @@ public class RateStat {
RateStat rs = (RateStat) obj; RateStat rs = (RateStat) obj;
if (DataHelper.eq(getGroupName(), rs.getGroupName()) && DataHelper.eq(getDescription(), rs.getDescription()) if (DataHelper.eq(getGroupName(), rs.getGroupName()) && DataHelper.eq(getDescription(), rs.getDescription())
&& DataHelper.eq(getName(), rs.getName())) { && DataHelper.eq(getName(), rs.getName())) {
for (Rate r: _rates.values()) return this._rates.equals(rs._rates);
if (!r.equals(rs.getRate(r.getPeriod()))) return false;
return true;
} }
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment