No, you're passing three arguments to result
:
- The
BiPredicate
X
Y
They get evaluated before calling result
, which means the BiPredicate
is evaluated and returns a BiPredicate
(which is not executed), then X
is evaluated, than Y
but Y
is obj.getSomeMethod()
and obj
is null, so the NullPointerException
is thrown.