Skip to content
This repository has been archived by the owner on Apr 16, 2022. It is now read-only.

Commit

Permalink
Replace Java 11 API calls with Java 8 alternative calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ggalmazor committed Oct 23, 2019
1 parent 584f792 commit 4c01b97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public String getValue() {

@Override
public boolean isEmpty() {
return Optional.ofNullable(value).isEmpty();
return !Optional.ofNullable(value).isPresent();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.junit.Before;
import org.junit.Test;
import org.opendatakit.briefcase.pull.aggregate.Cursor;
import org.opendatakit.briefcase.reused.BriefcaseException;

public class FormMetadataCommandsTest {

Expand Down Expand Up @@ -79,7 +80,7 @@ public void updates_all_metadata_removing_cursors() {
.stream()
.map(FormMetadata::getKey)
.forEach(key -> {
FormMetadata actualFormMetadata = formMetadataPort.fetch(key).orElseThrow();
FormMetadata actualFormMetadata = formMetadataPort.fetch(key).orElseThrow(BriefcaseException::new);
assertThat(actualFormMetadata.getCursor().isEmpty(), is(true));
});
}
Expand Down

0 comments on commit 4c01b97

Please sign in to comment.