On 25/04/2016 16:42, 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). > > Why would you do it? Not sure but several linux distribution do it. > > I know we could easily ask all linux distro to build using java 7 but at > least fedora/redhat/ubuntu are impacted and tomcat can easily without > loosing any feature make it passing for that case using the interface > instead of the implementation as field type. > > Do you think it is possible or would you just move it over linux distro?
I've been through the source code and I have a patch locally ready to commit that fixes this in 9.0.x. However... In some places, this would mean changing the API (usually a protected field) of an internal component we might reasonably expect some users to have extended. That is generally something we try and avoid in a point release unless the change is absolutely necessary (e.g. security) or we view the chances of it being used as very, very low. Therefore, I want to review my local changes and split them into two commits. The safe one and the API breaking one. I'm not sure the API breaking one is going to be back-ported beyond 8.5.x. Fundamentally, this is an issue for the distro. The Tomcat docs are quite specific (see BUILDING.txt) about which version of Java should be used to build Tomcat. If a distro wants to mess with that, they get to deal with the consequences. > If > this last one: how to ensure we don't get more regression in the future due > to another build process for user binaries? This is generally something we check during the release. It is mostly a manual process although it is automated where building with the wrong Java version causes issues for DBCP. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org