https://bz.apache.org/bugzilla/show_bug.cgi?id=64319
Bug ID: 64319
Summary: DataFormatter on conditional format with E in adds a +
Product: POI
Version: unspecified
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: SS Common
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
If you have a number format which ends up with an "E" in it, this is replaced
by "E+"
If my formatString is "TRUE";"TRUE";"FALSE", I'd expect all non-zero values to
be "TRUE", however they are "TRUE+".
This test fails:
@Test
public void testBaseFormattingTrue() {
DataFormatter formatter = new DataFormatter();
assertThat(formatter.formatRawCellContents(1.0, 170,
"\"TRUE\";\"TRUE\";\"FALSE\"")).isEqualTo("TRUE");
}
and
System.out.println(formatter.formatRawCellContents(1.0, 170,
"\"POSITIVE\";\"NEGATIVE\";\"ZERO\""));
System.out.println(formatter.formatRawCellContents(-1.0, 170,
"\"POSITIVE\";\"NEGATIVE\";\"ZERO\""));
System.out.println(formatter.formatRawCellContents(0, 170,
"\"POSITIVE\";\"NEGATIVE\";\"ZERO\""));
prints:
POSITIVE+
NE+GATIVE
ZE+RO
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]