Good afternoon
I'm using play 2.5.4 with java 8 v01.08.91 And when using some features of java 8 as the class 'Optional' with the 'ifPresent', 'isPresent', or 'get' methods the following error occurs when compiling the java classes
"java.lang.ClassCastException: javassist.bytecode.InterfaceMethodrefInfo cannot be cast to javassist.bytecode.MethodrefInfo"
Specifically, this is the snippet of the problem code:
Optional<AppMobileWrapper> lastSend = appsWrapper.stream()
.max(Comparator.comparing(f -> f.changeDate));
lastSend.ifPresent(appMobileWrapper -> {
returnWrapper.lastDate = DateUtils.currentDateNoTimeZoneString(appMobileWrapper.changeDate);
});
I've tried everything, I've been looking for a solution for hours. My version of play is updated, java version updated, environment variables are ok and even tried to add the javassist dependency updated in the sbt dependencies and even then it does not work at all. Has anyone experienced this problem?