Backported to Java 1.6
Merge pull request #1 from jroper/java16-compat

Backported to Java 1.6