Make java 1.6 compatible

Signed-off-by: happymap <nafan628@gmail.com>