Trying to create a new WayPoint with
WayPoint.builder().build();
creates a NPE:
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at io.jenetics.jpx.WayPoint.<init>(WayPoint.java:158)
at io.jenetics.jpx.WayPoint.<init>(WayPoint.java:67)
at io.jenetics.jpx.WayPoint$Builder.build(WayPoint.java:952)
It is not allowed to create an empty WayPoint, but the NPE is not very clear in this case. It would be better to throw a IllegalStateException (or something similar) with a proper error message.
Trying to create a new
WayPointwithcreates a NPE:
It is not allowed to create an empty
WayPoint, but the NPE is not very clear in this case. It would be better to throw aIllegalStateException(or something similar) with a proper error message.