Skip to content

Commit 5c96f79

Browse files
committed
Fix violations
1 parent dbef3c1 commit 5c96f79

File tree

1 file changed

+2
-4
lines changed
  • jdi-light-material-ui/src/main/java/com/epam/jdi/light/material/elements/feedback/progress

1 file changed

+2
-4
lines changed

jdi-light-material-ui/src/main/java/com/epam/jdi/light/material/elements/feedback/progress/Progress.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import com.epam.jdi.light.material.asserts.feedback.ProgressAssert;
1010

1111
import java.lang.reflect.Field;
12-
import java.util.NoSuchElementException;
1312

13+
import static com.epam.jdi.light.common.Exceptions.runtimeException;
1414
import static com.epam.jdi.light.driver.WebDriverByUtils.NAME_TO_LOCATOR;
1515
import static com.epam.jdi.light.elements.init.UIFactory.$;
1616
import static com.epam.jdi.light.elements.pageobjects.annotations.objects.FillFromAnnotationRules.fieldHasAnnotation;
@@ -49,15 +49,13 @@ public Label label() {
4949
* Gets the current value of progress.
5050
*
5151
* @return current progress value as {@code int}
52-
* @throws NoSuchElementException if 'value' attribute doesn't exist
53-
* (i.e. the progress is indeterminate)
5452
*/
5553
@JDIAction("Get '{name}' value now")
5654
public int getValueNow() {
5755
if (isDeterminate()) {
5856
return Integer.parseInt(core().attr("aria-valuenow"));
5957
}
60-
throw new NoSuchElementException("No exist 'value' attribute");
58+
throw runtimeException("No exist 'value' attribute");
6159
}
6260

6361
/**

0 commit comments

Comments
 (0)