Author: tilman
Date: Sun Aug 17 16:31:36 2025
New Revision: 1927839
Log:
PDFBOX-5660: simplify code, as suggested by Valery Bokov; closes #215
Modified:
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/util/NumberFormatUtil.java
Modified:
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/util/NumberFormatUtil.java
==============================================================================
---
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/util/NumberFormatUtil.java
Sun Aug 17 16:31:32 2025 (r1927838)
+++
pdfbox/branches/3.0/pdfbox/src/main/java/org/apache/pdfbox/util/NumberFormatUtil.java
Sun Aug 17 16:31:36 2025 (r1927839)
@@ -132,7 +132,7 @@ public class NumberFormatUtil
int offset = startOffset;
long remaining = number;
- while (remaining > Integer.MAX_VALUE && (!omitTrailingZeros ||
remaining > 0))
+ while (remaining > Integer.MAX_VALUE)
{
long digit = remaining / POWER_OF_TENS[exp];
remaining -= (digit * POWER_OF_TENS[exp]);