From 915ad8c27a51e3876d331af106fff24b01f548a8 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Thu, 29 May 2014 12:04:51 +0000 Subject: [PATCH] Add workaround for IBM JDK where Ant populates classname instead of className for some reason git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1598264 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/ss/excelant/ExcelAntUserDefinedFunction.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntUserDefinedFunction.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntUserDefinedFunction.java index f69e9b6366..5c19912b35 100644 --- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntUserDefinedFunction.java +++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntUserDefinedFunction.java @@ -46,6 +46,13 @@ public class ExcelAntUserDefinedFunction extends Typedef { } protected String getClassName() { + // workaround for IBM JDK assigning the classname to the lowercase instance provided by Definer!?! + // I could not find out why that happens, the wrong assignment seems to be done somewhere deep inside Ant itself + // or even in IBM JDK as Oracle JDK does not have this problem. + if(className == null) { + return getClassname(); + } + return className; } -- 2.39.5