File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ public void remove(String hash) {
8181 * Return the threshold in micros to use for the given hash.
8282 */
8383 public long thresholdMicros (String hash ) {
84- long threshold = hashes .get (hash );
85- return threshold < 1 ? defaultThresholdMicros : threshold ;
84+ Long threshold = hashes .get (hash );
85+ return threshold == null || threshold < 1 ? defaultThresholdMicros : threshold ;
8686 }
8787
8888 /**
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ void addWithThresholds() {
3636 assertThat (init .includeHash ("xJunk" )).isFalse ();
3737 assertThat (init .includeHash ("xOne" )).isTrue ();
3838 assertThat (init .includeHash ("xTwo" )).isTrue ();
39+ assertThat (init .thresholdMicros ("xJunk" )).isEqualTo (1000L );
3940 assertThat (init .thresholdMicros ("xOne" )).isEqualTo (1000L );
4041 assertThat (init .thresholdMicros ("xTwo" )).isEqualTo (2000L );
4142 }
You can’t perform that action at this time.
0 commit comments