SyntaxFix
Write A Post
Hire A Developer
Questions
It can be resolved by below simple code with Stream and Try in AbacusUtil:
Stream.of(accounts).filter(a -> Try.call(a::isActive)).map(a -> Try.call(a::getNumber)).toSet();
Disclosure: I'm the developer of AbacusUtil.
AbacusUtil