I'm wondering if this is something specific to Eclipse? Or maybe your installation of Eclipse is trying to use an older version of Java? I also noticed that one person in that StackOverflow question you linked to mentioned an Eclipse specific setting change:
https://stackoverflow.com/a/70150897I admit, I don't use Eclipse myself, so I'm not sure what to recommend here. But, I can verify that this error doesn't occur when building DSpace 7 via Maven on commandline, and it also doesn't occur in other IDEs. I'm using IntelliJ IDEA Community Edition (which is free) and I'm not seeing those errors. So, this implies to me that it might not be an issue in our codebase (though I could be wrong, if someone else manages to find some way to fix this, I'm open to it).
Or, maybe there are some other folks on this list who've tried using DSpace 7 + Eclipse and can provide some hints/tips on doing so.