On Sat, 14 Aug 2021 at 00:53, <[email protected]> wrote: > This is an automated email from the ASF dual-hosted git repository. > > erans pushed a commit to branch master > in repository https://gitbox.apache.org/repos/asf/commons-math.git > > commit 310b21e4d7071bbdc52e12283b0718c2d5dd5bbc > Author: Gilles Sadowski <[email protected]> > AuthorDate: Sat Aug 14 01:24:38 2021 +0200 > > MATH-1625: Enable callback in "SimplexOptimizer". > --- > .../nonlinear/scalar/noderiv/SimplexOptimizer.java | 120 > +++++++++++++++++++-- > 1 file changed, 113 insertions(+), 7 deletions(-) > > + public void addObserver(Observer cb) { > + if (cb == null) { > + throw new NullPointerException("Callback"); > + } >
These types of checks can use Objects.requireNonNull
