Skip to content

Commit 3eb5e5e

Browse files
committed
PDFBOX-5487: Sonar fix
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922517 13f79535-47bb-0310-9956-ffa450edef68
1 parent 374972f commit 3eb5e5e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -734,18 +734,17 @@ private boolean overlap(float y1, float height1, float y2, float height2)
734734
*/
735735
private void removeContainedSpaces(List<TextPosition> textList)
736736
{
737-
TextPosition position, previousPosition;
738737
Iterator<TextPosition> iterator = textList.iterator();
739738

740739
if (!iterator.hasNext())
741740
{
742741
return;
743742
}
744-
previousPosition = iterator.next();
743+
TextPosition previousPosition = iterator.next();
745744

746745
while (iterator.hasNext())
747746
{
748-
position = iterator.next();
747+
TextPosition position = iterator.next();
749748
if (" ".equals(position.getUnicode()) && previousPosition.completelyContains(position))
750749
{
751750
iterator.remove();

0 commit comments

Comments
 (0)