Skip to content

Commit

Permalink
Incorporate PR review feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Singh <ssashish@amazon.com>
  • Loading branch information
ashking94 committed Apr 28, 2023
1 parent 518ef11 commit 008a0fa
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public class MovingAverage {
private final int windowSize;
private final long[] observations;

private long count = 0;
private long sum = 0;
private double average = 0;
private volatile long count = 0;
private volatile long sum = 0;
private volatile double average = 0;

public MovingAverage(int windowSize) {
checkWindowSize(windowSize);
Expand Down

0 comments on commit 008a0fa

Please sign in to comment.