Skip to content

Commit ee47441

Browse files
committed
PDFBOX-5799: sonar fix
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/branches/3.0@1916886 13f79535-47bb-0310-9956-ffa450edef68
1 parent 171e3fb commit ee47441

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

io/src/main/java/org/apache/pdfbox/io/SequenceRandomAccessRead.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,13 @@ public void seek(long position) throws IOException
157157
{
158158
// search forward/backwards if the new position is after/before the current position
159159
int increment = position < currentPosition ? -1 : 1;
160-
for (int i = currentIndex; i < numberOfReader && i >= 0;)
160+
for (int i = currentIndex; i < numberOfReader && i >= 0; i += increment)
161161
{
162162
if (position >= startPositions[i] && position <= endPositions[i])
163163
{
164164
currentIndex = i;
165165
break;
166166
}
167-
i += increment;
168167
}
169168
currentPosition = position;
170169
}

0 commit comments

Comments
 (0)