Building against OpenJDK-21
Dear Developers,
I am the maintainer of grengine in Debian. We are getting ready to switch to OpenJDK-21 as default JDK, and this raised some build-time errors as you can see in the bug report: https://bugs.debian.org/1057518 When solving these, others fill in the place and I made some other changes to totally get rid of issues. With the enclosed patch, I was able to build against OpenJDK-21 and run the unit tests. openjdk-21.patch Possibly some changes are not the best ones:
- declaring some methods called by the constructors as final;
- instantiating against concrete types (HashMap) instead of interfaces (Map) to allow serialization to happen;
- declaring some attributes as being transient for the same goal;
- declaring some classes as final;
- URL(String) is no more available, creating URL with new URI(...).toURL()
I hope this can be useful for you and perhaps you will do some of the above differently, especially if some of the affected classes are bound to be inherited.
Best,
-- Pierre