forked from I2P_Developers/i2p.i2p
Changed the equals method to rely on the protected ConcurrentHashMap.equals().
This commit is contained in:
@@ -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 {
|
|||||||
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user