Skip to content

Commit

Permalink
Taking into account PR reviews
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas ADAM <tadam@silicom.fr>
  • Loading branch information
tadam50 committed Jan 10, 2020
1 parent c456227 commit cd15fd3
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ private Stream<VariantManager> getVariantManagerStream() {

@Override
public Collection<String> getVariantIds() {
final VariantManager vm = getVariantManagerStream().findFirst().orElse(null);
if (Objects.isNull(vm)) {
throw new PowsyblException("No VariantManager found");
}
final VariantManager vm = getVariantManagerStream().findFirst().orElseThrow(() -> new PowsyblException("No VariantManager found"));
return vm.getVariantIds();
}

Expand Down

0 comments on commit cd15fd3

Please sign in to comment.