Made random key access jdk 8 compatible