Skip to content

Commit

Permalink
PDFBOX-4688: BigDecimal(double) should not be used as suggested by So…
Browse files Browse the repository at this point in the history
…narCloud and Haris Adzemovic; closes #76

git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1869753 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
THausherr committed Nov 13, 2019
1 parent a8a45a3 commit cf39f61
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private BufferedImage getImage(PageDrawer drawer, PDTilingPattern pattern, PDCol
*/
private static int ceiling(double num)
{
BigDecimal decimal = new BigDecimal(num);
BigDecimal decimal = BigDecimal.valueOf(num);
decimal = decimal.setScale(5, RoundingMode.CEILING); // 5 decimal places of accuracy
return decimal.intValue();
}
Expand Down

0 comments on commit cf39f61

Please sign in to comment.