记录一次手残误导入com.sun.org.apache.xpath.internal.operations.String包的bug
报错:
Error:(27, 36) java: The method MD5EncodeUtf8(java.lang.String) in the type com.mmall.util.MD5Util is not applicable for the arguments (com.sun.org.apache.xpath.internal.operations.String)
java.lang.String是系统默认导入的,com.sun.org.apache.xpath.internal.operations.String这是手残导入的。
两个包不兼容,jvm也不知道用哪个,所以把所有类误导入的这个包删除就可以了。
总结:遇到bug不要慌,尽量看错误提示,然后思考这个bug的原因,而不是跟着系统提示一顿神操作,到最后自己都不知道bug从哪开始的。
第一次调bug有种很舒服的感觉,加油,小顽童。
苟有恒,何必三更眠五更起;最无益,莫过一日暴十日寒。
浙公网安备 33010602011771号