sonatype-lift[bot] commented on code in PR #1742:
URL: https://github.com/apache/groovy/pull/1742#discussion_r918148023


##########
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java:
##########
@@ -4702,37 +4703,36 @@ protected MethodNode findMethodOrFail(final Expression 
expr, final ClassNode rec
         return null;
     }
 
-    private List<MethodNode> disambiguateMethods(List<MethodNode> methods, 
final ClassNode receiver, final ClassNode[] argTypes, final Expression call) {
-        if (methods.size() > 1 && receiver != null && argTypes != null) {
+    private List<MethodNode> disambiguateMethods(List<MethodNode> methods, 
final ClassNode receiver, final ClassNode[] arguments, final Expression call) {

Review Comment:
   
*[MixedMutabilityReturnType](https://errorprone.info/bugpattern/MixedMutabilityReturnType):*
  This method returns both mutable and immutable collections or maps from 
different paths. This may be confusing for users of the method.
   
   
   ```suggestion
       private ImmutableList<MethodNode> disambiguateMethods(List<MethodNode> 
methods, final ClassNode receiver, final ClassNode[] arguments, final 
Expression call) {
   ```
   
   
   
   Reply with *"**@sonatype-lift help**"* for info about LiftBot commands.
   Reply with *"**@sonatype-lift ignore**"* to tell LiftBot to leave out the 
above finding from this PR.
   Reply with *"**@sonatype-lift ignoreall**"* to tell LiftBot to leave out all 
the findings from this PR and from the status bar in Github.
   
   When talking to LiftBot, you need to **refresh** the page to see its 
response. [Click here](https://help.sonatype.com/lift/talking-to-lift) to get 
to know more about LiftBot commands.
   
   ---
   
   Was this a good recommendation?
   [ [🙁 Not 
relevant](https://www.sonatype.com/lift-comment-rating?comment=295433288&lift_comment_rating=1)
 ] - [ [😕 Won't 
fix](https://www.sonatype.com/lift-comment-rating?comment=295433288&lift_comment_rating=2)
 ] - [ [😑 Not critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=295433288&lift_comment_rating=3)
 ] - [ [🙂 Critical, will 
fix](https://www.sonatype.com/lift-comment-rating?comment=295433288&lift_comment_rating=4)
 ] - [ [😊 Critical, fixing 
now](https://www.sonatype.com/lift-comment-rating?comment=295433288&lift_comment_rating=5)
 ]



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to