From 0f40ad3125b2e71a5fe18ebce0d7880aeedfcfc7 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sun, 8 Nov 2015 11:57:58 +0000 Subject: [PATCH] Make forbiddenapis also check excelant. Use a separate "classpath" for running forbiddenapis; don't misuse javadoc.classpath for that. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713222 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 14 ++++++++++---- .../org/apache/poi/ss/excelant/ExcelAntTask.java | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/build.xml b/build.xml index a82dc75cc..5756ffb56 100644 --- a/build.xml +++ b/build.xml @@ -366,6 +366,15 @@ under the License. + + + + + + + + + @@ -1766,7 +1775,7 @@ under the License. classpath="${forbidden.jar}"/> @@ -1779,10 +1788,7 @@ under the License. - diff --git a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java index 422496988..ad0cf6b84 100644 --- a/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java +++ b/src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java @@ -23,6 +23,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import java.util.Iterator; import java.util.LinkedList; +import java.util.Locale; import org.apache.poi.ss.excelant.util.ExcelAntWorkbookUtil; import org.apache.poi.ss.excelant.util.ExcelAntWorkbookUtilFactory; @@ -88,7 +89,7 @@ public class ExcelAntTask extends Task { versionBffr.append( "ExcelAnt version " ) ; versionBffr.append( VERSION ) ; versionBffr.append( " Copyright 2011" ) ; - SimpleDateFormat sdf = new SimpleDateFormat( "yyyy" ) ; + SimpleDateFormat sdf = new SimpleDateFormat( "yyyy", Locale.ROOT ) ; double currYear = Double.parseDouble( sdf.format( new Date() ) ); if( currYear > 2011 ) { versionBffr.append( "-" ) ;