question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

upgrade to guava 20 cause bunch of violations in code by IntelijIdea

See original GitHub issue

here is example of how our project tried to upgrade to guava 20 from 19 (simple version bump) - https://github.com/checkstyle/checkstyle/pull/3527.

it result in violations by IntelijIdea: screenshot- upgradetoguava20 https://teamcity.jetbrains.com/viewLog.html?buildId=917921&tab=Inspection&buildTypeId=Checkstyle_IdeaInspectionsPullRequest

All is that only due to commit: https://github.com/google/guava/commit/f6da31136af15dd324d56d253bc17c5b9afe9759#diff-7ed40f507101a8625df970c98abcbc55

It is used jdk class javax.annotation.CheckReturnValue to trigger validation and google custom class com.google.errorprone.annotations.CanIgnoreReturnValue to suppress violation.

yes it works for google, but now for others. I think it is not accurate to use different markers for triggering and suppressions. If you want to use errorprones’s CanIgnoreReturnValue please use smth like com.google.errorprone.annotations.CheckReturnValue (non existing class).

but usage of jdk marker/annotation trigger validation process of other tools. Extra dependencies are also not desirable.

It would be better to use CheckReturnValue on certain methods as show at - http://errorprone.info/bugpattern/CheckReturnValue. or to use some friendly(common for all) approaches that other tools can use and ignore that methods.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kartoffelsupcommented, Nov 7, 2016

You are quite demanding for someone who is using great software free of charge. 😃

0reactions
romanicommented, Nov 8, 2016

@michaelhixson , thank you ! I had big doubts that they consider such update, so came to guava team first.

I think we can close the issue and just wait for IntelijIdea 2016.3 release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IntelliJ is selecting incorrect version of maven dependency
I have the Maven Helper plugin installed to easily identify any version conflicts so all other dependencies that also depend on guava have...
Read more >
Get results and fix problems | IntelliJ IDEA Documentation
IntelliJ IDEA performs code analysis and applies quick-fixes from the selected inspection profile to the detected issues.
Read more >
On IntelliJ IDEA startup warning shows: "Early Access Java ...
On IntelliJ IDEA startup warning shows: "Early Access Java versions may cause compatibility issues. Use a stable release version.
Read more >
List of Java inspections | IntelliJ IDEA Documentation - JetBrains
Inspections labeled with *** are not available in the editor and can be launched via Code | Running Code Cleanup with profile ''{0}''…...
Read more >
Simple Steps for Improving Your IDE Performance
Unlike the compiler, an IDE has to re-infer types on each code update. To optimize the workload, IntelliJ IDEA tries its best to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found