This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pdfbox-jbig2.git
The following commit(s) were added to refs/heads/master by this push:
new 5822e52 PDFBOX-5660: Sonar fix
5822e52 is described below
commit 5822e52564a38a173d195ccc0b21bbfdfc11e41d
Author: Tilman Hausherr <[email protected]>
AuthorDate: Fri May 15 05:40:18 2026 +0200
PDFBOX-5660: Sonar fix
---
src/main/java/org/apache/pdfbox/jbig2/image/Weighttab.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/pdfbox/jbig2/image/Weighttab.java
b/src/main/java/org/apache/pdfbox/jbig2/image/Weighttab.java
index 532884a..0dedb98 100644
--- a/src/main/java/org/apache/pdfbox/jbig2/image/Weighttab.java
+++ b/src/main/java/org/apache/pdfbox/jbig2/image/Weighttab.java
@@ -77,7 +77,8 @@ final class Weighttab
// compute the discrete, sampled filter coefficients
int sum = 0;
- for (int idx = 0, i = i0; i <= i1; i++)
+ int idx = 0;
+ for (int i = i0; i <= i1; i++)
{
/* evaluate the filter function at p */
final double tr = Utils.clamp(scale * pf.eval(center, i),
Short.MIN_VALUE,
@@ -116,8 +117,8 @@ final class Weighttab
if (Resizer.debug)
{
System.out.printf("\t");
- for (int idx = 0, i = i0; i < i1; i++, idx++)
- System.out.printf("%5d ", weights[idx]);
+ for (int jdx = 0, i = i0; i < i1; i++, jdx++)
+ System.out.printf("%5d ", weights[jdx]);
System.out.println();
}
}