/**
* NOTE: Without this method present and returning LanguageVersion.JAVA_1_5,
* Javadoc will not process generics because it assumes LanguageVersion.JAVA_1_1
* @return language version (hard coded to LanguageVersion.JAVA_1_5)
*/
public static LanguageVersion languageVersion() {
return LanguageVersion.JAVA_1_5;
}
There are some valid arguments against using Optional as a method parameter type, but they are not good enough to say that you should avoid it at all costs