Fix JDK 1.7 dependency in #10426

Change-Id: I465225a36b0d6d9ebb4b40a32bb5ad145bdaca0b