Is there a build-in possibility to create a null-safe mapping comparator in Java 8 without writing a own implementation of Comparator?
Comparator
When running the
Found a possible solution:
Comparator.comparing(ToSort::getSortBy, Comparator.nullsFirst(Comparator.naturalOrder()) )