On the javahl-1.8-extensions branch: Cherry-pick revisions 1576277, 1576283 and 1576329 from trunk.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/javahl-1.8-extensions@1576351 13f79535-47bb-0310-9956-ffa450edef68