You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2019/06/03 19:10:50 UTC

[GitHub] [netbeans] matthiasblaesing commented on a change in pull request #1277: [NETBEANS-2621] cleanup generic class iterator

matthiasblaesing commented on a change in pull request #1277: [NETBEANS-2621] cleanup generic class iterator
URL: https://github.com/apache/netbeans/pull/1277#discussion_r289992737
 
 

 ##########
 File path: groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/api/parser/GroovyVirtualSourceProvider.java
 ##########
 @@ -350,7 +350,8 @@ private void genProp(PropertyNode propNode, PrintWriter out) {
             boolean skipGetter = false;
             List getterCandidates = propNode.getField().getOwner().getMethods(getterName);
             if (getterCandidates != null) {
-                for (MethodNode method : getterCandidates) {
 
 Review comment:
   Are you looking for this?
   
   ```diff
   --- a/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/api/parser/GroovyVirtualSourceProvider.java
   +++ b/groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/api/parser/GroovyVirtualSourceProvider.java
   @@ -348,10 +348,9 @@
                String getterName = "get" + name;
    
                boolean skipGetter = false;
   -            List getterCandidates = propNode.getField().getOwner().getMethods(getterName);
   +            List<MethodNode> getterCandidates = propNode.getField().getOwner().getMethods(getterName);
                if (getterCandidates != null) {
   -                for (Iterator it = getterCandidates.iterator(); it.hasNext();) {
   -                    MethodNode method = (MethodNode) it.next();
   +                for (MethodNode method: getterCandidates) {
                        if (method.getParameters().length == 0) {
                            skipGetter = true;
                        }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists