add warnings that AnalysisToolPak inconsistently handles case-sensitivity of function names

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747835 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Javen O'Neal 2016-06-11 01:41:54 +00:00
parent 649f2df1e9
commit 9ca89c2278

View File

@ -71,6 +71,7 @@ public final class AnalysisToolPak implements UDFFinder {
// if you save such a .xlsx workbook as .xls // if you save such a .xlsx workbook as .xls
if(name.startsWith("_xlfn.")) name = name.substring(6); if(name.startsWith("_xlfn.")) name = name.substring(6);
// FIXME: inconsistent case-sensitivity
return _functionsByName.get(name.toUpperCase(Locale.ROOT)); return _functionsByName.get(name.toUpperCase(Locale.ROOT));
} }
@ -197,6 +198,7 @@ public final class AnalysisToolPak implements UDFFinder {
public static boolean isATPFunction(String name){ public static boolean isATPFunction(String name){
AnalysisToolPak inst = (AnalysisToolPak)instance; AnalysisToolPak inst = (AnalysisToolPak)instance;
// FIXME: inconsistent case-sensitivity
return inst._functionsByName.containsKey(name); return inst._functionsByName.containsKey(name);
} }
@ -261,6 +263,7 @@ public final class AnalysisToolPak implements UDFFinder {
". You cannot override POI's implementations of Excel functions"); ". You cannot override POI's implementations of Excel functions");
} }
// FIXME: inconsistent case-sensitivity
inst._functionsByName.put(name, func); inst._functionsByName.put(name, func);
} }
} }