Fix warnings about JRE 1.6
Merge pull request #2484 from Zomby2D/master

Fix warnings about JRE 1.6