In java 8 some functions of Optional class not supported such as isEmpty,ifPresentOrElse ifPresentOrElse,or or,stream stream,orElseThrow orElseThrow. You should check whether you use them or not. If you want to use these functions you can use java 11.