]> source.dussan.org Git - poi.git/commit
Bug 58326 - Forbidden APIs patches - first set of changes for locale and timezone...
authorAndreas Beeker <kiwiwings@apache.org>
Mon, 7 Sep 2015 20:19:50 +0000 (20:19 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Mon, 7 Sep 2015 20:19:50 +0000 (20:19 +0000)
commita3d2eb57ff4ac10ae215b9b7404260103eb6f538
tree7b44ec32a7cdd0e0828779c793061ac6a00e4c00
parentf2e85496125f7fc68f7434244b9d9d5bb026933d
Bug 58326 - Forbidden APIs patches - first set of changes for locale and timezone settings
also includes fixes for
- name shadowing
- unused deprecated method "getClipRect" in classes extending Graphics2d
- HexDump - replaced intermediate String.format calls with custom padding
- convert testcases to junit4
- closing resources

also tested with an arbitary timezone (PST) and locale (ru)

supresses forbidden apis check for
- LocaleUtil (the only place where Locale.getDefault() and TimeZone.getDefault() should be called)
- Classes using FontMetrics - without the actual text it's difficult to return something sane

Some usage of UTC and Locale.ROOT might be still wrong, e.g. in MapiMessage we don't access the
extended mapi properties, which might contain the timezone

DataFormatter has now a Observable property which need to be observed when custom formats are used
and the Locale changes

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701688 13f79535-47bb-0310-9956-ffa450edef68
100 files changed:
build.xml
src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java
src/java/org/apache/poi/hssf/model/InternalWorkbook.java
src/java/org/apache/poi/hssf/usermodel/DVConstraint.java
src/java/org/apache/poi/hssf/usermodel/DummyGraphics2d.java
src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
src/java/org/apache/poi/hssf/usermodel/HSSFDataFormatter.java
src/java/org/apache/poi/poifs/filesystem/POIFSFileSystem.java
src/java/org/apache/poi/ss/format/CellDateFormatter.java
src/java/org/apache/poi/ss/format/CellFormatPart.java
src/java/org/apache/poi/ss/format/CellGeneralFormatter.java
src/java/org/apache/poi/ss/format/CellNumberFormatter.java
src/java/org/apache/poi/ss/formula/atp/DateParser.java
src/java/org/apache/poi/ss/formula/atp/WorkdayCalculator.java
src/java/org/apache/poi/ss/formula/atp/YearFracCalculator.java
src/java/org/apache/poi/ss/formula/function/FunctionDataBuilder.java
src/java/org/apache/poi/ss/formula/functions/DateFunc.java
src/java/org/apache/poi/ss/formula/functions/Days360.java
src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java
src/java/org/apache/poi/ss/formula/functions/EDate.java
src/java/org/apache/poi/ss/formula/functions/EOMonth.java
src/java/org/apache/poi/ss/formula/functions/TextFunction.java
src/java/org/apache/poi/ss/formula/functions/Today.java
src/java/org/apache/poi/ss/formula/functions/WeekNum.java
src/java/org/apache/poi/ss/usermodel/DataFormatter.java
src/java/org/apache/poi/ss/usermodel/DateUtil.java
src/java/org/apache/poi/ss/usermodel/ExcelStyleDateFormatter.java
src/java/org/apache/poi/util/FontMetricsDumper.java
src/java/org/apache/poi/util/HexDump.java
src/java/org/apache/poi/util/LocaleUtil.java [new file with mode: 0644]
src/java/org/apache/poi/util/SuppressForbidden.java [new file with mode: 0644]
src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/OOXMLSignatureFacet.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESSignatureFacet.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/facets/XAdESXLSignatureFacet.java
src/ooxml/java/org/apache/poi/xslf/util/PPTX2PNG.java
src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExportToXml.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCell.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCell.java
src/ooxml/testcases/org/apache/poi/TestPOIXMLProperties.java
src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackageCoreProperties.java
src/ooxml/testcases/org/apache/poi/ss/format/TestCellFormatPart.java
src/ooxml/testcases/org/apache/poi/ss/usermodel/BaseTestXCell.java
src/ooxml/testcases/org/apache/poi/xssf/streaming/TestSXSSFCell.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestUnfixedBugs.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFCell.java
src/resources/devtools/forbidden-signatures.txt [new file with mode: 0644]
src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java
src/scratchpad/src/org/apache/poi/hslf/model/PPGraphics2D.java
src/scratchpad/src/org/apache/poi/hslf/util/SystemTimeUtils.java
src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/MessageSubmissionChunk.java
src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertyValue.java
src/scratchpad/src/org/apache/poi/hsmf/dev/HSMFDump.java
src/scratchpad/src/org/apache/poi/hsmf/extractor/OutlookTextExtactor.java
src/scratchpad/src/org/apache/poi/hsmf/parsers/POIFSChunkParser.java
src/scratchpad/src/org/apache/poi/hwpf/model/PlexOfField.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/DateAndTime.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000.java
src/scratchpad/testcases/org/apache/poi/hslf/record/TestComment2000Atom.java
src/scratchpad/testcases/org/apache/poi/hslf/util/TestSystemTimeUtils.java
src/scratchpad/testcases/org/apache/poi/hsmf/AllHSMFTests.java
src/scratchpad/testcases/org/apache/poi/hsmf/TestFixedSizedProperties.java
src/scratchpad/testcases/org/apache/poi/hsmf/extractor/TestOutlookTextExtractor.java
src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java
src/testcases/org/apache/poi/hpsf/basic/TestWrite.java
src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java
src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java
src/testcases/org/apache/poi/hssf/usermodel/TestBugs.java
src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFCell.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormatter.java
src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDateUtil.java
src/testcases/org/apache/poi/hssf/usermodel/TestReadWriteChart.java
src/testcases/org/apache/poi/hssf/usermodel/TestText.java
src/testcases/org/apache/poi/ss/format/CellFormatTestBase.java
src/testcases/org/apache/poi/ss/format/TestCellFormat.java
src/testcases/org/apache/poi/ss/formula/atp/TestDateParser.java
src/testcases/org/apache/poi/ss/formula/atp/TestNetworkdaysFunction.java
src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayCalculator.java
src/testcases/org/apache/poi/ss/formula/atp/TestWorkdayFunction.java
src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculator.java
src/testcases/org/apache/poi/ss/formula/atp/TestYearFracCalculatorFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/eval/TestFormulasFromSpreadsheet.java
src/testcases/org/apache/poi/ss/formula/functions/TestDays360.java
src/testcases/org/apache/poi/ss/formula/functions/TestEDate.java
src/testcases/org/apache/poi/ss/formula/functions/TestEOMonth.java
src/testcases/org/apache/poi/ss/formula/functions/TestText.java
src/testcases/org/apache/poi/ss/formula/functions/TestTime.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestCell.java
src/testcases/org/apache/poi/ss/usermodel/BaseTestSheetAutosizeColumn.java
src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java
src/testcases/org/apache/poi/ss/usermodel/TestDateUtil.java
src/testcases/org/apache/poi/ss/util/TestDateFormatConverter.java
src/testcases/org/apache/poi/util/TestHexDump.java
src/testcases/org/apache/poi/util/TestStringUtil.java