"Library source does not match the bytecode for class"问题

问题如下图:

解决方案:

首先:

There's nothing wrong with IDEA, nor your dependencies or local maven caches, it's correctly identifying the mismatch.

Here's how to check:

1. Open class in question
2. Click "Show diff"
3. Choose "Ignore whitespaces and empty lines"
You can clearly see (ignoring JavaDoc and FQCNs) that the class file has extra checks included for the @NonNull annotated arguments. The import says lombok.NonNull, and the documentation shows this transformation will happen.

I guess the best course of action is either to ignore this warning or ask the project's maintainers to build the sources.jar from the lombok-processed source code if that's possible. I think they'll need to employ delomboking and this Maven plugin, but never built lombok code myself.

然后:

最后:
重启IDEA即可!

参考资料:

  1. Library source does not match the bytecode for class
  2. 解决IDEA查看源码时提示:Library source does not match the bytecode for class的问题分析
全部评论

相关推荐

牛马人的牛马人生:500一天吗?香麻了
投递字节跳动等公司6个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务