Assign GlobalConfiguration initializer to unused variable#2742
Assign GlobalConfiguration initializer to unused variable#2742TimvdLippe merged 1 commit intomockito:mainfrom
Conversation
(This silences some errorprone static analysis about calling constructors w/o using the new object.)
|
Is this coming in a future release of ErrorProne? We use ErrorProne ourselves, but it doesn't appear to be catching this problem. |
|
Inside of google we've made CheckReturnValue the default (!), and also added coverage for constructors (calling a constructor for side effects is super weird). We haven't released those checks yet, but I imagine we will at some point. If you'd rather that we carry a local patch for this edit, that's something we can do as well...but then again, this PR is a no-op, so landing it would obviously be my preferred solution to carrying a local patch. |
|
No I am okay with landing this patch, since it is more descriptive what is going on. I was mostly confused as to why ErrorProne didn't catch this error for us. |
TimvdLippe
left a comment
There was a problem hiding this comment.
Thanks! Looking forward to the ErrorProne release as well.
(This silences some errorprone static analysis about calling constructors w/o using the new object.)
Checklist
including project members to get a better picture of the change
commit is meaningful and help the people that will explore a change in 2 years
Fixes #<issue number>in the description if relevantFixes #<issue number>if relevant