add duck type, but depends duckadpter only working jre7, hack it