modify switch bug in jdk 1.6
because jdk1.6 does not support switch(string)