File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/java/org/htmlunit/html Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -201,7 +201,8 @@ public void setOptionSize(final int newLength) {
201201 */
202202 public void removeOption (final int index ) {
203203 final ChildElementsIterator iterator = new ChildElementsIterator (this );
204- for (int i = 0 ; iterator .hasNext ();) {
204+ int i = 0 ;
205+ while (iterator .hasNext ()) {
205206 final DomElement element = iterator .next ();
206207 if (element instanceof HtmlOption ) {
207208 if (i == index ) {
@@ -221,7 +222,8 @@ public void removeOption(final int index) {
221222 */
222223 public void replaceOption (final int index , final HtmlOption newOption ) {
223224 final ChildElementsIterator iterator = new ChildElementsIterator (this );
224- for (int i = 0 ; iterator .hasNext ();) {
225+ int i = 0 ;
226+ while (iterator .hasNext ()) {
225227 final DomElement element = iterator .next ();
226228 if (element instanceof HtmlOption ) {
227229 if (i == index ) {
You can’t perform that action at this time.
0 commit comments