HADOOP-11165. TestUTF8 fails when run against java 8. Contributed by Stephen Chu.

(cherry picked from commit 85da71c2d3c565a8920e47fe3925e8e0bef353a5)