Skip to content

Commit 76ebc29

Browse files
authored
Merge pull request #27 from anonyein/origin
Simplified test loop
2 parents 4c237c8 + 408a235 commit 76ebc29

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)