Skip to content
This repository has been archived by the owner on Jul 29, 2022. It is now read-only.

Wrong styling when exporting column with BigDecimal #21

Open
karakal opened this issue Mar 21, 2017 · 0 comments
Open

Wrong styling when exporting column with BigDecimal #21

karakal opened this issue Mar 21, 2017 · 0 comments

Comments

@karakal
Copy link

karakal commented Mar 21, 2017

BigDecimal is interpreted by the Exporter as "Integer-like".

The culprit is this method in ExcelExport:984:

private boolean isIntegerLongShortOrBigDecimal(final Class<?> type) { if ((Integer.class.equals(type) || (int.class.equals(type)))) { return true; } if ((Long.class.equals(type) || (long.class.equals(type)))) { return true; } if ((Short.class.equals(type)) || (short.class.equals(type))) { return true; } if ((BigDecimal.class.equals(type)) || (BigDecimal.class.equals(type))) { return true; } return false; }

correct implementation would be:

private boolean isIntegerLongShortOrBigInteger(final Class<?> type) { if ((Integer.class.equals(type) || (int.class.equals(type)))) { return true; } if ((Long.class.equals(type) || (long.class.equals(type)))) { return true; } if ((Short.class.equals(type)) || (short.class.equals(type))) { return true; } if ((BigInteger.class.equals(type)) || (BigInteger.class.equals(type))) { return true; } return false; }

BigDecimal must be treated "Double-Style"....

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant