fixed a few sonar violations (var with Java 11)

2 jobs for master in 45 minutes and 58 seconds (queued for 7 seconds)