mbien commented on code in PR #6841:
URL: https://github.com/apache/netbeans/pull/6841#discussion_r1429059008


##########
java/java.navigation/src/org/netbeans/modules/java/stackanalyzer/StackLineAnalyser.java:
##########
@@ -57,11 +55,12 @@ class StackLineAnalyser {
     private static final String IDENTIFIER =
         "\\p{javaJavaIdentifierStart}\\p{javaJavaIdentifierPart}*";    // 
NOI18N
     private static final Pattern LINE_PATTERN = Pattern.compile(
-        "at\\s" +                                       //  initial at // 
NOI18N
+        "at\\s+" +                                       //  initial at // 
NOI18N
         "("+IDENTIFIER+"(?:\\."+IDENTIFIER+")*/)?" + // optional module name 
// NOI18N
         "(("+IDENTIFIER+"(\\."+IDENTIFIER+")*)\\.)?("+IDENTIFIER+")" + // 
class name // NOI18N
-        
"\\.("+IDENTIFIER+"|\\<init\\>|\\<clinit\\>)\\((?:"+IDENTIFIER+"(?:\\."+IDENTIFIER+")*/)?"
 +IDENTIFIER+"\\.?("+IDENTIFIER+ // method and file name // NOI18N
-        ")\\:([0-9]*)\\)");                              // line number // 
NOI18N
+        "\\.("+IDENTIFIER+"|\\<init\\>|\\<clinit\\>)\\s*"+ // method name
+        
"\\((?:"+IDENTIFIER+"(?:\\."+IDENTIFIER+")*/)?"+IDENTIFIER+"(\\.(?:\\p{javaJavaIdentifierPart}+))?"+
 // '(File.java' // NOI18N
+        "\\:([0-9]*)\\)");                              // ':123)' // NOI18N

Review Comment:
   the original goal was to add a few optional `\\s*` but this does also 
include a fix for 
https://github.com/apache/netbeans/pull/6640/files#r1377502665, since this 
didn't work before as pointed out in the linked review.
   
   The file extension group is now optional 
`(\\.(?:\\p{javaJavaIdentifierPart}+))?`. Tests cover this now too.



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