[ 
https://issues.apache.org/jira/browse/WW-5828?focusedWorklogId=1051639&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1051639
 ]

ASF GitHub Bot logged work on WW-5828:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Oct/26 14:33
            Start Date: 31/Oct/26 14:33
    Worklog Time Spent: 10m 
      Work Description: sonarqubecloud[bot] commented on PR #2086:
URL: https://github.com/apache/struts/pull/2086#issuecomment-6544758366

   ## [![Quality Gate 
Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png
 'Quality Gate 
Passed')](https://sonarcloud.io/dashboard?id=apache_struts&pullRequest=2086) 
**Quality Gate passed**  
   Issues  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 New 
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=2086&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png
 '') [0 Accepted 
issues](https://sonarcloud.io/project/issues?id=apache_struts&pullRequest=2086&issueStatuses=ACCEPTED)
   
   Measures  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_struts&pullRequest=2086&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [100.0% Coverage on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=2086&metric=new_coverage&view=list)
  
   
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png
 '') [0.0% Duplication on New 
Code](https://sonarcloud.io/component_measures?id=apache_struts&pullRequest=2086&metric=new_duplicated_lines_density&view=list)
  
     
   <!

Issue Time Tracking
-------------------

    Worklog Id:     (was: 1051639)
    Time Spent: 1h  (was: 50m)

> StringConverter does not bound integer digits when formatting BigDecimal
> ------------------------------------------------------------------------
>
>                 Key: WW-5828
>                 URL: https://issues.apache.org/jira/browse/WW-5828
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core
>            Reporter: Lukasz Lenart
>            Assignee: Lukasz Lenart
>            Priority: Major
>             Fix For: 6.13.0, 7.5.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> WW-5711 bounded {{maximumFractionDigits}} to 340 in 
> {{StringConverter.convertToString()}}, so the length of a formatted 
> {{BigDecimal}} no longer follows a large positive scale. The integer side has 
> no equivalent bound: {{DecimalFormat}} keeps its default 
> {{maximumIntegerDigits}} of {{Integer.MAX_VALUE}}, and for a {{BigDecimal}} 
> with a large negative scale it pads the integer part out to the full value, 
> so the length of the output follows the scale of the value rather than its 
> precision — the counterpart of WW-5711 on the other side of the decimal point.
> {{setMaximumIntegerDigits}} is not the right bound. {{DecimalFormat}} applies 
> it by dropping the leading digits rather than by rounding, so an ordinary 
> value wider than the bound would format as its trailing digits only.
> Bound the number of integer digits ({{precision() - scale()}}) to the same 
> 340 instead. A {{BigDecimal}} within that bound formats exactly as before; 
> past it, fall back to {{BigDecimal.toString()}}, which renders the value 
> compactly in scientific notation. Every {{double}} still formats in full — 
> the widest, {{Double.MAX_VALUE}}, has 309 integer digits, and the existing 
> tests pin that.
> Add a regression test covering the bound on both sides of it.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to