lbownik commented on code in PR #3995:
URL: https://github.com/apache/netbeans/pull/3995#discussion_r922626532


##########
java/gradle.java/src/org/netbeans/modules/gradle/java/GradleJavaTokenProvider.java:
##########
@@ -99,11 +99,25 @@ private void processSelectedMethod(final Map<String, 
String> map, Lookup context
         if ((fo != null) && fo.isData()) {
             GradleJavaProject gjp = GradleJavaProject.get(project);
             String className = evaluateClassName(gjp, fo);
-            String selectedMethod = method != null ? className + '.' + 
method.getMethodName() : className;
+            String selectedMethod = fullyQualifiedMethodName(className, 
method);
             map.put(SELECTED_METHOD, selectedMethod);
         }
     }
 
+    private String fullyQualifiedMethodName(String className, SingleMethod 
singleMethod) {
+        if(singleMethod == null) {
+            return className;
+        }
+        StringBuilder sb = new StringBuilder();

Review Comment:
   default String Builder capacity will probably be too small to avoid internat 
buffer realocations. something like
   
   String builder sb = new StringBuilder(className.length() * 3); 
   
   would improve performance most of the time.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to