/**
* 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
S. Shum. Proceedings of the 15th International Conference on Conceptual Structures (ICCS 2007)
, volume 4604 of Lecture Notes in Artificial Intelligence, page 29-44. Berlin, Heidelberg, Springer-Verlag, (July 2007)