bug fix for java 1.7

Signed-off-by: Izhar ul Hassan <ezhaar@gmail.com>