You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2015/09/01 21:24:55 UTC
svn commit: r1700651 - in /poi/trunk/src/java/org/apache/poi/ss:
formula/functions/Complex.java usermodel/DateUtil.java
Author: nick
Date: Tue Sep 1 19:24:55 2015
New Revision: 1700651
URL: http://svn.apache.org/r1700651
Log:
Fix some Forbidden APIs errors
Modified:
poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java
poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java
Modified: poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java?rev=1700651&r1=1700650&r2=1700651&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/formula/functions/Complex.java Tue Sep 1 19:24:55 2015
@@ -17,6 +17,8 @@
package org.apache.poi.ss.formula.functions;
+import java.util.Locale;
+
import org.apache.poi.ss.formula.OperationEvaluationContext;
import org.apache.poi.ss.formula.eval.ErrorEval;
import org.apache.poi.ss.formula.eval.EvaluationException;
@@ -94,7 +96,8 @@ public class Complex extends Var2or3ArgF
if (suffixValue.length() == 0) {
suffixValue = DEFAULT_SUFFIX;
}
- if (suffixValue.equals(DEFAULT_SUFFIX.toUpperCase()) || suffixValue.equals(SUPPORTED_SUFFIX.toUpperCase())) {
+ if (suffixValue.equals(DEFAULT_SUFFIX.toUpperCase(Locale.ROOT)) ||
+ suffixValue.equals(SUPPORTED_SUFFIX.toUpperCase(Locale.ROOT))) {
return ErrorEval.VALUE_INVALID;
}
if (!(suffixValue.equals(DEFAULT_SUFFIX) || suffixValue.equals(SUPPORTED_SUFFIX))) {
Modified: poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java?rev=1700651&r1=1700650&r2=1700651&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/usermodel/DateUtil.java Tue Sep 1 19:24:55 2015
@@ -27,14 +27,6 @@ import java.util.regex.Pattern;
/**
* Contains methods for dealing with Excel dates.
- *
- * @author Michael Harhen
- * @author Glen Stampoultzis (glens at apache.org)
- * @author Dan Sherman (dsherman at isisph.com)
- * @author Hack Kampbjorn (hak at 2mba.dk)
- * @author Alex Jacoby (ajacoby at gmail.com)
- * @author Pavel Krupets (pkrupets at palmtreebusiness dot com)
- * @author Thies Wellpott
*/
public class DateUtil {
protected DateUtil() {
@@ -669,7 +661,8 @@ public class DateUtil {
int month = parseInt(monthStr, "month", 1, 12);
int day = parseInt(dayStr, "day", 1, 31);
- Calendar cal = new GregorianCalendar(year, month-1, day, 0, 0, 0);
+ Calendar cal = new GregorianCalendar(TIMEZONE_UTC, Locale.ROOT);
+ cal.set(year, month-1, day, 0, 0, 0);
cal.set(Calendar.MILLISECOND, 0);
return cal.getTime();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org