openlvc / portico

Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!
http://www.porticoproject.org
151 stars 81 forks source link

Update the 1516e spec classes to be Java 21 compatible #339

Open jarrodgreene opened 3 months ago

jarrodgreene commented 3 months ago

The 1516e spec made some questionable decisions around using SPI classes for things other than what they were designed for. This caused things to break post Java 9. This borrows the spec from HLA4 for the two impacted classes, which resolves this issue.

timpokorny commented 3 months ago

The 1516e spec made some questionable decisions around using SPI classes for things other than what they were designed for. This caused things to break post Java 9.

@jarrodgreene To be fair, the 1516e spec does predate Java 9 by seven years. It also predates Java 8. And Java 7. I haven't checked, but that same code might come from the original IEEE 1516 spec as well, which if true will mean it predates Java versions 6, 5 and 4 as well (or 1.4 as we called it back in the day). Probably stood the test of "reasonable time" if true.

I'll take a look and just make sure things like the example federates all run happily and so on, and once I've tested it all I'll merge it.