Skip to content

Commit

Permalink
Tiny tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy committed Nov 23, 2023
1 parent adce86e commit 297ea4f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/main/java/org/jsoup/nodes/Attributes.java
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,9 @@ public Range.AttributeRange sourceRange(String key) {
return (Range.AttributeRange) Validate.ensureNotNull(userData(rangeKey));
}

@Override
public Iterator<Attribute> iterator() {
return new Iterator<Attribute>() {
return new Iterator<>() {
int expectedSize = size;
int i = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jsoup/nodes/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ Get the source range (start and end positions) in the original input source from
@see org.jsoup.parser.Parser#setTrackPosition(boolean)
@see Range#isImplicit()
@see Element#endSourceRange()
@see Attributes#nameRange(String name)
@see Attributes#sourceRange(String name)
@since 1.15.2
*/
public Range sourceRange() {
Expand Down
2 changes: 0 additions & 2 deletions src/test/java/org/jsoup/nodes/PositionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ private void printRange(Node node) {
else
assertFalse(attrRange.valueRange().isImplicit());


accumulatePositions(attr, track);
}

Expand Down Expand Up @@ -358,7 +357,6 @@ private void printRange(Node node) {
Range.AttributeRange foo = div.attributes().sourceRange("class");
assertEquals("4,1:30-4,6:35=5,1:37-5,4:40", foo.toString());

System.out.println(track);
assertEquals("one:5-8=10-21; id:24-26=27-28; class:30-35=37-40; attr5:41-46=46-46; ", track.toString());
}

Expand Down

0 comments on commit 297ea4f

Please sign in to comment.