Fix build error on Java7