pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1862702 - /pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/text/TextPosition.java
Date Sun, 07 Jul 2019 16:22:57 GMT
Author: tilman
Date: Sun Jul  7 16:22:57 2019
New Revision: 1862702

URL: http://svn.apache.org/viewvc?rev=1862702&view=rev
Log:
PDFBOX-4071: SonarQube fix: remove conditions that are always true

Modified:
    pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/text/TextPosition.java

Modified: pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/text/TextPosition.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/text/TextPosition.java?rev=1862702&r1=1862701&r2=1862702&view=diff
==============================================================================
--- pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/text/TextPosition.java
(original)
+++ pdfbox/branches/issue45/pdfbox/src/main/java/org/apache/pdfbox/text/TextPosition.java
Sun Jul  7 16:22:57 2019
@@ -602,20 +602,20 @@ public final class TextPosition
             }
             // diacritic completely covers this character and therefore we assume that this
is the
             // character the diacritic belongs to
-            else if (diacXStart < currCharXStart && diacXEnd > currCharXEnd)
+            else if (diacXStart < currCharXStart)
             {
                 insertDiacritic(i, diacritic);
                 wasAdded = true;
             }
             // otherwise, The diacritic modifies this character because its completely
             // contained by the character width
-            else if (diacXStart >= currCharXStart && diacXEnd <= currCharXEnd)
+            else if (diacXEnd <= currCharXEnd)
             {
                 insertDiacritic(i, diacritic);
                 wasAdded = true;
             }
             // last character in the TextPosition so we add diacritic to the end
-            else if (diacXStart >= currCharXStart && diacXEnd > currCharXEnd
&& i == strLen - 1)
+            else if (i == strLen - 1)
             {
                 insertDiacritic(i, diacritic);
                 wasAdded = true;



Mime
View raw message