File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
src/main/java/org/htmlunit/html Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -541,18 +541,9 @@ private <E extends HtmlElement> List<E> getFormElementsByAttribute(
541541 final String attributeName ,
542542 final String attributeValue ) {
543543
544- final List <E > list = new ArrayList <>();
545- final String lowerCaseTagName = elementName .toLowerCase (Locale .ROOT );
546-
547- for (final HtmlElement element : getElements ()) {
548- if (element .getTagName ().equals (lowerCaseTagName )) {
549- final String attValue = element .getAttribute (attributeName );
550- if (attValue .equals (attributeValue )) {
551- list .add ((E ) element );
552- }
553- }
554- }
555- return list ;
544+ return (List <E >) getElements (htmlElement ->
545+ htmlElement .getTagName ().equals (elementName )
546+ && htmlElement .getAttribute (attributeName ).equals (attributeValue ));
556547 }
557548
558549 /**
You can’t perform that action at this time.
0 commit comments