Skip to content

Commit b7694cc

Browse files
committed
fix: changed stack trace list from 3 to 2, to get correct step definition file name in reports
1 parent ca3c2e7 commit b7694cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java8/src/main/java/cucumber/runtime/java8/Java8StepDefinition.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public <T extends StepdefBody> Java8StepDefinition(String pattern, long timeoutM
3838
this.body = body;
3939

4040
this.argumentMatcher = new JdkPatternArgumentMatcher(this.pattern);
41-
this.location = new Exception().getStackTrace()[3];
41+
this.location = new Exception().getStackTrace()[2];
4242
this.method = getAcceptMethod(body.getClass());
4343
try {
4444
Class<?>[] arguments = resolveRawArguments(bodyClass, body.getClass());

0 commit comments

Comments
 (0)