Removing "Library source does not match the bytecode for class <classname>" message when viewing source files.

Answered

I have a maven project on which I'm depending, and this dependency has some source files, which contains javadocs. When I go to view a class using the source files it complains that "Library source does not match the bytecode for class <classname>" at the top of the file in red. If I go to "view diff" I can see that these differences are only caused by the fact that the source contains javadoc and the decompiled class does not (aswell as some very minor differences in the way the decompiler views things, such as the source file using an enhanced for loop while the decompiler makes it an iterator).

Is there any way to tell this warning that the source files are in fact correct, or at the very least disable it?

Here's a screenshot to show what I mean: 

0
2 comments

IDE thinks that sources and classes are not in sync (like there is no executable code in the class file where there is in the source file or when signatures do not match), can you provide the .class file and the source file to reproduce it?

See also https://youtrack.jetbrains.com/issue/IDEA-154470.

0
Avatar
Permanently deleted user

Pardon my idiocy, I now realized that I actually was using a slightly newer version of the sources which actually had a few new methods. Updating to the correct compiled code worked just fine! Sorry for the inconvenience!

0

Please sign in to leave a comment.