Bug 61761 - Conditional formatting rule evaluation doesn't like comparing cells of different types
Summary: Conditional formatting rule evaluation doesn't like comparing cells of differ...
Alias: None
Product: POI
Classification: Unclassified
Component: SS Common (show other bugs)
Version: 3.17-FINAL
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2017-11-14 20:35 UTC by Greg Woolsey
Modified: 2017-11-15 08:41 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Greg Woolsey 2017-11-14 20:35:23 UTC
There are a few wrinkles in evaluation unearthed by some Vaadin-Spreadsheet unit tests.

The root is that the EvaluationConditonalFormatRule.OperatorEnum.isValid() method takes <C extends Comparable<C>> inputs, and the calling code wants all the inputs to be the same type to satisfy this.  However, when the comparison operator is something like "not equals" then the result should be TRUE even when the one value is a Number and the other is a String.  Currently it is FALSE in this case, which doesn't match Excel's behavior, and is logically incorrect (I'm not willing to say those two are always equivalent).

Also affects 4.0-dev, which is where I'll address it.
Comment 1 Greg Woolsey 2017-11-15 08:41:16 UTC
Fixed in r1815298