Skip to content

Commit 408a235

Browse files
committed
Simplified test loop
1 parent ac4edeb commit 408a235

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/org/jsoup/parser/HtmlParserTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,11 +2210,11 @@ static void assertErrorsDoNotContain(String msg, ParseErrorList errors) {
22102210

22112211
@Nested class DeepHtmlTrees {
22122212
private int depth(Element el) {
2213-
int d = 0;
2213+
int depth = 0;
22142214
while ((el = el.parent()) != null) {
2215-
d++;
2216-
} while (el != null);
2217-
return d;
2215+
depth++;
2216+
}
2217+
return depth;
22182218
}
22192219

22202220
/**

0 commit comments

Comments
 (0)