Update your java 8 to later update.
you are probably using jdk8 with < u45
btw, latest jdk8 update is 112
Thanks for the reply.
I have updated the JDK, now java -version outputs:
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b16, mixed mode)
Just to be sure, I checked javac version also and it is:
I tried to rebuild WildFly with:
mvn clean install -DskipTests
The build failed with the same error.
I just updated my JDK to the same you have and Weld subsystem does compile without any problems in 10.x branch as well as in master branch. It's highly unlikely that there is stuff in official WIldFly git which wouldn't compile. So the problem must be somewhere else. Are you sure you don't have any local changes?
It turns out Maven was using the 1.8.0_05 jdk, because that’s what the JAVA_HOME variable was pointing to.
I set JAVA_HOME to the location of the new jdk, I trust the build will now succeed.
Thanks for your help!