fix type inference on jre7