Inspectopedia
 
2024.3

Call to 'Number.toString()'

Warning
New
Last modified: 03 December 2024

Reports toString() calls on objects of a class extending Number. Such calls are usually incorrect in an internationalized environment and some locale specific formatting should be used instead.

Example:

A possible way to fix this problem could be:

This formats the number using the default locale which is set during the startup of the JVM and is based on the host environment.