IDEMPIERE-5542 [DisplayType] - Cache issue (#1717)

- Fix problem with the AbstractXLSXExporter going wild, the method getFormatString is trying to create a format with the number of digits supported by the NumberFormat, and as the MaximumIntegerDigits is not set, is trying to create a String with the default which is 2147483647
This commit is contained in:
Carlos Ruiz 2023-03-10 18:01:09 +01:00 committed by GitHub
parent 3877a672c6
commit fb98b75ce9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -638,6 +638,10 @@ public final class DisplayType
}
else
{
format.setMaximumIntegerDigits(MAX_DIGITS);
format.setMaximumFractionDigits(MAX_FRACTION);
format.setMinimumFractionDigits(1);
//not custom type, don't have to check factory
if (displayType < 1000000)
return format;
@ -665,10 +669,7 @@ public final class DisplayType
}
s_customDisplayTypeNegativeCache.put(customTypeKey, Boolean.TRUE);
}
format.setMaximumIntegerDigits(MAX_DIGITS);
format.setMaximumFractionDigits(MAX_FRACTION);
format.setMinimumFractionDigits(1);
}
return format;
} // getDecimalFormat