I've been using Optional
provided from Guava
in my project for a very long time. Now I decided to migrate from Java 7 to Java 8, but since in all over my project I used guava
's Optional
so far, I have to run through the code and make significant changes. Though I am not yet sure if it's worth to change, or it's better to left everything as is, and just start using Java's Optional
from now on.
Are there any benefits or leaks in Java's Optional
, is it better than what we have in guava
?
API of both classes is not the same. I would not change this by regexp. Three differences which are important in my opinion: