I had this error this morning after building from master. I switched java to 11 and it went away.
javac was 11. I had not switched java back to 11 after helping a user to debug a problem.
Dont know if a difference between javac and java versions was the root of the problem or not.