fix compile error when using JDK7