From 1e5b225de22fd85f7c27c825749008225fe2c10c Mon Sep 17 00:00:00 2001 From: Nicca3006 Date: Wed, 5 Oct 2022 17:38:48 +0200 Subject: [PATCH 1/2] Update PendingException cucumber.api is outdated so PendingException should be updated --- .../org/jetbrains/plugins/cucumber/java/CucumberJavaUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cucumber-java/src/org/jetbrains/plugins/cucumber/java/CucumberJavaUtil.java b/cucumber-java/src/org/jetbrains/plugins/cucumber/java/CucumberJavaUtil.java index 384a81a82a1..ca8220642a7 100644 --- a/cucumber-java/src/org/jetbrains/plugins/cucumber/java/CucumberJavaUtil.java +++ b/cucumber-java/src/org/jetbrains/plugins/cucumber/java/CucumberJavaUtil.java @@ -99,7 +99,7 @@ private static String getCucumberAnnotationSuffix(@NotNull String name) { public static String getCucumberPendingExceptionFqn(@NotNull final PsiElement context) { final String version = CucumberConfigUtil.getCucumberCoreVersion(context); if (version == null || version.compareTo(CucumberConfigUtil.CUCUMBER_VERSION_1_1) >= 0) { - return "cucumber.api.PendingException"; + return "io.cucumber.java.PendingException"; } return "cucumber.runtime.PendingException"; } From d2d5393da066ed617d9516003378c7f0d1a9d07a Mon Sep 17 00:00:00 2001 From: Nicca3006 Date: Wed, 5 Oct 2022 17:47:05 +0200 Subject: [PATCH 2/2] Update JavaSnippet.java With an updated CucumberJavaUtil.java Exception should work again --- .../jetbrains/plugins/cucumber/java/steps/JavaSnippet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cucumber-java/src/org/jetbrains/plugins/cucumber/java/steps/JavaSnippet.java b/cucumber-java/src/org/jetbrains/plugins/cucumber/java/steps/JavaSnippet.java index 853eec96611..0db0a10ddec 100644 --- a/cucumber-java/src/org/jetbrains/plugins/cucumber/java/steps/JavaSnippet.java +++ b/cucumber-java/src/org/jetbrains/plugins/cucumber/java/steps/JavaSnippet.java @@ -27,7 +27,7 @@ protected String getArgType(Class arg) { @Override public String template() { - return "@{0}(\"{1}\")\npublic void {2}({3}) throws Throwable '{'\n // {4}\n{5} throw new PendingException();\n'}'\n"; + return "@{0}(\"{1}\")\npublic void {2}({3}) throws Throwable '{'\n {4}\n{5} throw new PendingException();\n'}'\n"; } @Override @@ -49,4 +49,4 @@ public String namedGroupEnd() { public String escapePattern(String pattern) { return pattern.replace("\\", "\\\\").replace("\"", "\\\""); } -} \ No newline at end of file +}