Removed use of Java8 API

+review REVIEW-5202