From 68d720a7660f9dc52dba40130cd271445549add8 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Sat, 20 Jan 2024 20:28:47 -0500 Subject: [PATCH] Fix violations --- .../src/main/java/io/github/com/pages/NewAngularPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jdi-light-angular-tests/src/main/java/io/github/com/pages/NewAngularPage.java b/jdi-light-angular-tests/src/main/java/io/github/com/pages/NewAngularPage.java index c56646a29f..af44feee24 100644 --- a/jdi-light-angular-tests/src/main/java/io/github/com/pages/NewAngularPage.java +++ b/jdi-light-angular-tests/src/main/java/io/github/com/pages/NewAngularPage.java @@ -6,6 +6,7 @@ import java.lang.reflect.Field; +import static com.epam.jdi.light.common.Exceptions.runtimeException; import static com.epam.jdi.light.elements.pageobjects.annotations.objects.FillFromAnnotationRules.fieldHasAnnotation; public abstract class NewAngularPage extends WebPage implements ISetup { @@ -13,7 +14,7 @@ public abstract class NewAngularPage extends WebPage implements ISetup { @Override public void setup(Field field) { if (!fieldHasAnnotation(field, Url.class, NewAngularPage.class)) { - throw new RuntimeException("AngularPage does not have an Url annotation."); + throw runtimeException("AngularPage does not have an Url annotation."); } pageLink = field.getAnnotation(Url.class).value().substring(1); }