Sync Java 6/7 and Java 8 versions

I ran a diff between the two branches. There were a number of small changes between the two, especially in the tests, as well as a missed file. I've changed a few things to minimize the diff where possible, leaving only actual functional changes.
This line...