I have a Java code line where IntelliJ displays a warning. How do I silence the warning in that particular line, without affecting warnings displayed in other lines?
Depending on the warning you can use @SuppressWarnings. Eg:
@SuppressWarnings
@SuppressWarnings("deprecation") yourLineWhichIsDeprecated;
Take a look at this answer for a pretty long list of warnings you can suppress. Check the other posts on that topic for more details.