Skip to content

Commit 6898ad2

Browse files
committed
code style
1 parent 555b328 commit 6898ad2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/org/htmlunit/html/HtmlSelect.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)