aboutsummaryrefslogtreecommitdiffstats
path: root/poi/src
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2021-10-19 14:10:00 +0000
committerPJ Fanning <fanningpj@apache.org>2021-10-19 14:10:00 +0000
commitcdc859a88b0f3015e8643898f666306b9b5bff95 (patch)
treea9238703b0edd4f7ea72356c81db9cef4ea46662 /poi/src
parent616cdf944be2df447aaabd091dbbbff492472880 (diff)
downloadpoi-cdc859a88b0f3015e8643898f666306b9b5bff95.tar.gz
poi-cdc859a88b0f3015e8643898f666306b9b5bff95.zip
warning about varargs
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894379 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi/src')
-rw-r--r--poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java b/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java
index 3f37dc5553..7f233aa5bc 100644
--- a/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java
+++ b/poi/src/main/java/org/apache/poi/ss/format/CellNumberFormatter.java
@@ -724,17 +724,24 @@ public class CellNumberFormatter extends CellFormatter {
return text.replaceFirst("(?s)(.*)" + regex, "$1" + replacement);
}
- private static boolean hasChar(char ch, List<Special>... numSpecials) {
- for (List<Special> specials : numSpecials) {
- for (Special s : specials) {
- if (s.ch == ch) {
- return true;
- }
+ private static boolean hasChar(char ch, List<Special> numSpecials) {
+ for (Special s : numSpecials) {
+ if (s.ch == ch) {
+ return true;
}
}
return false;
}
+ private static boolean hasChar(char ch, List<Special> numSpecials1, List<Special> numSpecials2) {
+ return hasChar(ch, numSpecials1) || hasChar(ch, numSpecials2);
+ }
+
+ private static boolean hasChar(char ch, List<Special> numSpecials1, List<Special> numSpecials2,
+ List<Special> numSpecials3) {
+ return hasChar(ch, numSpecials1) || hasChar(ch, numSpecials2) || hasChar(ch, numSpecials3);
+ }
+
private void writeSingleInteger(String fmt, int num, StringBuffer output, List<Special> numSpecials, Set<CellNumberStringMod> mods) {
StringBuffer sb = new StringBuffer();