JaroslavTulach commented on a change in pull request #3213:
URL: https://github.com/apache/netbeans/pull/3213#discussion_r723006233



##########
File path: 
groovy/groovy.editor/src/org/netbeans/modules/groovy/editor/compiler/PerfStatCompilationUnit.java
##########
@@ -235,12 +239,37 @@ public TimingOp(Object delegate, int phase) {
             if (cn.contains("$$Lambda")) { // NOI18N
                 StackTraceElement invokedFrom = null;
                 for (StackTraceElement ele : new Throwable().getStackTrace()) {
-                    boolean myClass = 
ele.getClassName().startsWith(PerfStatCompilationUnit.class.getName());
+                    boolean myClass = 
ele.getClassName().startsWith("org.netbeans.modules.groovy.editor.");
                     if (!myClass) {
                         invokedFrom = ele;
                         break;
                     }
+
                 }
+                if (cn.contains("ASTTransformationVisitor$$Lambda$")) {
+                    String k = invokedFrom.getMethodName() + ":" + 
invokedFrom.getLineNumber();

Review comment:
       A comment in the code might be helpful in the future.




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