experimenting to unblink GroovyDebuggerTest
authorpeter <peter@jetbrains.com>
Thu, 12 Feb 2015 16:50:17 +0000 (17:50 +0100)
committerpeter <peter@jetbrains.com>
Thu, 12 Feb 2015 16:56:00 +0000 (17:56 +0100)
plugins/groovy/src/org/jetbrains/plugins/groovy/debugger/GroovyCodeFragmentFactory.java

index 83811221dca92102cb9ca30185a26cc463112547..43c7b51954adec91202400cdb45751ed7aa0e17f 100644 (file)
@@ -116,6 +116,7 @@ public class GroovyCodeFragmentFactory extends CodeFragmentFactory {
       //javaText.append("System.out.println(\"\\\\[([^,()]+\\\\$\\\\$)[A-Za-z0-9]{8}(\\\\.[^,()]+)\\\\(" + s + ":\\\\d+\\\\), (\\\\1[A-Za-z0-9]{8}\\\\2\\\\(Unknown Source\\\\), |.+(?:com|org)\\\\.springsource\\\\.loaded\\\\.).+\")\n");
 
       javaText.append("StackTraceElement[] |trace = new Exception().getStackTrace();\n");
+      javaText.append("StackTraceElement |singleElement = |trace.length == 0 ? null : |trace[0];\n");
       javaText.append(
         "if (java.util.Arrays.toString(|trace).matches(\"\\\\[([^,()]+\\\\$\\\\$)[A-Za-z0-9]{8}(\\\\.[^,()]+)\\\\(")
         .append(s)