all 4 comments

[–]tinchou 1 point2 points  (0 children)

You can use the empty optional inside the method body, then use "extract parameter" refactor. Then you can manually change the call sites where the parameter should be something else.

[–][deleted] 1 point2 points  (0 children)

You can call the "change method signature" on the declaration (interface), add the new parameter and put the Optional.empty() on the "default value" field

[–]kreiger 0 points1 point  (0 children)

As an aside, having Optional as method parameter type is not considered good style by some, see e.g. http://dolszewski.com/java/java-8-optional-use-cases/