fix error inconvertible types when compiles with Java 1.6