[github-176] Remove limit on number of rules in XSSFSheetConditionalFormatting.

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1877176 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2020-04-29 20:55:09 +00:00
parent 4da2b597e0
commit bc654e63da
1 changed files with 4 additions and 8 deletions

View File

@ -97,14 +97,10 @@ public abstract class BaseTestConditionalFormatting {
assertTrue(e.getMessage().startsWith("cfRules must not be empty"));
}
try {
sheetCF.addConditionalFormatting(
new CellRangeAddress[]{CellRangeAddress.valueOf("A1:A3")},
new ConditionalFormattingRule[]{rule1, rule2, rule3, rule4});
fail("expected exception");
} catch (IllegalArgumentException e) {
assertTrue(e.getMessage().startsWith("Number of rules must not exceed 3"));
}
//this is now allowed
sheetCF.addConditionalFormatting(
new CellRangeAddress[]{CellRangeAddress.valueOf("A1:A3")},
new ConditionalFormattingRule[]{rule1, rule2, rule3, rule4});
}
}