<p>In certain situations we deal with infinite (or NaN) doubles. This causes issues when trying to instantiate a BigDecimal from it, which is an intermediary step in the process of rounding the double.</p>
<p>This commit checks for such non-finite doubles and throws a specific exception if their rounding is attempted.</p>
<p>Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="842637424" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/5366" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/5366/hovercard" href="https://github.com/bisq-network/bisq/issues/5366">#5366</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="842252508" data-permission-text="Title is private" data-url="https://github.com/bisq-network/bisq/issues/5362" data-hovercard-type="issue" data-hovercard-url="/bisq-network/bisq/issues/5362/hovercard" href="https://github.com/bisq-network/bisq/issues/5362">#5362</a></p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/bisq-network/bisq/pull/5374'>https://github.com/bisq-network/bisq/pull/5374</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Handle rounding of infinite Doubles</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5374/files#diff-16806e3f1a68b9646a8f832e13c8695cddc474f724444d3dc7861ed070af9d37">common/src/main/java/bisq/common/util/MathUtils.java</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/bisq-network/bisq/pull/5374/files#diff-5b462ee09f8c5207b4d503466a7bffb9ba6e1594cd08ac96ffa1e02118edceca">common/src/test/java/bisq/common/util/MathUtilsTest.java</a>
    (14)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/bisq-network/bisq/pull/5374.patch'>https://github.com/bisq-network/bisq/pull/5374.patch</a></li>
  <li><a href='https://github.com/bisq-network/bisq/pull/5374.diff'>https://github.com/bisq-network/bisq/pull/5374.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/5374">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNQNPOTC5YNDAAH2UNTTGDDHRANCNFSM42ABNU4Q">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQHKYFP6HTPKFOUMDTTGDDHRA5CNFSM42ABNU42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MSIVLHQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/5374",
"url": "https://github.com/bisq-network/bisq/pull/5374",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>