Author: lehmi
Date: Tue Apr  9 18:46:23 2024
New Revision: 1916885

URL: http://svn.apache.org/viewvc?rev=1916885&view=rev
Log:
PDFBOX-5799: sonar fix

Modified:
    
pdfbox/trunk/io/src/main/java/org/apache/pdfbox/io/SequenceRandomAccessRead.java

Modified: 
pdfbox/trunk/io/src/main/java/org/apache/pdfbox/io/SequenceRandomAccessRead.java
URL: 
http://svn.apache.org/viewvc/pdfbox/trunk/io/src/main/java/org/apache/pdfbox/io/SequenceRandomAccessRead.java?rev=1916885&r1=1916884&r2=1916885&view=diff
==============================================================================
--- 
pdfbox/trunk/io/src/main/java/org/apache/pdfbox/io/SequenceRandomAccessRead.java
 (original)
+++ 
pdfbox/trunk/io/src/main/java/org/apache/pdfbox/io/SequenceRandomAccessRead.java
 Tue Apr  9 18:46:23 2024
@@ -157,14 +157,13 @@ public class SequenceRandomAccessRead im
         {
             // search forward/backwards if the new position is after/before 
the current position
             int increment = position < currentPosition ? -1 : 1;
-            for (int i = currentIndex; i < numberOfReader && i >= 0;)
+            for (int i = currentIndex; i < numberOfReader && i >= 0; i += 
increment)
             {
                 if (position >= startPositions[i] && position <= 
endPositions[i])
                 {
                     currentIndex = i;
                     break;
                 }
-                i += increment;
             }
             currentPosition = position;
         }


Reply via email to