On Thu, 27 Oct 2022 at 21:35, Matthias Bläsing <mblaes...@doppel-helix.eu.invalid> wrote: > Am Donnerstag, dem 27.10.2022 um 20:51 +0100 schrieb Neil C Smith: > > I'm not sure that's correct from the JVM perspective. The Object > > method should still be generated as a bridge? > > > > It should be backwards compatible but it's not forwards compatible? > > Anything compiled against 15 should run on 16, but anything compiled > > against 16 won't run on 15? > > > > I still think it's probably a good idea to revert in this particular > > case though. > > you are right and my reasoning was wrong. I looked at the generated > code with javap and there I see:
Thanks for confirming! It was my thought in reviewing the original PR, but there are so many question marks in the paragraph above because generics never cease to confuse me! :-) This got me thinking whether there's a workaround for Ernie to force the bridge method to be called. Maybe using raw references? - (at least doing this with String and testing with javap seems to work) - Comparable specVersion = mi.getSpecificationVersion(); Comparable reqVersion = new SpecificationVersion("9.26"); if (specVersion.compareTo(reqVersion)) >= 0) { // etc etc It's still a bad idea to compile against a later platform and expect it to work on an earlier one, but that might just work in this case. Best wishes, Neil --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org For additional commands, e-mail: dev-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists