Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Exclusion Hunter IV: NullOptional (#5614)
Browse files Browse the repository at this point in the history
  • Loading branch information
sudiksha27 authored Aug 27, 2021
1 parent c31a411 commit 5aca379
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public void resolvesToValueIfOneOptionalPresent() {

@Test
public void resolvesToValueIfOneOptionalPresentAndOneIsNull() {
assertThat(OptionalResolver.resolve(PRESENT_OPTIONAL_1, null)).isEqualTo(STRING_1);
assertThat(OptionalResolver.resolve(PRESENT_OPTIONAL_1, Optional.empty()))
.isEqualTo(STRING_1);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ public void asyncInitTimestampServiceWithAsyncKvsAsynchronous() {

private KeyValueService createRawKeyValueService(boolean initializeAsync) {
return factory.createRawKeyValueService(
null, null, Refreshable.only(Optional.empty()), null, Optional.empty(), null, initializeAsync);
null,
null,
Refreshable.only(Optional.empty()),
Optional.empty(),
Optional.empty(),
null,
initializeAsync);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ public void asyncInitTimestampServiceSynchronous() {

private KeyValueService createRawKeyValueService(boolean initializeAsync) {
return factory.createRawKeyValueService(
null, null, Refreshable.only(Optional.empty()), null, Optional.empty(), null, initializeAsync);
null,
null,
Refreshable.only(Optional.empty()),
Optional.empty(),
Optional.empty(),
null,
initializeAsync);
}
}
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ allprojects {
'MockitoInternalUsage',
'ModifyCollectionInEnhancedForLoop',
'NarrowingCompoundAssignment',
'NullOptional',
'OperatorPrecedence',
'OverrideThrowableToString',
'PreconditionsConstantMessage',
Expand Down

0 comments on commit 5aca379

Please sign in to comment.