Hi, thank you for your work :) I hope you are having fun!
I can't comment much except that in case of doubt, I'd probably trust the Java implementation more than the spec / documentation - unless the implementation obviously does something hare-brained. Cheers, -- Richard