What is a sense of this?
Optional.of(someLinkToNull).ifPresent(present -> { System.out.println(present); });
gives NullpointerException.
Please, give an example, how to check on null with Optional (less code)?
Aucun commentaire:
Enregistrer un commentaire