Skip to content

Commit

Permalink
chore: fix JDK deprecations.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhusar committed Nov 22, 2024
1 parent 9b99985 commit 00b4ff7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void start() {
}

public void updateStats() {
Integer xValue = new Integer(++seriesCount);
Integer xValue = ++seriesCount;

long now = System.currentTimeMillis();
long elapsed = (now - lastUpdateTime) / 1000L;
Expand All @@ -75,10 +75,10 @@ public void updateStats() {

for (Map.Entry<String, AtomicInteger> entry : requestCounts.entrySet()) {
String key = entry.getKey();
Integer current = new Integer(entry.getValue().get());
Integer current = entry.getValue().get();
Integer last = lastRequestCounts.put(key, current);
if (last == null) {
last = new Integer(0);
last = 0;
}

int perSec = (int) ((current.intValue() - last.intValue()) / elapsed);
Expand All @@ -88,7 +88,7 @@ public void updateStats() {
series = createRequestSeries(key);
}

series.add(xValue, new Integer(perSec));
series.add(xValue, Integer.valueOf(perSec));
}

for (Map.Entry<String, AtomicInteger> entry : sessionCounts.entrySet()) {
Expand All @@ -98,7 +98,7 @@ public void updateStats() {
series = createSessionSeries(key);
}

series.add(xValue, new Integer(entry.getValue().get()));
series.add(xValue, Integer.valueOf(entry.getValue().get()));
}
}

Expand Down

0 comments on commit 00b4ff7

Please sign in to comment.