pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1862336 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SaslPrep.java
Date Sun, 30 Jun 2019 08:57:13 GMT
Author: tilman
Date: Sun Jun 30 08:57:13 2019
New Revision: 1862336

URL: http://svn.apache.org/viewvc?rev=1862336&view=rev
Log:
PDFBOX-4071: Sonar fix: don't assign loop counter from within the loop body

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SaslPrep.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SaslPrep.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SaslPrep.java?rev=1862336&r1=1862335&r2=1862336&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SaslPrep.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/encryption/SaslPrep.java
Sun Jun 30 08:57:13 2019
@@ -96,7 +96,8 @@ class SaslPrep
         boolean containsRandALCat = false;
         boolean containsLCat = false;
         boolean initialRandALCat = false;
-        for (int i = 0; i < normalized.length();)
+        int i = 0;
+        while (i < normalized.length())
         {
             final int codepoint = normalized.codePointAt(i);
             // 3. Prohibit



Mime
View raw message