Avoid Java 8 API.

+review REVIEW-5313