记录一次手残误导入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有种很舒服的感觉,加油,小顽童。

posted on 2019-03-07 11:44  shaer  阅读(1296)  评论(0编辑  收藏  举报

导航