Return-Path: X-Original-To: apmail-poi-commits-archive@minotaur.apache.org Delivered-To: apmail-poi-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 51B7D183E6 for ; Tue, 1 Sep 2015 19:24:56 +0000 (UTC) Received: (qmail 67841 invoked by uid 500); 1 Sep 2015 19:24:56 -0000 Delivered-To: apmail-poi-commits-archive@poi.apache.org Received: (qmail 67807 invoked by uid 500); 1 Sep 2015 19:24:56 -0000 Mailing-List: contact commits-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@poi.apache.org Delivered-To: mailing list commits@poi.apache.org Received: (qmail 67798 invoked by uid 99); 1 Sep 2015 19:24:56 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2015 19:24:56 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 17DE7AC003E for ; Tue, 1 Sep 2015 19:24:56 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1700651 - in /poi/trunk/src/java/org/apache/poi/ss: formula/functions/Complex.java usermodel/DateUtil.java Date: Tue, 01 Sep 2015 19:24:55 -0000 To: commits@poi.apache.org From: nick@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150901192456.17DE7AC003E@hades.apache.org> 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