Skip to content

Commit b1aa571

Browse files
committed
convert to java
1 parent 8bf1780 commit b1aa571

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javaagent-tooling/src/test/java/io/opentelemetry/javaagent/tooling/bytebuddy/matcher/ThrowOnFirstElement.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88
import java.util.Iterator;
99

1010
public class ThrowOnFirstElement implements Iterator<Object> {
11+
private int current = 0;
12+
1113
@Override
1214
public boolean hasNext() {
13-
return i++ < 1;
15+
return current++ < 1;
1416
}
1517

1618
@Override
1719
public Object next() {
1820
throw new RuntimeException("iteration exception");
1921
}
20-
21-
private int i = 0;
2222
}

0 commit comments

Comments
 (0)