库源与类的字节码不匹配 [英] Library source does not match the bytecode for class
问题描述
不知道这里有什么问题..我从本地maven存储库中删除了所有文件,让它从头开始下载所有内容但是我无法摆脱这个错误:
No idea what's wrong here.. I removed all files I had from the local maven repository and let it download everything from scratch but I can't get rid of this error:
为什么我会看到这个以及如何摆脱它?
Why am I seeing this and how can I get rid of it?
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ wordvectors ---
[INFO] masterthesis.code:wordvectors:jar:1.0-SNAPSHOT
[INFO] +- org.apache.spark:spark-core_2.10:jar:1.6.0:compile
[INFO] | \- org.apache.hadoop:hadoop-client:jar:2.2.0:compile
[INFO] | \- org.apache.hadoop:hadoop-common:jar:2.2.0:compile
[INFO] | \- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] | \- (commons-collections:commons-collections:jar:3.2.1:compile - omitted for conflict with 20040616)
[INFO] \- org.deeplearning4j:deeplearning4j-ui:jar:0.4-rc3.8:compile
[INFO] \- org.deeplearning4j:deeplearning4j-nlp:jar:0.4-rc3.8:compile
[INFO] \- it.unimi.dsi:dsiutils:jar:2.2.2:compile
[INFO] \- commons-collections:commons-collections:jar:20040616:compile
推荐答案
IDEA没有任何问题,也没有依赖关系或本地maven缓存,它正确识别不匹配。
There's nothing wrong with IDEA, nor your dependencies or local maven caches, it's correctly identifying the mismatch.
以下是检查方法:
- 打开有问题的课程
- 点击显示差异
- 选择忽略空格和空行
你可以清楚地看到e(忽略JavaDoc和FQCN),类文件包含针对 @NonNull
注释参数的额外检查。导入说 lombok.NonNull
,以及文档表明这种转变将会发生。
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.
我想最好的做法是要么忽略这个警告,要么让项目的维护人员从lombok构建sources.jar处理过的源代码,如果可能的话。我认为他们需要使用delomboking和这个Maven插件,但我自己从未构建过lombok代码。
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.
这篇关于库源与类的字节码不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!