Skip to content

Commit

Permalink
pinpoint-apm#1318 Remove negative timeDiff check as timestamp may be …
Browse files Browse the repository at this point in the history
…less than 0
  • Loading branch information
Xylus committed Dec 8, 2015
1 parent a9bba34 commit 0e5176e
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,14 @@ public ApplicationAgentList getApplicationAgentList(ApplicationAgentList.Key app

@Override
public Set<AgentInfo> getAgentsByApplicationName(String applicationName, long timestamp) {
long timeDiff = timestamp;
return this.getAgentsByApplicationName(applicationName, timestamp, timeDiff);
return this.getAgentsByApplicationName(applicationName, timestamp, timestamp);
}

@Override
public Set<AgentInfo> getAgentsByApplicationName(String applicationName, long timestamp, long timeDiff) {
if (applicationName == null) {
throw new NullPointerException("applicationName must not be null");
}
if (timeDiff < 0) {
throw new IllegalArgumentException("timeDiff must not be less than 0");
}
if (timeDiff > timestamp) {
throw new IllegalArgumentException("timeDiff must not be greater than timestamp");
}
Expand Down

0 comments on commit 0e5176e

Please # to comment.