Skip to content

Commit

Permalink
Fixed lint issues (#2394)
Browse files Browse the repository at this point in the history
Signed-off-by: nicolatimeus <[email protected]>
  • Loading branch information
nicolatimeus authored and MMaiero committed Mar 8, 2019
1 parent f55a39e commit 3a98650
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,34 @@ public ListenParams(final ReadValueId readValueId) {
public abstract long getQueueSize();

public abstract boolean getDiscardOldest();

@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + (getDiscardOldest() ? 1231 : 1237);
result = prime * result + (int) (getQueueSize() ^ (getQueueSize() >>> 32));
long temp;
temp = Double.doubleToLongBits(getSamplingInterval());
result = prime * result + (int) (temp ^ (temp >>> 32));
return result;
}

@Override
public boolean equals(final Object obj) {
if (obj == null)
return false;
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SingleNodeListenParams other = (SingleNodeListenParams) obj;
if (getDiscardOldest() != other.getDiscardOldest())
return false;
if (getQueueSize() != other.getQueueSize())
return false;
return Double.doubleToLongBits(getSamplingInterval()) == Double.doubleToLongBits(other.getSamplingInterval());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,34 +56,4 @@ public boolean getDiscardOldest() {
return discardOldest;
}

@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + (discardOldest ? 1231 : 1237);
result = prime * result + (int) (queueSize ^ (queueSize >>> 32));
long temp;
temp = Double.doubleToLongBits(samplingInterval);
result = prime * result + (int) (temp ^ (temp >>> 32));
return result;
}

@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SingleNodeListenParams other = (SingleNodeListenParams) obj;
if (discardOldest != other.discardOldest)
return false;
if (queueSize != other.queueSize)
return false;
if (Double.doubleToLongBits(samplingInterval) != Double.doubleToLongBits(other.samplingInterval))
return false;
return true;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,4 @@ public long getQueueSize() {
public boolean getDiscardOldest() {
return rootParams.getDiscardOldest();
}

@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + (getDiscardOldest() ? 1231 : 1237);
result = prime * result + (int) (getQueueSize() ^ (getQueueSize() >>> 32));
long temp;
temp = Double.doubleToLongBits(getSamplingInterval());
result = prime * result + (int) (temp ^ (temp >>> 32));
return result;
}

@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
SingleNodeListenParams other = (SingleNodeListenParams) obj;
if (getDiscardOldest() != other.getDiscardOldest())
return false;
if (getQueueSize() != other.getQueueSize())
return false;
if (Double.doubleToLongBits(getSamplingInterval()) != Double.doubleToLongBits(other.getSamplingInterval()))
return false;
return true;
}
}

0 comments on commit 3a98650

Please sign in to comment.