Le 26 avr. 2016 22:27, "Christopher Schultz" <ch...@christopherschultz.net> a écrit : > > Romain, > > On 4/25/16 11:42 AM, Romain Manni-Bucau wrote: > > Hi guys, > > > > tomcat uses ConcurrentHashMap in few places and doesn't rely on > > ConcurrentMap API (ApplicationContext IIRC for instance was the case I > > encounter). This means if you build tomcat with java 8 and run on java 7 it > > is broken cause of this new KeyViewSet API used on java 8 (returned type is > > used for method lookup at runtime). > > Which method, here? The return type of a method isn't officially part of > the method's signature. Are you saying that the Java 8 compiler will > choose a method (from a specific interface) at compile-time that doesn't > exist in earlier versions of Java? > > Can this be fixed with a cast? >
This is not java 8 specific. The method lookup is done using return type too - check bytecode with javap for instance. I didnt check if a cast fixes it but using a temp var should or moving the impl typing to the interface at field level fixes it in tomcat and no api is missing AFAIK. > -chris > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org >