aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2021-01-17 17:31:22 +0000
committerAndreas Beeker <kiwiwings@apache.org>2021-01-17 17:31:22 +0000
commit3778a3e9e24470499ebf0310a50848bdee266488 (patch)
treeb368867c2860cb3a3d173370575fd853c28c240f
parent8d0e84f2573db52a201e842fad51ed067d65cfb6 (diff)
downloadpoi-3778a3e9e24470499ebf0310a50848bdee266488.tar.gz
poi-3778a3e9e24470499ebf0310a50848bdee266488.zip
Sonar fixes
constant name to match the regular expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$' reorder "final static" -> "static final" git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885613 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/integrationtest/org/apache/poi/stress/TestAllFiles.java1
-rw-r--r--src/java/org/apache/poi/POIDocument.java12
-rw-r--r--src/java/org/apache/poi/ddf/EscherPropertyMetaData.java12
-rw-r--r--src/java/org/apache/poi/hpsf/CodePageString.java2
-rw-r--r--src/java/org/apache/poi/hpsf/VariantBool.java2
-rw-r--r--src/java/org/apache/poi/hpsf/VariantSupport.java4
-rw-r--r--src/java/org/apache/poi/hssf/dev/BiffViewer.java4
-rw-r--r--src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java27
-rw-r--r--src/java/org/apache/poi/hssf/extractor/OldExcelExtractor.java2
-rw-r--r--src/java/org/apache/poi/hssf/record/ArrayRecord.java2
-rw-r--r--src/java/org/apache/poi/hssf/record/CFRule12Record.java2
-rw-r--r--src/java/org/apache/poi/hssf/record/CFRuleBase.java2
-rw-r--r--src/java/org/apache/poi/hssf/record/DimensionsRecord.java4
-rw-r--r--src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java4
-rw-r--r--src/java/org/apache/poi/hssf/record/FeatRecord.java4
-rw-r--r--src/java/org/apache/poi/hssf/record/FormatRecord.java4
-rw-r--r--src/java/org/apache/poi/hssf/record/HyperlinkRecord.java4
-rw-r--r--src/java/org/apache/poi/hssf/record/LabelRecord.java4
-rw-r--r--src/java/org/apache/poi/hssf/record/OldLabelRecord.java4
-rw-r--r--src/java/org/apache/poi/hssf/record/SSTDeserializer.java6
-rw-r--r--src/java/org/apache/poi/hssf/record/SupBookRecord.java6
-rw-r--r--src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java6
-rw-r--r--src/java/org/apache/poi/hssf/record/common/ExtRst.java6
-rw-r--r--src/java/org/apache/poi/hssf/record/common/UnicodeString.java4
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java42
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java23
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFCell.java6
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFComment.java10
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFFont.java6
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java11
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFRow.java2
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFShape.java18
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java2
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFSimpleShape.java54
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFTextbox.java22
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java2
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/helpers/HSSFColumnShifter.java2
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowShifter.java2
-rw-r--r--src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java4
-rw-r--r--src/java/org/apache/poi/poifs/filesystem/FileMagic.java2
-rw-r--r--src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java6
-rw-r--r--src/java/org/apache/poi/poifs/property/PropertyTable.java17
-rw-r--r--src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java2
-rw-r--r--src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java2
-rw-r--r--src/java/org/apache/poi/sl/draw/geom/PresetParser.java2
-rw-r--r--src/java/org/apache/poi/ss/format/CellFormat.java51
-rw-r--r--src/java/org/apache/poi/ss/format/CellFormatPart.java24
-rw-r--r--src/java/org/apache/poi/ss/format/CellFormatter.java17
-rw-r--r--src/java/org/apache/poi/ss/formula/FormulaParser.java18
-rw-r--r--src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java12
-rw-r--r--src/java/org/apache/poi/ss/formula/functions/Dec2Bin.java6
-rw-r--r--src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java6
-rw-r--r--src/java/org/apache/poi/ss/formula/functions/Delta.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/functions/NumericFunction.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/AddPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/Area2DPtgBase.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/AreaErrPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/AreaNPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/AreaPtgBase.java6
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/AttrPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/ConcatPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/DeletedRef3DPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/DividePtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/EqualPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/ExpPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/FuncPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/FuncVarPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/GreaterEqualPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/GreaterThanPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/IntPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/IntersectionPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/LessEqualPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/LessThanPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/MemAreaPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/MemErrPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/MemFuncPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/MissingArgPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/MultiplyPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/NamePtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/NameXPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/NotEqualPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/NumberPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/OperationPtg.java6
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/ParenthesisPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/PercentPtg.java6
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/PowerPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/RangePtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/Ref2DPtgBase.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/Ref3DPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/RefErrorPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/RefNPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/RefPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/StringPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/SubtractPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/TblPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/UnaryMinusPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/UnaryPlusPtg.java4
-rw-r--r--src/java/org/apache/poi/ss/formula/ptg/UnionPtg.java2
-rw-r--r--src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java2
-rw-r--r--src/java/org/apache/poi/ss/usermodel/DataFormatter.java8
-rw-r--r--src/java/org/apache/poi/ss/usermodel/FillPatternType.java12
-rw-r--r--src/java/org/apache/poi/ss/usermodel/IndexedColors.java2
-rw-r--r--src/java/org/apache/poi/ss/usermodel/PatternFormatting.java38
-rw-r--r--src/java/org/apache/poi/ss/util/DateFormatConverter.java4
-rw-r--r--src/java/org/apache/poi/ss/util/ImageUtils.java8
-rw-r--r--src/java/org/apache/poi/util/Configurator.java4
-rw-r--r--src/java/org/apache/poi/util/IOUtils.java4
-rw-r--r--src/java/org/apache/poi/util/XMLHelper.java6
-rw-r--r--src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java6
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java18
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java9
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java12
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java6
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java10
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java4
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java2
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/PackagePropertiesMarshaller.java8
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java8
-rw-r--r--src/ooxml/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java4
-rw-r--r--src/ooxml/java/org/apache/poi/poifs/crypt/temp/SheetDataWriterWithDecorator.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/BlackWhiteMode.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/CompoundLine.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/LineCap.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndLength.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndType.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndWidth.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/PathShadeType.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/PenAlignment.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/PresetColor.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/PresetGeometry.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/PresetLineDash.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/PresetPattern.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/RectangleAlignment.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/SchemeColor.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/SystemColor.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/TileFlipMode.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrossBetween.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrosses.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisLabelAlignment.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisOrientation.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisPosition.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickLabelPosition.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickMark.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarDirection.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarGrouping.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/DisplayBlanks.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorBarType.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorDirection.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorValueType.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Grouping.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutMode.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutTarget.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LegendPosition.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/MarkerStyle.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/RadarStyle.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ScatterStyle.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Shape.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/text/AnchorType.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/text/AutonumberScheme.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/text/CapsType.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/text/FontAlignment.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/text/StrikeType.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/text/TabAlignment.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/text/TextAlignment.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xddf/usermodel/text/UnderlineType.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java42
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java40
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java30
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFPicture.java14
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java22
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java14
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java14
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFColumnShifter.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java6
-rw-r--r--src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestRelationships.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/sl/tests/draw/TestDrawPictureShape.java2
-rw-r--r--src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java5
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/streaming/TestAutoSizeColumnTracker.java4
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java6
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java10
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java14
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java20
-rw-r--r--src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java8
-rw-r--r--src/scratchpad/src/org/apache/poi/hdgf/dev/VSDDumper.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java12
-rw-r--r--src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusPen.java26
-rw-r--r--src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java22
-rw-r--r--src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java20
-rw-r--r--src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java20
-rw-r--r--src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java20
-rw-r--r--src/scratchpad/src/org/apache/poi/hpbf/model/QuillContents.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java8
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfo.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/Comment2000.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/Document.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/ExEmbed.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/ExHyperlink.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/ExMCIMovie.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/ExVideoContainer.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/FontCollection.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersContainer.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/InteractiveInfo.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/MasterTextPropAtom.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/Record.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/Sound.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/record/TextRulerAtom.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFNotes.java12
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java22
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java28
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java14
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java14
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java68
-rw-r--r--src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java20
-rw-r--r--src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java7
-rw-r--r--src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java7
-rw-r--r--src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmapDib.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hwmf/usermodel/HwmfPicture.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java9
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java19
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java7
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java7
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/converter/WordToTextConverter.java7
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/BookmarksTables.java5
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java23
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java61
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java5
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/OldFfn.java10
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/OldFontTable.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java19
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java10
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/PlfLfo.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java12
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java8
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java7
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/model/types/FFDataBaseAbstractType.java18
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java31
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java12
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java2
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java8
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmOperation.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java11
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java4
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java17
-rw-r--r--src/scratchpad/src/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java16
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestDataSamples.java7
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java3
-rw-r--r--src/testcases/org/apache/poi/hssf/record/TestPLVRecord.java6
-rw-r--r--src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java1
-rw-r--r--src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java2
-rw-r--r--src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java20
282 files changed, 1025 insertions, 1061 deletions
diff --git a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
index 8c6e7b98ef..0849f9d989 100644
--- a/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
+++ b/src/integrationtest/org/apache/poi/stress/TestAllFiles.java
@@ -93,7 +93,6 @@ public class TestAllFiles {
final List<Arguments> result = new ArrayList<>(100);
for (String file : scanner.getIncludedFiles()) {
- // if (!file.contains("44958.xls")) continue;
for (FileHandlerKnown handler : sm.getHandler(file)) {
ExcInfo info1 = sm.getExcInfo(file, testName, handler);
if (info1 == null || info1.isValid(testName, handler.name())) {
diff --git a/src/java/org/apache/poi/POIDocument.java b/src/java/org/apache/poi/POIDocument.java
index ecae9c2e0b..97521691de 100644
--- a/src/java/org/apache/poi/POIDocument.java
+++ b/src/java/org/apache/poi/POIDocument.java
@@ -60,7 +60,7 @@ public abstract class POIDocument implements Closeable {
private DirectoryNode directory;
/** For our own logging use */
- private static final POILogger logger = POILogFactory.getLogger(POIDocument.class);
+ private static final POILogger LOG = POILogFactory.getLogger(POIDocument.class);
/* Have the property streams been read yet? (Only done on-demand) */
private boolean initialized;
@@ -162,12 +162,12 @@ public abstract class POIDocument implements Closeable {
if (clazz.isInstance(ps)) {
return (T)ps;
} else if (ps != null) {
- logger.log(POILogger.WARN, localName+" property set came back with wrong class - "+ps.getClass().getName());
+ LOG.log(POILogger.WARN, localName+" property set came back with wrong class - "+ps.getClass().getName());
} else {
- logger.log(POILogger.WARN, localName+" property set came back as null");
+ LOG.log(POILogger.WARN, localName+" property set came back as null");
}
} catch (IOException e) {
- logger.log(POILogger.ERROR, "can't retrieve property set", e);
+ LOG.log(POILogger.ERROR, "can't retrieve property set", e);
}
return null;
}
@@ -333,9 +333,9 @@ public abstract class POIDocument implements Closeable {
// Create or Update the Property Set stream in the POIFS
outFS.createOrUpdateDocument(bIn, name);
- logger.log(POILogger.INFO, "Wrote property set ", name, " of size ", data.length);
+ LOG.log(POILogger.INFO, "Wrote property set ", name, " of size ", data.length);
} catch(WritingNotSupportedException ignored) {
- logger.log( POILogger.ERROR, "Couldn't write property set with name ", name, " as not supported by HPSF yet");
+ LOG.log( POILogger.ERROR, "Couldn't write property set with name ", name, " as not supported by HPSF yet");
}
}
diff --git a/src/java/org/apache/poi/ddf/EscherPropertyMetaData.java b/src/java/org/apache/poi/ddf/EscherPropertyMetaData.java
index b38e52df3e..99f5f6cb34 100644
--- a/src/java/org/apache/poi/ddf/EscherPropertyMetaData.java
+++ b/src/java/org/apache/poi/ddf/EscherPropertyMetaData.java
@@ -26,12 +26,12 @@ package org.apache.poi.ddf;
public class EscherPropertyMetaData
{
// Escher property types.
- public final static byte TYPE_UNKNOWN = (byte) 0;
- public final static byte TYPE_BOOLEAN = (byte) 1;
- public final static byte TYPE_RGB = (byte) 2;
- public final static byte TYPE_SHAPEPATH = (byte) 3;
- public final static byte TYPE_SIMPLE = (byte)4;
- public final static byte TYPE_ARRAY = (byte)5;
+ public static final byte TYPE_UNKNOWN = (byte) 0;
+ public static final byte TYPE_BOOLEAN = (byte) 1;
+ public static final byte TYPE_RGB = (byte) 2;
+ public static final byte TYPE_SHAPEPATH = (byte) 3;
+ public static final byte TYPE_SIMPLE = (byte)4;
+ public static final byte TYPE_ARRAY = (byte)5;
private String description;
private byte type;
diff --git a/src/java/org/apache/poi/hpsf/CodePageString.java b/src/java/org/apache/poi/hpsf/CodePageString.java
index 5b5406b738..7cd6b5a9d7 100644
--- a/src/java/org/apache/poi/hpsf/CodePageString.java
+++ b/src/java/org/apache/poi/hpsf/CodePageString.java
@@ -34,7 +34,7 @@ public class CodePageString {
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
- private final static POILogger LOG = POILogFactory.getLogger( CodePageString.class );
+ private static final POILogger LOG = POILogFactory.getLogger( CodePageString.class );
private byte[] _value;
diff --git a/src/java/org/apache/poi/hpsf/VariantBool.java b/src/java/org/apache/poi/hpsf/VariantBool.java
index bfdeead64c..dc8659483e 100644
--- a/src/java/org/apache/poi/hpsf/VariantBool.java
+++ b/src/java/org/apache/poi/hpsf/VariantBool.java
@@ -23,7 +23,7 @@ import org.apache.poi.util.POILogger;
@Internal
public class VariantBool {
- private final static POILogger LOG = POILogFactory.getLogger( VariantBool.class );
+ private static final POILogger LOG = POILogFactory.getLogger( VariantBool.class );
static final int SIZE = 2;
diff --git a/src/java/org/apache/poi/hpsf/VariantSupport.java b/src/java/org/apache/poi/hpsf/VariantSupport.java
index ed57f41967..4fd4a7e75d 100644
--- a/src/java/org/apache/poi/hpsf/VariantSupport.java
+++ b/src/java/org/apache/poi/hpsf/VariantSupport.java
@@ -58,7 +58,7 @@ public class VariantSupport extends Variant {
Variant.VT_CF, Variant.VT_BOOL };
- private static final POILogger logger = POILogFactory.getLogger(VariantSupport.class);
+ private static final POILogger LOG = POILogFactory.getLogger(VariantSupport.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
@@ -114,7 +114,7 @@ public class VariantSupport extends Variant {
Long vt = Long.valueOf(ex.getVariantType());
if (!unsupportedMessage.contains(vt))
{
- logger.log( POILogger.ERROR, ex.getMessage());
+ LOG.log( POILogger.ERROR, ex.getMessage());
unsupportedMessage.add(vt);
}
}
diff --git a/src/java/org/apache/poi/hssf/dev/BiffViewer.java b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
index 49e06dd738..998df2fa7b 100644
--- a/src/java/org/apache/poi/hssf/dev/BiffViewer.java
+++ b/src/java/org/apache/poi/hssf/dev/BiffViewer.java
@@ -57,7 +57,7 @@ import org.apache.poi.util.SuppressForbidden;
*/
public final class BiffViewer {
private static final char[] NEW_LINE_CHARS = System.getProperty("line.separator").toCharArray();
- private static final POILogger logger = POILogFactory.getLogger(BiffViewer.class);
+ private static final POILogger LOG = POILogFactory.getLogger(BiffViewer.class);
private BiffViewer() {
// no instances of this class
@@ -81,7 +81,7 @@ public final class BiffViewer {
try {
hasNext = recStream.hasNextRecord();
} catch (LeftoverDataException e) {
- logger.log(POILogger.ERROR, "Discarding ", recStream.remaining(), " bytes and continuing", e);
+ LOG.log(POILogger.ERROR, "Discarding ", recStream.remaining(), " bytes and continuing", e);
recStream.readRemainder();
hasNext = recStream.hasNextRecord();
}
diff --git a/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java b/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java
index 6cc4b2edd4..16c7bdfb1a 100644
--- a/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java
+++ b/src/java/org/apache/poi/hssf/eventusermodel/FormatTrackingHSSFListener.java
@@ -28,7 +28,6 @@ import org.apache.poi.hssf.record.ExtendedFormatRecord;
import org.apache.poi.hssf.record.FormatRecord;
import org.apache.poi.hssf.record.FormulaRecord;
import org.apache.poi.hssf.record.NumberRecord;
-import org.apache.poi.hssf.record.Record;
import org.apache.poi.hssf.usermodel.HSSFDataFormat;
import org.apache.poi.hssf.usermodel.HSSFDataFormatter;
import org.apache.poi.util.LocaleUtil;
@@ -41,7 +40,7 @@ import org.apache.poi.util.POILogger;
* ids.
*/
public class FormatTrackingHSSFListener implements HSSFListener {
- private final static POILogger logger = POILogFactory.getLogger(FormatTrackingHSSFListener.class);
+ private static final POILogger LOG = POILogFactory.getLogger(FormatTrackingHSSFListener.class);
private final HSSFListener _childListener;
private final HSSFDataFormatter _formatter;
private final NumberFormat _defaultFormat;
@@ -51,7 +50,7 @@ public class FormatTrackingHSSFListener implements HSSFListener {
/**
* Creates a format tracking wrapper around the given listener, using
* the {@link Locale#getDefault() default locale} for the formats.
- *
+ *
* @param childListener the listener to be wrapped
*/
public FormatTrackingHSSFListener(HSSFListener childListener) {
@@ -61,7 +60,7 @@ public class FormatTrackingHSSFListener implements HSSFListener {
/**
* Creates a format tracking wrapper around the given listener, using
* the given locale for the formats.
- *
+ *
* @param childListener the listener to be wrapped
* @param locale the locale for the formats
*/
@@ -116,9 +115,9 @@ public class FormatTrackingHSSFListener implements HSSFListener {
*
* TODO - move this to a central class in such a way that hssf.usermodel can
* make use of it too
- *
+ *
* @param cell the cell
- *
+ *
* @return the given numeric of date cells contents as a String
*/
public String formatNumberDateCell(CellValueRecordInterface cell) {
@@ -145,9 +144,9 @@ public class FormatTrackingHSSFListener implements HSSFListener {
/**
* Returns the format string, eg $##.##, for the given number format index.
- *
+ *
* @param formatIndex the format index
- *
+ *
* @return the format string
*/
public String getFormatString(int formatIndex) {
@@ -155,7 +154,7 @@ public class FormatTrackingHSSFListener implements HSSFListener {
if (formatIndex >= HSSFDataFormat.getNumberOfBuiltinBuiltinFormats()) {
FormatRecord tfr = _customFormatRecords.get(Integer.valueOf(formatIndex));
if (tfr == null) {
- logger.log( POILogger.ERROR, "Requested format at index ", formatIndex,
+ LOG.log( POILogger.ERROR, "Requested format at index ", formatIndex,
", but it wasn't found");
} else {
format = tfr.getFormatString();
@@ -168,9 +167,9 @@ public class FormatTrackingHSSFListener implements HSSFListener {
/**
* Returns the format string, eg $##.##, used by your cell
- *
+ *
* @param cell the cell
- *
+ *
* @return the format string
*/
public String getFormatString(CellValueRecordInterface cell) {
@@ -184,15 +183,15 @@ public class FormatTrackingHSSFListener implements HSSFListener {
/**
* Returns the index of the format string, used by your cell, or -1 if none found
- *
+ *
* @param cell the cell
- *
+ *
* @return the index of the format string
*/
public int getFormatIndex(CellValueRecordInterface cell) {
ExtendedFormatRecord xfr = _xfRecords.get(cell.getXFIndex());
if (xfr == null) {
- logger.log( POILogger.ERROR, "Cell ", cell.getRow(), ",", cell.getColumn(),
+ LOG.log( POILogger.ERROR, "Cell ", cell.getRow(), ",", cell.getColumn(),
" uses XF with index ", cell.getXFIndex(), ", but we don't have that");
return -1;
}
diff --git a/src/java/org/apache/poi/hssf/extractor/OldExcelExtractor.java b/src/java/org/apache/poi/hssf/extractor/OldExcelExtractor.java
index c93482f901..e6a55f88ff 100644
--- a/src/java/org/apache/poi/hssf/extractor/OldExcelExtractor.java
+++ b/src/java/org/apache/poi/hssf/extractor/OldExcelExtractor.java
@@ -61,7 +61,7 @@ import org.apache.poi.util.IOUtils;
*/
public class OldExcelExtractor implements POITextExtractor {
- private final static int FILE_PASS_RECORD_SID = 0x2f;
+ private static final int FILE_PASS_RECORD_SID = 0x2f;
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
diff --git a/src/java/org/apache/poi/hssf/record/ArrayRecord.java b/src/java/org/apache/poi/hssf/record/ArrayRecord.java
index 3ea1c82939..b3e2d7f234 100644
--- a/src/java/org/apache/poi/hssf/record/ArrayRecord.java
+++ b/src/java/org/apache/poi/hssf/record/ArrayRecord.java
@@ -33,7 +33,7 @@ import org.apache.poi.util.LittleEndianOutput;
*/
public final class ArrayRecord extends SharedValueRecordBase {
- public final static short sid = 0x0221;
+ public static final short sid = 0x0221;
private static final int OPT_ALWAYS_RECALCULATE = 0x0001;
private static final int OPT_CALCULATE_ON_OPEN = 0x0002;
diff --git a/src/java/org/apache/poi/hssf/record/CFRule12Record.java b/src/java/org/apache/poi/hssf/record/CFRule12Record.java
index e98cfce142..3106ded014 100644
--- a/src/java/org/apache/poi/hssf/record/CFRule12Record.java
+++ b/src/java/org/apache/poi/hssf/record/CFRule12Record.java
@@ -285,7 +285,7 @@ public final class CFRule12Record extends CFRuleBase implements FutureRecord {
template_params = IOUtils.safelyAllocate(template_param_length, MAX_RECORD_LENGTH);
in.readFully(template_params);
} else {
- logger.log(POILogger.WARN, "CF Rule v12 template params length should be 0 or 16, found " + template_param_length);
+ LOG.log(POILogger.WARN, "CF Rule v12 template params length should be 0 or 16, found " + template_param_length);
in.readRemainder();
}
diff --git a/src/java/org/apache/poi/hssf/record/CFRuleBase.java b/src/java/org/apache/poi/hssf/record/CFRuleBase.java
index 052251e434..71f52a0105 100644
--- a/src/java/org/apache/poi/hssf/record/CFRuleBase.java
+++ b/src/java/org/apache/poi/hssf/record/CFRuleBase.java
@@ -95,7 +95,7 @@ public abstract class CFRuleBase extends StandardRecord {
public static final int TEMPLATE_ABOVE_OR_EQUAL_TO_AVERAGE = 0x001D;
public static final int TEMPLATE_BELOW_OR_EQUAL_TO_AVERAGE = 0x001E;
- protected static final POILogger logger = POILogFactory.getLogger(CFRuleBase.class);
+ protected static final POILogger LOG = POILogFactory.getLogger(CFRuleBase.class);
static final BitField modificationBits = bf(0x003FFFFF); // Bits: font,align,bord,patt,prot
static final BitField alignHor = bf(0x00000001); // 0 = Horizontal alignment modified
diff --git a/src/java/org/apache/poi/hssf/record/DimensionsRecord.java b/src/java/org/apache/poi/hssf/record/DimensionsRecord.java
index 7fd6ce9807..6f64b613e4 100644
--- a/src/java/org/apache/poi/hssf/record/DimensionsRecord.java
+++ b/src/java/org/apache/poi/hssf/record/DimensionsRecord.java
@@ -35,7 +35,7 @@ import org.apache.poi.util.POILogger;
public final class DimensionsRecord extends StandardRecord {
- private static final POILogger logger = POILogFactory.getLogger(DimensionsRecord.class);
+ private static final POILogger LOG = POILogFactory.getLogger(DimensionsRecord.class);
public static final short sid = 0x200;
private int field_1_first_row;
@@ -63,7 +63,7 @@ public final class DimensionsRecord extends StandardRecord {
field_5_zero = in.readShort();
//POI-61045 -- in practice, there can be an extra 2 bytes
if (in.available() == 2) {
- logger.log(POILogger.INFO, "DimensionsRecord has extra 2 bytes.");
+ LOG.log(POILogger.INFO, "DimensionsRecord has extra 2 bytes.");
in.readShort();
}
}
diff --git a/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java b/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java
index 94b62bacb9..bffc37d6c1 100644
--- a/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java
+++ b/src/java/org/apache/poi/hssf/record/EmbeddedObjectRefSubRecord.java
@@ -43,7 +43,7 @@ import org.apache.poi.util.StringUtil;
* stored in a separate entry within the OLE2 compound file.
*/
public final class EmbeddedObjectRefSubRecord extends SubRecord {
- private static POILogger logger = POILogFactory.getLogger(EmbeddedObjectRefSubRecord.class);
+ private static final POILogger LOG = POILogFactory.getLogger(EmbeddedObjectRefSubRecord.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
@@ -157,7 +157,7 @@ public final class EmbeddedObjectRefSubRecord extends SubRecord {
int nUnexpectedPadding = remaining - dataLenAfterFormula;
if (nUnexpectedPadding > 0) {
- logger.log( POILogger.ERROR, "Discarding ", nUnexpectedPadding, " unexpected padding bytes");
+ LOG.log( POILogger.ERROR, "Discarding ", nUnexpectedPadding, " unexpected padding bytes");
readRawData(in, nUnexpectedPadding);
remaining-=nUnexpectedPadding;
}
diff --git a/src/java/org/apache/poi/hssf/record/FeatRecord.java b/src/java/org/apache/poi/hssf/record/FeatRecord.java
index 6ca4a941a4..22a3e8988d 100644
--- a/src/java/org/apache/poi/hssf/record/FeatRecord.java
+++ b/src/java/org/apache/poi/hssf/record/FeatRecord.java
@@ -39,7 +39,7 @@ import org.apache.poi.util.POILogger;
* up with a {@link FeatHdrRecord}.
*/
public final class FeatRecord extends StandardRecord {
- private static final POILogger logger = POILogFactory.getLogger(FeatRecord.class);
+ private static final POILogger LOG = POILogFactory.getLogger(FeatRecord.class);
public static final short sid = 0x0868;
// SIDs from newer versions
public static final short v11_sid = 0x0872;
@@ -108,7 +108,7 @@ public final class FeatRecord extends StandardRecord {
sharedFeature = new FeatSmartTag(in);
break;
default:
- logger.log( POILogger.ERROR, "Unknown Shared Feature ", isf_sharedFeatureType, " found!");
+ LOG.log( POILogger.ERROR, "Unknown Shared Feature ", isf_sharedFeatureType, " found!");
}
}
diff --git a/src/java/org/apache/poi/hssf/record/FormatRecord.java b/src/java/org/apache/poi/hssf/record/FormatRecord.java
index a08268d32c..24063ff93d 100644
--- a/src/java/org/apache/poi/hssf/record/FormatRecord.java
+++ b/src/java/org/apache/poi/hssf/record/FormatRecord.java
@@ -33,7 +33,7 @@ import org.apache.poi.util.StringUtil;
*/
public final class FormatRecord extends StandardRecord {
- private static final POILogger logger = POILogFactory.getLogger(FormatRecord.class);
+ private static final POILogger LOG = POILogFactory.getLogger(FormatRecord.class);
public static final short sid = 0x041E;
@@ -149,7 +149,7 @@ public final class FormatRecord extends StandardRecord {
}
if (ris.available() > 0) {
- logger.log(POILogger.INFO, "FormatRecord has ", ris.available(), " unexplained bytes. Silently skipping");
+ LOG.log(POILogger.INFO, "FormatRecord has ", ris.available(), " unexplained bytes. Silently skipping");
//swallow what's left
while (ris.available() > 0) {
ris.readByte();
diff --git a/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java b/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
index 7130aef0ab..1c24d0023a 100644
--- a/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
+++ b/src/java/org/apache/poi/hssf/record/HyperlinkRecord.java
@@ -45,7 +45,7 @@ import org.apache.poi.util.StringUtil;
*/
public final class HyperlinkRecord extends StandardRecord {
public static final short sid = 0x01B8;
- private static final POILogger logger = POILogFactory.getLogger(HyperlinkRecord.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HyperlinkRecord.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
@@ -403,7 +403,7 @@ public final class HyperlinkRecord extends StandardRecord {
}
if (in.remaining() > 0) {
- logger.log(POILogger.WARN,
+ LOG.log(POILogger.WARN,
"Hyperlink data remains: " + in.remaining() +
" : " +HexDump.toHex(in.readRemainder())
);
diff --git a/src/java/org/apache/poi/hssf/record/LabelRecord.java b/src/java/org/apache/poi/hssf/record/LabelRecord.java
index ea20181220..f3ac972d09 100644
--- a/src/java/org/apache/poi/hssf/record/LabelRecord.java
+++ b/src/java/org/apache/poi/hssf/record/LabelRecord.java
@@ -33,7 +33,7 @@ import org.apache.poi.util.RecordFormatException;
* @see org.apache.poi.hssf.record.LabelSSTRecord
*/
public final class LabelRecord extends Record implements CellValueRecordInterface {
- private static final POILogger logger = POILogFactory.getLogger(LabelRecord.class);
+ private static final POILogger LOG = POILogFactory.getLogger(LabelRecord.class);
public static final short sid = 0x0204;
@@ -77,7 +77,7 @@ public final class LabelRecord extends Record implements CellValueRecordInterfac
}
if (in.remaining() > 0) {
- logger.log(POILogger.INFO,
+ LOG.log(POILogger.INFO,
"LabelRecord data remains: ", in.remaining(),
" : ", HexDump.toHex(in.readRemainder())
);
diff --git a/src/java/org/apache/poi/hssf/record/OldLabelRecord.java b/src/java/org/apache/poi/hssf/record/OldLabelRecord.java
index dc3822c3e1..dd59ca258f 100644
--- a/src/java/org/apache/poi/hssf/record/OldLabelRecord.java
+++ b/src/java/org/apache/poi/hssf/record/OldLabelRecord.java
@@ -33,7 +33,7 @@ import org.apache.poi.util.RecordFormatException;
* didn't use {@link LabelSSTRecord}
*/
public final class OldLabelRecord extends OldCellRecord {
- private static final POILogger logger = POILogFactory.getLogger(OldLabelRecord.class);
+ private static final POILogger LOG = POILogFactory.getLogger(OldLabelRecord.class);
//arbitrarily set, may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
@@ -62,7 +62,7 @@ public final class OldLabelRecord extends OldCellRecord {
in.read(field_5_bytes, 0, field_4_string_len);
if (in.remaining() > 0) {
- logger.log(POILogger.INFO,
+ LOG.log(POILogger.INFO,
"LabelRecord data remains: ", in.remaining(),
" : ", HexDump.toHex(in.readRemainder())
);
diff --git a/src/java/org/apache/poi/hssf/record/SSTDeserializer.java b/src/java/org/apache/poi/hssf/record/SSTDeserializer.java
index 1fafa37566..bcd6452c25 100644
--- a/src/java/org/apache/poi/hssf/record/SSTDeserializer.java
+++ b/src/java/org/apache/poi/hssf/record/SSTDeserializer.java
@@ -15,7 +15,7 @@
See the License for the specific language governing permissions and
limitations under the License.
==================================================================== */
-
+
package org.apache.poi.hssf.record;
@@ -32,7 +32,7 @@ import org.apache.poi.util.POILogger;
*/
class SSTDeserializer
{
- private static POILogger logger = POILogFactory.getLogger(SSTDeserializer.class);
+ private static final POILogger LOG = POILogFactory.getLogger(SSTDeserializer.class);
private IntMapper<UnicodeString> strings;
public SSTDeserializer( IntMapper<UnicodeString> strings )
@@ -51,7 +51,7 @@ class SSTDeserializer
// Extract exactly the count of strings from the SST record.
UnicodeString str;
if (in.available() == 0 && !in.hasNextRecord()) {
- logger.log(POILogger.ERROR, "Ran out of data before creating all the strings! String at index ", i);
+ LOG.log(POILogger.ERROR, "Ran out of data before creating all the strings! String at index ", i);
str = new UnicodeString("");
} else {
str = new UnicodeString(in);
diff --git a/src/java/org/apache/poi/hssf/record/SupBookRecord.java b/src/java/org/apache/poi/hssf/record/SupBookRecord.java
index fd98ec88be..c9ff27f93e 100644
--- a/src/java/org/apache/poi/hssf/record/SupBookRecord.java
+++ b/src/java/org/apache/poi/hssf/record/SupBookRecord.java
@@ -32,7 +32,7 @@ import org.apache.poi.util.StringUtil;
*/
public final class SupBookRecord extends StandardRecord {
- private static final POILogger logger = POILogFactory.getLogger(SupBookRecord.class);
+ private static final POILogger LOG = POILogFactory.getLogger(SupBookRecord.class);
public static final short sid = 0x01AE;
@@ -222,12 +222,12 @@ public final class SupBookRecord extends StandardRecord {
break;
case CH_LONG_VOLUME:
//Don't known to handle...
- logger.log(POILogger.WARN, "Found unexpected key: ChLongVolume - IGNORING");
+ LOG.log(POILogger.WARN, "Found unexpected key: ChLongVolume - IGNORING");
break;
case CH_STARTUP_DIR:
case CH_ALT_STARTUP_DIR:
case CH_LIB_DIR:
- logger.log(POILogger.WARN, "EXCEL.EXE path unkown - using this directoy instead: .");
+ LOG.log(POILogger.WARN, "EXCEL.EXE path unkown - using this directoy instead: .");
sb.append(".").append(PATH_SEPERATOR);
break;
default:
diff --git a/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java b/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java
index 42b9ada2e4..4ee339ae10 100644
--- a/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java
+++ b/src/java/org/apache/poi/hssf/record/aggregates/CFRecordsAggregate.java
@@ -52,7 +52,7 @@ import org.apache.poi.util.RecordFormatException;
public final class CFRecordsAggregate extends RecordAggregate implements GenericRecord {
/** Excel 97-2003 allows up to 3 conditional formating rules */
private static final int MAX_97_2003_CONDTIONAL_FORMAT_RULES = 3;
- private static final POILogger logger = POILogFactory.getLogger(CFRecordsAggregate.class);
+ private static final POILogger LOG = POILogFactory.getLogger(CFRecordsAggregate.class);
private final CFHeaderBase header;
@@ -72,7 +72,7 @@ public final class CFRecordsAggregate extends RecordAggregate implements Generic
throw new IllegalArgumentException("rules must not be null");
}
if(pRules.length > MAX_97_2003_CONDTIONAL_FORMAT_RULES) {
- logger.log(POILogger.WARN, "Excel versions before 2007 require that "
+ LOG.log(POILogger.WARN, "Excel versions before 2007 require that "
+ "No more than " + MAX_97_2003_CONDTIONAL_FORMAT_RULES
+ " rules may be specified, " + pRules.length + " were found,"
+ " this file will cause problems with old Excel versions");
@@ -181,7 +181,7 @@ public final class CFRecordsAggregate extends RecordAggregate implements Generic
throw new IllegalArgumentException("r must not be null");
}
if(rules.size() >= MAX_97_2003_CONDTIONAL_FORMAT_RULES) {
- logger.log(POILogger.WARN, "Excel versions before 2007 cannot cope with"
+ LOG.log(POILogger.WARN, "Excel versions before 2007 cannot cope with"
+ " any more than " + MAX_97_2003_CONDTIONAL_FORMAT_RULES
+ " - this file will cause problems with old Excel versions");
}
diff --git a/src/java/org/apache/poi/hssf/record/common/ExtRst.java b/src/java/org/apache/poi/hssf/record/common/ExtRst.java
index 17df9df3f4..1d8101b451 100644
--- a/src/java/org/apache/poi/hssf/record/common/ExtRst.java
+++ b/src/java/org/apache/poi/hssf/record/common/ExtRst.java
@@ -34,7 +34,7 @@ import org.apache.poi.util.StringUtil;
@Internal
public class ExtRst implements Comparable<ExtRst>, GenericRecord {
- private static final POILogger _logger = POILogFactory.getLogger(ExtRst.class);
+ private static final POILogger LOG = POILogFactory.getLogger(ExtRst.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
@@ -78,7 +78,7 @@ public class ExtRst implements Comparable<ExtRst>, GenericRecord {
// Spot corrupt records
if(reserved != 1) {
- _logger.log(POILogger.WARN, "Warning - ExtRst has wrong magic marker, expecting 1 but found ", reserved, " - ignoring");
+ LOG.log(POILogger.WARN, "Warning - ExtRst has wrong magic marker, expecting 1 but found ", reserved, " - ignoring");
// Grab all the remaining data, and ignore it
for(int i=0; i<expectedLength-2; i++) {
in.readByte();
@@ -121,7 +121,7 @@ public class ExtRst implements Comparable<ExtRst>, GenericRecord {
int extraDataLength = runData - (numRuns*6);
if(extraDataLength < 0) {
- _logger.log( POILogger.WARN, "Warning - ExtRst overran by ", (0-extraDataLength), " bytes");
+ LOG.log( POILogger.WARN, "Warning - ExtRst overran by ", (0-extraDataLength), " bytes");
extraDataLength = 0;
}
extraData = IOUtils.safelyAllocate(extraDataLength, MAX_RECORD_LENGTH);
diff --git a/src/java/org/apache/poi/hssf/record/common/UnicodeString.java b/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
index 5dfb91ae3f..d6afa2a9ca 100644
--- a/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
+++ b/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
@@ -43,7 +43,7 @@ import org.apache.poi.util.POILogger;
* This is often called a XLUnicodeRichExtendedString in MS documentation.<p>
*/
public class UnicodeString implements Comparable<UnicodeString>, Duplicatable, GenericRecord {
- private static final POILogger _logger = POILogFactory.getLogger(UnicodeString.class);
+ private static final POILogger LOG = POILogFactory.getLogger(UnicodeString.class);
private static final BitField highByte = BitFieldFactory.getInstance(0x1);
// 0x2 is reserved
@@ -102,7 +102,7 @@ public class UnicodeString implements Comparable<UnicodeString>, Duplicatable, G
if (isExtendedText() && (extensionLength > 0)) {
field_5_ext_rst = new ExtRst(new ContinuableRecordInput(in), extensionLength);
if(field_5_ext_rst.getDataSize()+4 != extensionLength) {
- _logger.log(POILogger.WARN, "ExtRst was supposed to be " + extensionLength + " bytes long, but seems to actually be " + (field_5_ext_rst.getDataSize() + 4));
+ LOG.log(POILogger.WARN, "ExtRst was supposed to be " + extensionLength + " bytes long, but seems to actually be " + (field_5_ext_rst.getDataSize() + 4));
}
}
}
diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
index 6f0f26586c..fb58e04429 100644
--- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
+++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics.java
@@ -59,8 +59,9 @@ import java.text.AttributedCharacterIterator;
* <code>HSSFClientAnchor.getAnchorHeightInPoints()</code>.
* </blockquote>
*/
-public class EscherGraphics extends Graphics
-{
+public class EscherGraphics extends Graphics {
+ private static final POILogger LOG = POILogFactory.getLogger(EscherGraphics.class);
+
private final HSSFShapeGroup escherGroup;
private final HSSFWorkbook workbook;
private float verticalPointsPerPixel = 1.0f;
@@ -68,7 +69,6 @@ public class EscherGraphics extends Graphics
private Color foreground;
private Color background = Color.white;
private Font font;
- private static final POILogger logger = POILogFactory.getLogger(EscherGraphics.class);
/**
* Construct an escher graphics object.
@@ -135,14 +135,14 @@ public class EscherGraphics extends Graphics
@NotImplemented
public void clipRect(int x, int y, int width, int height)
{
- logger.log(POILogger.WARN,"clipRect not supported");
+ LOG.log(POILogger.WARN,"clipRect not supported");
}
@Override
@NotImplemented
public void copyArea(int x, int y, int width, int height, int dx, int dy)
{
- logger.log(POILogger.WARN,"copyArea not supported");
+ LOG.log(POILogger.WARN,"copyArea not supported");
}
@Override
@@ -162,7 +162,7 @@ public class EscherGraphics extends Graphics
public void drawArc(int x, int y, int width, int height,
int startAngle, int arcAngle)
{
- logger.log(POILogger.WARN,"drawArc not supported");
+ LOG.log(POILogger.WARN,"drawArc not supported");
}
@Override
@@ -173,7 +173,7 @@ public class EscherGraphics extends Graphics
Color bgcolor,
ImageObserver observer)
{
- logger.log(POILogger.WARN,"drawImage not supported");
+ LOG.log(POILogger.WARN,"drawImage not supported");
return true;
}
@@ -185,7 +185,7 @@ public class EscherGraphics extends Graphics
int sx1, int sy1, int sx2, int sy2,
ImageObserver observer)
{
- logger.log(POILogger.WARN,"drawImage not supported");
+ LOG.log(POILogger.WARN,"drawImage not supported");
return true;
}
@@ -266,14 +266,14 @@ public class EscherGraphics extends Graphics
public void drawPolyline(int[] xPoints, int[] yPoints,
int nPoints)
{
- logger.log(POILogger.WARN,"drawPolyline not supported");
+ LOG.log(POILogger.WARN,"drawPolyline not supported");
}
@Override
@NotImplemented
public void drawRect(int x, int y, int width, int height)
{
- logger.log(POILogger.WARN,"drawRect not supported");
+ LOG.log(POILogger.WARN,"drawRect not supported");
}
@Override
@@ -281,7 +281,7 @@ public class EscherGraphics extends Graphics
public void drawRoundRect(int x, int y, int width, int height,
int arcWidth, int arcHeight)
{
- logger.log(POILogger.WARN,"drawRoundRect not supported");
+ LOG.log(POILogger.WARN,"drawRoundRect not supported");
}
@Override
@@ -349,16 +349,16 @@ public class EscherGraphics extends Graphics
public void drawString(AttributedCharacterIterator iterator,
int x, int y)
{
- if (logger.check( POILogger.WARN ))
- logger.log(POILogger.WARN,"drawString not supported");
+ if (LOG.check( POILogger.WARN ))
+ LOG.log(POILogger.WARN,"drawString not supported");
}
@Override
public void fillArc(int x, int y, int width, int height,
int startAngle, int arcAngle)
{
- if (logger.check( POILogger.WARN ))
- logger.log(POILogger.WARN,"fillArc not supported");
+ if (LOG.check( POILogger.WARN ))
+ LOG.log(POILogger.WARN,"fillArc not supported");
}
@Override
@@ -442,8 +442,8 @@ public class EscherGraphics extends Graphics
public void fillRoundRect(int x, int y, int width, int height,
int arcWidth, int arcHeight)
{
- if (logger.check( POILogger.WARN ))
- logger.log(POILogger.WARN,"fillRoundRect not supported");
+ if (LOG.check( POILogger.WARN ))
+ LOG.log(POILogger.WARN,"fillRoundRect not supported");
}
@Override
@@ -488,7 +488,7 @@ public class EscherGraphics extends Graphics
@NotImplemented
public void setClip(Shape shape)
{
- logger.log(POILogger.WARN,"setClip not supported");
+ LOG.log(POILogger.WARN,"setClip not supported");
}
@Override
@@ -507,21 +507,21 @@ public class EscherGraphics extends Graphics
@NotImplemented
public void setPaintMode()
{
- logger.log(POILogger.WARN,"setPaintMode not supported");
+ LOG.log(POILogger.WARN,"setPaintMode not supported");
}
@Override
@NotImplemented
public void setXORMode(Color color)
{
- logger.log(POILogger.WARN,"setXORMode not supported");
+ LOG.log(POILogger.WARN,"setXORMode not supported");
}
@Override
@NotImplemented
public void translate(int x, int y)
{
- logger.log(POILogger.WARN,"translate not supported");
+ LOG.log(POILogger.WARN,"translate not supported");
}
public Color getBackground()
diff --git a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
index fe6770c4f1..6d631efb1f 100644
--- a/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
+++ b/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
@@ -69,13 +69,14 @@ import java.util.Map;
* </blockquote>
*/
public final class EscherGraphics2d extends Graphics2D {
+ private static final POILogger LOG = POILogFactory.getLogger(EscherGraphics2d.class);
+
private EscherGraphics _escherGraphics;
private BufferedImage _img;
private AffineTransform _trans;
private Stroke _stroke;
private Paint _paint;
private Shape _deviceclip;
- private POILogger logger = POILogFactory.getLogger(getClass());
/**
* Constructs one escher graphics object from an escher graphics object.
@@ -152,8 +153,8 @@ public final class EscherGraphics2d extends Graphics2D {
}
else
{
- if (logger.check(POILogger.WARN))
- logger.log(POILogger.WARN, "draw not fully supported");
+ if (LOG.check(POILogger.WARN))
+ LOG.log(POILogger.WARN, "draw not fully supported");
}
}
@@ -171,22 +172,22 @@ public final class EscherGraphics2d extends Graphics2D {
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1,
int sx2, int sy2, Color bgColor, ImageObserver imageobserver)
{
- if (logger.check( POILogger.WARN ))
- logger.log(POILogger.WARN,"drawImage() not supported");
+ if (LOG.check( POILogger.WARN ))
+ LOG.log(POILogger.WARN,"drawImage() not supported");
return true;
}
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1,
int sx2, int sy2, ImageObserver imageobserver)
{
- if (logger.check( POILogger.WARN ))
- logger.log(POILogger.WARN,"drawImage() not supported");
+ if (LOG.check( POILogger.WARN ))
+ LOG.log(POILogger.WARN,"drawImage() not supported");
return drawImage(image, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null, imageobserver);
}
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2, Color bgColor, ImageObserver imageobserver)
{
- if (logger.check( POILogger.WARN ))
- logger.log(POILogger.WARN,"drawImage() not supported");
+ if (LOG.check( POILogger.WARN ))
+ LOG.log(POILogger.WARN,"drawImage() not supported");
return true;
}
@@ -310,8 +311,8 @@ public final class EscherGraphics2d extends Graphics2D {
public void fill(Shape shape)
{
- if (logger.check( POILogger.WARN ))
- logger.log(POILogger.WARN,"fill(Shape) not supported");
+ if (LOG.check( POILogger.WARN ))
+ LOG.log(POILogger.WARN,"fill(Shape) not supported");
}
public void fillArc(int i, int j, int k, int l, int i1, int j1)
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
index a29179ad23..a48313176a 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java
@@ -78,9 +78,9 @@ public class HSSFCell extends CellBase {
public static final int LAST_COLUMN_NUMBER = SpreadsheetVersion.EXCEL97.getLastColumnIndex(); // 2^8 - 1
private static final String LAST_COLUMN_NAME = SpreadsheetVersion.EXCEL97.getLastColumnName();
- public final static short ENCODING_UNCHANGED = -1;
- public final static short ENCODING_COMPRESSED_UNICODE = 0;
- public final static short ENCODING_UTF_16 = 1;
+ public static final short ENCODING_UNCHANGED = -1;
+ public static final short ENCODING_COMPRESSED_UNICODE = 0;
+ public static final short ENCODING_UTF_16 = 1;
private final HSSFWorkbook _book;
private final HSSFSheet _sheet;
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFComment.java b/src/java/org/apache/poi/hssf/usermodel/HSSFComment.java
index 22c9296978..c62bd4daf1 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFComment.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFComment.java
@@ -39,12 +39,12 @@ import org.apache.poi.ss.util.CellAddress;
*/
public class HSSFComment extends HSSFTextbox implements Comment {
- private final static int FILL_TYPE_SOLID = 0;
- private final static int FILL_TYPE_PICTURE = 3;
+ private static final int FILL_TYPE_SOLID = 0;
+ private static final int FILL_TYPE_PICTURE = 3;
- private final static int GROUP_SHAPE_PROPERTY_DEFAULT_VALUE = 655362;
- private final static int GROUP_SHAPE_HIDDEN_MASK = 0x1000002;
- private final static int GROUP_SHAPE_NOT_HIDDEN_MASK = 0xFEFFFFFD;
+ private static final int GROUP_SHAPE_PROPERTY_DEFAULT_VALUE = 655362;
+ private static final int GROUP_SHAPE_HIDDEN_MASK = 0x1000002;
+ private static final int GROUP_SHAPE_NOT_HIDDEN_MASK = 0xFEFFFFFD;
/*
* TODO - make HSSFComment more consistent when created vs read from file.
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java b/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
index 4dd6a53c76..2cdb4e8b7e 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFFont.java
@@ -36,17 +36,17 @@ public final class HSSFFont implements Font {
/**
* Normal boldness (not bold)
*/
- final static short BOLDWEIGHT_NORMAL = 0x190;
+ static final short BOLDWEIGHT_NORMAL = 0x190;
/**
* Bold boldness (bold)
*/
- final static short BOLDWEIGHT_BOLD = 0x2bc;
+ static final short BOLDWEIGHT_BOLD = 0x2bc;
/**
* Arial font
*/
- public final static String FONT_ARIAL = "Arial";
+ public static final String FONT_ARIAL = "Arial";
private FontRecord font;
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java b/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java
index 1a25103bac..b56e105e22 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFPolygon.java
@@ -38,11 +38,12 @@ import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
/**
- *
+ *
*/
public class HSSFPolygon extends HSSFSimpleShape {
- private static POILogger logger = POILogFactory.getLogger(HSSFPolygon.class);
- public final static short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 0x1E;
+ public static final short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 0x1E;
+
+ private static final POILogger LOG = POILogFactory.getLogger(HSSFPolygon.class);
public HSSFPolygon(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord _textObjectRecord) {
super(spContainer, objRecord, _textObjectRecord);
@@ -173,11 +174,11 @@ public class HSSFPolygon extends HSSFSimpleShape {
*/
public void setPoints(int[] xPoints, int[] yPoints) {
if (xPoints.length != yPoints.length){
- logger.log( POILogger.ERROR, "xPoint.length must be equal to yPoints.length");
+ LOG.log( POILogger.ERROR, "xPoint.length must be equal to yPoints.length");
return;
}
if (xPoints.length == 0){
- logger.log( POILogger.ERROR, "HSSFPolygon must have at least one point");
+ LOG.log( POILogger.ERROR, "HSSFPolygon must have at least one point");
}
EscherArrayProperty verticesProp = new EscherArrayProperty(EscherPropertyTypes.GEOMETRY__VERTICES, false, 0);
verticesProp.setNumberOfElementsInArray(xPoints.length+1);
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java b/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
index d06278e1dc..0ecc946636 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java
@@ -39,7 +39,7 @@ import org.apache.poi.util.Configurator;
public final class HSSFRow implements Row, Comparable<HSSFRow> {
// used for collections
- public final static int INITIAL_CAPACITY = Configurator.getIntValue("HSSFRow.ColInitialCapacity", 5);
+ public static final int INITIAL_CAPACITY = Configurator.getIntValue("HSSFRow.ColInitialCapacity", 5);
private int rowNum;
private HSSFCell[] cells;
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java b/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java
index 95cb0b63d9..7e575a6642 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFShape.java
@@ -41,15 +41,15 @@ import org.apache.poi.util.StringUtil;
/**
* An abstract shape.
- *
- * Note: Microsoft Excel seems to sometimes disallow
- * higher y1 than y2 or higher x1 than x2 in the anchor, you might need to
+ *
+ * Note: Microsoft Excel seems to sometimes disallow
+ * higher y1 than y2 or higher x1 than x2 in the anchor, you might need to
* reverse them and draw shapes vertically or horizontally flipped via
- * setFlipVertical() or setFlipHorizontally().
+ * setFlipVertical() or setFlipHorizontally().
*/
public abstract class HSSFShape implements Shape {
private static final POILogger LOG = POILogFactory.getLogger(HSSFShape.class);
-
+
public static final int LINEWIDTH_ONE_PT = 12700;
public static final int LINEWIDTH_DEFAULT = 9525;
public static final int LINESTYLE__COLOR_DEFAULT = 0x08000040;
@@ -79,9 +79,9 @@ public abstract class HSSFShape implements Shape {
private final EscherContainerRecord _escherContainer;
private final ObjRecord _objRecord;
private final EscherOptRecord _optRecord;
-
- public final static int NO_FILLHITTEST_TRUE = 0x00110000;
- public final static int NO_FILLHITTEST_FALSE = 0x00010000;
+
+ public static final int NO_FILLHITTEST_TRUE = 0x00110000;
+ public static final int NO_FILLHITTEST_FALSE = 0x00010000;
/**
* creates shapes from existing file
@@ -147,7 +147,7 @@ public abstract class HSSFShape implements Shape {
}
/**
- * Return the low-level EscherOptRecord to read/modify not yet wrapped escher properties
+ * Return the low-level EscherOptRecord to read/modify not yet wrapped escher properties
*
* @return the low-level EscherOptRecord
*/
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
index aaf9a431b5..03d4f215e5 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java
@@ -101,7 +101,7 @@ public final class HSSFSheet implements org.apache.poi.ss.usermodel.Sheet {
* rows. It is currently set to 20. If you generate larger sheets you may benefit
* by setting this to a higher number and recompiling a custom edition of HSSFSheet.
*/
- public final static int INITIAL_CAPACITY = Configurator.getIntValue("HSSFSheet.RowInitialCapacity", 20);
+ public static final int INITIAL_CAPACITY = Configurator.getIntValue("HSSFSheet.RowInitialCapacity", 20);
/**
* reference to the low level {@link InternalSheet} object
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFSimpleShape.java b/src/java/org/apache/poi/hssf/usermodel/HSSFSimpleShape.java
index 27b891321c..02d5e7fdac 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFSimpleShape.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFSimpleShape.java
@@ -47,32 +47,32 @@ public class HSSFSimpleShape extends HSSFShape implements SimpleShape
// The commented out ones haven't been tested yet or aren't supported
// by HSSFSimpleShape.
- public final static short OBJECT_TYPE_LINE = HSSFShapeTypes.Line;
- public final static short OBJECT_TYPE_RECTANGLE = HSSFShapeTypes.Rectangle;
- public final static short OBJECT_TYPE_OVAL = HSSFShapeTypes.Ellipse;
- public final static short OBJECT_TYPE_ARC = HSSFShapeTypes.Arc;
- // public final static short OBJECT_TYPE_CHART = 5;
-// public final static short OBJECT_TYPE_TEXT = 6;
-// public final static short OBJECT_TYPE_BUTTON = 7;
- public final static short OBJECT_TYPE_PICTURE = HSSFShapeTypes.PictureFrame;
-
-// public final static short OBJECT_TYPE_POLYGON = 9;
-// public final static short OBJECT_TYPE_CHECKBOX = 11;
-// public final static short OBJECT_TYPE_OPTION_BUTTON = 12;
-// public final static short OBJECT_TYPE_EDIT_BOX = 13;
-// public final static short OBJECT_TYPE_LABEL = 14;
-// public final static short OBJECT_TYPE_DIALOG_BOX = 15;
-// public final static short OBJECT_TYPE_SPINNER = 16;
-// public final static short OBJECT_TYPE_SCROLL_BAR = 17;
-// public final static short OBJECT_TYPE_LIST_BOX = 18;
-// public final static short OBJECT_TYPE_GROUP_BOX = 19;
- public final static short OBJECT_TYPE_COMBO_BOX = HSSFShapeTypes.HostControl;
- public final static short OBJECT_TYPE_COMMENT = HSSFShapeTypes.TextBox;
- public final static short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 30;
-
- public final static int WRAP_SQUARE = 0;
- public final static int WRAP_BY_POINTS = 1;
- public final static int WRAP_NONE = 2;
+ public static final short OBJECT_TYPE_LINE = HSSFShapeTypes.Line;
+ public static final short OBJECT_TYPE_RECTANGLE = HSSFShapeTypes.Rectangle;
+ public static final short OBJECT_TYPE_OVAL = HSSFShapeTypes.Ellipse;
+ public static final short OBJECT_TYPE_ARC = HSSFShapeTypes.Arc;
+ // public static final short OBJECT_TYPE_CHART = 5;
+// public static final short OBJECT_TYPE_TEXT = 6;
+// public static final short OBJECT_TYPE_BUTTON = 7;
+ public static final short OBJECT_TYPE_PICTURE = HSSFShapeTypes.PictureFrame;
+
+// public static final short OBJECT_TYPE_POLYGON = 9;
+// public static final short OBJECT_TYPE_CHECKBOX = 11;
+// public static final short OBJECT_TYPE_OPTION_BUTTON = 12;
+// public static final short OBJECT_TYPE_EDIT_BOX = 13;
+// public static final short OBJECT_TYPE_LABEL = 14;
+// public static final short OBJECT_TYPE_DIALOG_BOX = 15;
+// public static final short OBJECT_TYPE_SPINNER = 16;
+// public static final short OBJECT_TYPE_SCROLL_BAR = 17;
+// public static final short OBJECT_TYPE_LIST_BOX = 18;
+// public static final short OBJECT_TYPE_GROUP_BOX = 19;
+ public static final short OBJECT_TYPE_COMBO_BOX = HSSFShapeTypes.HostControl;
+ public static final short OBJECT_TYPE_COMMENT = HSSFShapeTypes.TextBox;
+ public static final short OBJECT_TYPE_MICROSOFT_OFFICE_DRAWING = 30;
+
+ public static final int WRAP_SQUARE = 0;
+ public static final int WRAP_BY_POINTS = 1;
+ public static final int WRAP_NONE = 2;
private TextObjectRecord _textObjectRecord;
@@ -251,7 +251,7 @@ public class HSSFSimpleShape extends HSSFShape implements SimpleShape
EscherSpRecord spRecord = getEscherContainer().getChildById(EscherSpRecord.RECORD_ID);
spRecord.setShapeType((short) value);
}
-
+
private TextObjectRecord getOrCreateTextObjRecord(){
if (getTextObjectRecord() == null){
_textObjectRecord = createTextObjRecord();
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFTextbox.java b/src/java/org/apache/poi/hssf/usermodel/HSSFTextbox.java
index 9f59fcd3d9..5821a42f57 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFTextbox.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFTextbox.java
@@ -38,25 +38,25 @@ import org.apache.poi.hssf.record.TextObjectRecord;
* A textbox is a shape that may hold a rich text string.
*/
public class HSSFTextbox extends HSSFSimpleShape {
- public final static short OBJECT_TYPE_TEXT = 6;
+ public static final short OBJECT_TYPE_TEXT = 6;
/**
* How to align text horizontally
*/
- public final static short HORIZONTAL_ALIGNMENT_LEFT = 1;
- public final static short HORIZONTAL_ALIGNMENT_CENTERED = 2;
- public final static short HORIZONTAL_ALIGNMENT_RIGHT = 3;
- public final static short HORIZONTAL_ALIGNMENT_JUSTIFIED = 4;
- public final static short HORIZONTAL_ALIGNMENT_DISTRIBUTED = 7;
+ public static final short HORIZONTAL_ALIGNMENT_LEFT = 1;
+ public static final short HORIZONTAL_ALIGNMENT_CENTERED = 2;
+ public static final short HORIZONTAL_ALIGNMENT_RIGHT = 3;
+ public static final short HORIZONTAL_ALIGNMENT_JUSTIFIED = 4;
+ public static final short HORIZONTAL_ALIGNMENT_DISTRIBUTED = 7;
/**
* How to align text vertically
*/
- public final static short VERTICAL_ALIGNMENT_TOP = 1;
- public final static short VERTICAL_ALIGNMENT_CENTER = 2;
- public final static short VERTICAL_ALIGNMENT_BOTTOM = 3;
- public final static short VERTICAL_ALIGNMENT_JUSTIFY = 4;
- public final static short VERTICAL_ALIGNMENT_DISTRIBUTED = 7;
+ public static final short VERTICAL_ALIGNMENT_TOP = 1;
+ public static final short VERTICAL_ALIGNMENT_CENTER = 2;
+ public static final short VERTICAL_ALIGNMENT_BOTTOM = 3;
+ public static final short VERTICAL_ALIGNMENT_JUSTIFY = 4;
+ public static final short VERTICAL_ALIGNMENT_DISTRIBUTED = 7;
public HSSFTextbox(EscherContainerRecord spContainer, ObjRecord objRecord, TextObjectRecord textObjectRecord) {
super(spContainer, objRecord, textObjectRecord);
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
index 2b70796017..9d78e85539 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
@@ -156,7 +156,7 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss
* since you're never allowed to have more or less than three sheets!
*/
- public final static int INITIAL_CAPACITY = Configurator.getIntValue("HSSFWorkbook.SheetInitialCapacity", 3);
+ public static final int INITIAL_CAPACITY = Configurator.getIntValue("HSSFWorkbook.SheetInitialCapacity", 3);
/**
* this is the reference to the low level Workbook object
diff --git a/src/java/org/apache/poi/hssf/usermodel/helpers/HSSFColumnShifter.java b/src/java/org/apache/poi/hssf/usermodel/helpers/HSSFColumnShifter.java
index d6b84d6588..5ed4870398 100644
--- a/src/java/org/apache/poi/hssf/usermodel/helpers/HSSFColumnShifter.java
+++ b/src/java/org/apache/poi/hssf/usermodel/helpers/HSSFColumnShifter.java
@@ -35,7 +35,7 @@ import org.apache.poi.util.POILogger;
// {@link org.apache.poi.xssf.usermodel.helpers.XSSFColumnShifter}
@Beta
public final class HSSFColumnShifter extends ColumnShifter {
- private static final POILogger logger = POILogFactory.getLogger(HSSFColumnShifter.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HSSFColumnShifter.class);
public HSSFColumnShifter(HSSFSheet sh) {
super(sh);
diff --git a/src/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowShifter.java b/src/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowShifter.java
index f63f22ee08..8889205b48 100644
--- a/src/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowShifter.java
+++ b/src/java/org/apache/poi/hssf/usermodel/helpers/HSSFRowShifter.java
@@ -33,7 +33,7 @@ import org.apache.poi.util.POILogger;
// non-Javadoc: When possible, code should be implemented in the RowShifter abstract class to avoid duplication with
// {@link org.apache.poi.xssf.usermodel.helpers.XSSFRowShifter}
public final class HSSFRowShifter extends RowShifter {
- private static final POILogger logger = POILogFactory.getLogger(HSSFRowShifter.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HSSFRowShifter.class);
public HSSFRowShifter(HSSFSheet sh) {
super(sh);
diff --git a/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java b/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java
index 90d1dc0757..84c897074d 100644
--- a/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java
+++ b/src/java/org/apache/poi/poifs/crypt/standard/StandardEncryptor.java
@@ -54,7 +54,7 @@ import org.apache.poi.util.POILogger;
import org.apache.poi.util.TempFile;
public class StandardEncryptor extends Encryptor {
- private static final POILogger logger = POILogFactory.getLogger(StandardEncryptor.class);
+ private static final POILogger LOG = POILogFactory.getLogger(StandardEncryptor.class);
protected StandardEncryptor() {}
@@ -193,7 +193,7 @@ public class StandardEncryptor extends Encryptor {
IOUtils.copy(fis, leos);
}
if (!fileOut.delete()) {
- logger.log(POILogger.ERROR, "Can't delete temporary encryption file: ", fileOut);
+ LOG.log(POILogger.ERROR, "Can't delete temporary encryption file: ", fileOut);
}
leos.close();
diff --git a/src/java/org/apache/poi/poifs/filesystem/FileMagic.java b/src/java/org/apache/poi/poifs/filesystem/FileMagic.java
index 60667f88a5..81cd6187e2 100644
--- a/src/java/org/apache/poi/poifs/filesystem/FileMagic.java
+++ b/src/java/org/apache/poi/poifs/filesystem/FileMagic.java
@@ -105,7 +105,7 @@ public enum FileMagic {
UNKNOWN(new byte[0]);
// update this if a longer pattern is added
- final static int MAX_PATTERN_LENGTH = 44;
+ static final int MAX_PATTERN_LENGTH = 44;
final byte[][] magic;
diff --git a/src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java b/src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java
index a4ec0a35c4..d74eb9d2b8 100644
--- a/src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java
+++ b/src/java/org/apache/poi/poifs/nio/FileBackedDataSource.java
@@ -37,7 +37,7 @@ import org.apache.poi.util.POILogger;
* A POIFS {@link DataSource} backed by a File
*/
public class FileBackedDataSource extends DataSource implements Closeable {
- private final static POILogger logger = POILogFactory.getLogger(FileBackedDataSource.class);
+ private static final POILogger LOG = POILogFactory.getLogger(FileBackedDataSource.class);
private final FileChannel channel;
private Long channelSize;
@@ -195,10 +195,10 @@ public class FileBackedDataSource extends DataSource implements Closeable {
try {
CleanerUtil.getCleaner().freeBuffer(buffer);
} catch (IOException e) {
- logger.log(POILogger.WARN, "Failed to unmap the buffer", e);
+ LOG.log(POILogger.WARN, "Failed to unmap the buffer", e);
}
} else {
- logger.log(POILogger.DEBUG, CleanerUtil.UNMAP_NOT_SUPPORTED_REASON);
+ LOG.log(POILogger.DEBUG, CleanerUtil.UNMAP_NOT_SUPPORTED_REASON);
}
}
}
diff --git a/src/java/org/apache/poi/poifs/property/PropertyTable.java b/src/java/org/apache/poi/poifs/property/PropertyTable.java
index 118df2016f..e1f663cea6 100644
--- a/src/java/org/apache/poi/poifs/property/PropertyTable.java
+++ b/src/java/org/apache/poi/poifs/property/PropertyTable.java
@@ -41,8 +41,7 @@ import org.apache.poi.util.POILogger;
* chain of blocks.
*/
public final class PropertyTable implements BATManaged {
- private static final POILogger _logger =
- POILogFactory.getLogger(PropertyTable.class);
+ private static final POILogger LOG = POILogFactory.getLogger(PropertyTable.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
@@ -97,7 +96,7 @@ public final class PropertyTable implements BATManaged {
// Looks to be a truncated block
// This isn't allowed, but some third party created files
// sometimes do this, and we can normally read anyway
- _logger.log(POILogger.WARN, "Short Property Block, ", bb.remaining(),
+ LOG.log(POILogger.WARN, "Short Property Block, ", bb.remaining(),
" bytes instead of the expected " + _bigBigBlockSize.getBigBlockSize());
toRead = bb.remaining();
}
@@ -175,7 +174,7 @@ public final class PropertyTable implements BATManaged {
}
return numBlocks;
}
-
+
/**
* Prepare to be written
*/
@@ -184,7 +183,7 @@ public final class PropertyTable implements BATManaged {
// give each property its index
int i=0;
for (Property p : _properties) {
- // only handle non-null properties
+ // only handle non-null properties
if (p == null) continue;
p.setIndex(i++);
pList.add(p);
@@ -192,8 +191,8 @@ public final class PropertyTable implements BATManaged {
// prepare each property for writing
for (Property p : pList) p.preWrite();
- }
-
+ }
+
/**
* Writes the properties out into the given low-level stream
*/
@@ -205,7 +204,7 @@ public final class PropertyTable implements BATManaged {
}
}
os.close();
-
+
// Update the start position if needed
if(getStartBlock() != stream.getStartBlock()) {
setStartBlock(stream.getStartBlock());
@@ -248,7 +247,7 @@ public final class PropertyTable implements BATManaged {
if (! Property.isValidIndex(index))
return false;
if (index < 0 || index >= _properties.size()) {
- _logger.log(POILogger.WARN, "Property index " + index +
+ LOG.log(POILogger.WARN, "Property index " + index +
"outside the valid range 0.."+_properties.size());
return false;
}
diff --git a/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java b/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java
index 7b7fd7aa21..21139719d9 100644
--- a/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java
+++ b/src/java/org/apache/poi/sl/draw/BitmapImageRenderer.java
@@ -49,7 +49,7 @@ import org.apache.poi.util.POILogger;
* For now this class renders only images supported by the javax.imageio.ImageIO framework.
**/
public class BitmapImageRenderer implements ImageRenderer {
- private final static POILogger LOG = POILogFactory.getLogger(BitmapImageRenderer.class);
+ private static final POILogger LOG = POILogFactory.getLogger(BitmapImageRenderer.class);
protected BufferedImage img;
diff --git a/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java b/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java
index cc0f284b0b..13e3992fd6 100644
--- a/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java
+++ b/src/java/org/apache/poi/sl/draw/geom/PresetGeometries.java
@@ -36,7 +36,7 @@ import org.apache.poi.util.POILogger;
import org.apache.poi.util.XMLHelper;
public final class PresetGeometries {
- private final static POILogger LOG = POILogFactory.getLogger(PresetGeometries.class);
+ private static final POILogger LOG = POILogFactory.getLogger(PresetGeometries.class);
private final Map<String, CustomGeometry> map = new TreeMap<>();
diff --git a/src/java/org/apache/poi/sl/draw/geom/PresetParser.java b/src/java/org/apache/poi/sl/draw/geom/PresetParser.java
index fca15434b9..9cfa06b661 100644
--- a/src/java/org/apache/poi/sl/draw/geom/PresetParser.java
+++ b/src/java/org/apache/poi/sl/draw/geom/PresetParser.java
@@ -55,7 +55,7 @@ class PresetParser {
}
}
- private final static POILogger LOG = POILogFactory.getLogger(PresetParser.class);
+ private static final POILogger LOG = POILogFactory.getLogger(PresetParser.class);
private Mode mode;
diff --git a/src/java/org/apache/poi/ss/format/CellFormat.java b/src/java/org/apache/poi/ss/format/CellFormat.java
index 1890eb3961..86a1dabf4f 100644
--- a/src/java/org/apache/poi/ss/format/CellFormat.java
+++ b/src/java/org/apache/poi/ss/format/CellFormat.java
@@ -24,6 +24,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.logging.Level;
+import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -50,13 +51,13 @@ import org.apache.poi.util.LocaleUtil;
* <dt>One part (example: <tt>[Green]#.##</tt>)</dt>
* <dd>If the value is a number, display according to this one part (example: green text,
* with up to two decimal points). If the value is text, display it as is.</dd>
- *
+ *
* <dt>Two parts (example: <tt>[Green]#.##;[Red]#.##</tt>)</dt>
* <dd>If the value is a positive number or zero, display according to the first part (example: green
* text, with up to two decimal points); if it is a negative number, display
* according to the second part (example: red text, with up to two decimal
* points). If the value is text, display it as is.</dd>
- *
+ *
* <dt>Three parts (example: <tt>[Green]#.##;[Black]#.##;[Red]#.##</tt>)</dt>
* <dd>If the value is a positive
* number, display according to the first part (example: green text, with up to
@@ -64,7 +65,7 @@ import org.apache.poi.util.LocaleUtil;
* (example: black text, with up to two decimal points); if it is a negative
* number, display according to the third part (example: red text, with up to
* two decimal points). If the value is text, display it as is.</dd>
- *
+ *
* <dt>Four parts (example: <tt>[Green]#.##;[Black]#.##;[Red]#.##;[@]</tt>)</dt>
* <dd>If the value is a positive number, display according to the first part (example: green text,
* with up to two decimal points); if it is zero, display according to the
@@ -82,7 +83,7 @@ import org.apache.poi.util.LocaleUtil;
* <p>
* In addition to these, there is a general format that is used when no format
* is specified.
- *
+ *
* TODO Merge this with {@link DataFormatter} so we only have one set of
* code for formatting numbers.
* TODO Re-use parts of this logic with {@link ConditionalFormatting} /
@@ -91,13 +92,8 @@ import org.apache.poi.util.LocaleUtil;
* native character numbers, as documented at https://help.libreoffice.org/Common/Number_Format_Codes
*/
public class CellFormat {
- private final Locale locale;
- private final String format;
- private final CellFormatPart posNumFmt;
- private final CellFormatPart zeroNumFmt;
- private final CellFormatPart negNumFmt;
- private final CellFormatPart textFmt;
- private final int formatPartCount;
+ /** The logger to use in the formatting code. */
+ private static final Logger LOG = Logger.getLogger(CellFormat.class.getName());
private static final Pattern ONE_PART = Pattern.compile(
CellFormatPart.FORMAT_PAT.pattern() + "(;|$)",
@@ -115,8 +111,16 @@ public class CellFormat {
"###################################################" +
"###################################################";
- private static String QUOTE = "\"";
-
+ private static final String QUOTE = "\"";
+
+ private final Locale locale;
+ private final String format;
+ private final CellFormatPart posNumFmt;
+ private final CellFormatPart zeroNumFmt;
+ private final CellFormatPart negNumFmt;
+ private final CellFormatPart textFmt;
+ private final int formatPartCount;
+
private static CellFormat createGeneralFormat(final Locale locale) {
return new CellFormat(locale, "General") {
@Override
@@ -187,14 +191,13 @@ public class CellFormat {
parts.add(new CellFormatPart(locale, valueDesc));
} catch (RuntimeException e) {
- CellFormatter.logger.log(Level.WARNING,
- "Invalid format: " + CellFormatter.quote(m.group()), e);
+ LOG.log(Level.WARNING, "Invalid format: " + CellFormatter.quote(m.group()), e);
parts.add(null);
}
}
-
+
formatPartCount = parts.size();
-
+
switch (formatPartCount) {
case 1:
posNumFmt = parts.get(0);
@@ -382,16 +385,16 @@ public class CellFormat {
* Returns the {@link CellFormatPart} that applies to the value. Result
* depends on how many parts the cell format has, the cell value and any
* conditions. The value must be a {@link Number}.
- *
+ *
* @param value The value.
* @return The {@link CellFormatPart} that applies to the value.
*/
private CellFormatPart getApplicableFormatPart(Object value) {
-
+
if (value instanceof Number) {
-
+
double val = ((Number) value).doubleValue();
-
+
if (formatPartCount == 1) {
if (!posNumFmt.hasCondition()
|| (posNumFmt.hasCondition() && posNumFmt.applies(val))) {
@@ -425,15 +428,15 @@ public class CellFormat {
} else {
throw new IllegalArgumentException("value must be a Number");
}
-
+
}
-
+
/**
* Returns the ultimate cell type, following the results of formulas. If
* the cell is a {@link CellType#FORMULA}, this returns the result of
* {@link Cell#getCachedFormulaResultType()}. Otherwise this returns the
* result of {@link Cell#getCellType()}.
- *
+ *
* @param cell The cell.
*
* @return The ultimate type of this cell.
diff --git a/src/java/org/apache/poi/ss/format/CellFormatPart.java b/src/java/org/apache/poi/ss/format/CellFormatPart.java
index e56aa3d867..2c65ca865d 100644
--- a/src/java/org/apache/poi/ss/format/CellFormatPart.java
+++ b/src/java/org/apache/poi/ss/format/CellFormatPart.java
@@ -26,10 +26,10 @@ import javax.swing.*;
import java.awt.*;
import java.util.*;
import java.util.List;
+import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import static org.apache.poi.ss.format.CellFormatter.logger;
import static org.apache.poi.ss.format.CellFormatter.quote;
/**
@@ -49,13 +49,16 @@ import static org.apache.poi.ss.format.CellFormatter.quote;
* @author Ken Arnold, Industrious Media LLC
*/
public class CellFormatPart {
+ private static final Logger LOG = Logger.getLogger(CellFormat.class.getName());
+
+ static final Map<String, Color> NAMED_COLORS;
+
+
private final Color color;
private CellFormatCondition condition;
private final CellFormatter format;
private final CellFormatType type;
- static final Map<String, Color> NAMED_COLORS;
-
static {
NAMED_COLORS = new TreeMap<>(
String.CASE_INSENSITIVE_ORDER);
@@ -106,7 +109,7 @@ public class CellFormatPart {
// A condition specification
String condition = "([<>=]=?|!=|<>) # The operator\n" +
" \\s*([0-9]+(?:\\.[0-9]*)?)\\s* # The constant to test against\n";
-
+
// A currency symbol / string, in a specific locale
String currency = "(\\[\\$.{0,3}-[0-9a-f]{3}\\])";
@@ -173,7 +176,7 @@ public class CellFormatPart {
public CellFormatPart(String desc) {
this(LocaleUtil.getUserLocale(), desc);
}
-
+
/**
* Create an object to represent a format part.
*
@@ -253,8 +256,9 @@ public class CellFormatPart {
if (cdesc == null || cdesc.length() == 0)
return null;
Color c = NAMED_COLORS.get(cdesc);
- if (c == null)
- logger.warning("Unknown color: " + quote(cdesc));
+ if (c == null) {
+ LOG.warning("Unknown color: " + quote(cdesc));
+ }
return c;
}
@@ -297,7 +301,7 @@ public class CellFormatPart {
*/
private CellFormatter getFormatter(Locale locale, Matcher matcher) {
String fdesc = matcher.group(SPECIFICATION_GROUP);
-
+
// For now, we don't support localised currencies, so simplify if there
Matcher currencyM = CURRENCY_PAT.matcher(fdesc);
if (currencyM.find()) {
@@ -311,7 +315,7 @@ public class CellFormatPart {
}
fdesc = fdesc.replace(currencyPart, currencyRepl);
}
-
+
// Build a formatter for this simplified string
return type.formatter(locale, fdesc);
}
@@ -339,7 +343,7 @@ public class CellFormatPart {
String c2 = null;
if (codePoints.hasNext())
c2 = codePoints.next().toLowerCase(Locale.ROOT);
-
+
switch (c1) {
case "@":
return CellFormatType.TEXT;
diff --git a/src/java/org/apache/poi/ss/format/CellFormatter.java b/src/java/org/apache/poi/ss/format/CellFormatter.java
index 3cb7daf179..e3ff5c5527 100644
--- a/src/java/org/apache/poi/ss/format/CellFormatter.java
+++ b/src/java/org/apache/poi/ss/format/CellFormatter.java
@@ -23,10 +23,11 @@ import org.apache.poi.util.LocaleUtil;
/**
* This is the abstract supertype for the various cell formatters.
- *
- * @author Ken Arnold, Industrious Media LLC
*/
public abstract class CellFormatter {
+ /** The logger to use in the formatting code. */
+ private static final Logger LOG = Logger.getLogger(CellFormatter.class.getName());
+
/** The original specified format. */
protected final String format;
protected final Locale locale;
@@ -51,16 +52,12 @@ public abstract class CellFormatter {
this.format = format;
}
- /** The logger to use in the formatting code. */
- static final Logger logger = Logger.getLogger(
- CellFormatter.class.getName());
-
/**
* Format a value according the format string.
* <p/>
- * NOTE: this method must be thread safe! In particular, if it uses a
+ * NOTE: this method must be thread safe! In particular, if it uses a
* Format instance that is not thread safe, i.e. DateFormat, this method
- * must be synchronized, either on the method, if the format is a final
+ * must be synchronized, either on the method, if the format is a final
* property, or on the format instance itself.
*
* @param toAppendTo The buffer to append to.
@@ -71,9 +68,9 @@ public abstract class CellFormatter {
/**
* Format a value according to the type, in the most basic way.
* <p/>
- * NOTE: this method must be thread safe! In particular, if it uses a
+ * NOTE: this method must be thread safe! In particular, if it uses a
* Format instance that is not thread safe, i.e. DateFormat, this method
- * must be synchronized, either on the method, if the format is a final
+ * must be synchronized, either on the method, if the format is a final
* property, or on the format instance itself.
*
* @param toAppendTo The buffer to append to.
diff --git a/src/java/org/apache/poi/ss/formula/FormulaParser.java b/src/java/org/apache/poi/ss/formula/FormulaParser.java
index 03aa2f23b2..b7cab41459 100644
--- a/src/java/org/apache/poi/ss/formula/FormulaParser.java
+++ b/src/java/org/apache/poi/ss/formula/FormulaParser.java
@@ -93,7 +93,7 @@ import org.apache.poi.util.POILogger;
*/
@Internal
public final class FormulaParser {
- private final static POILogger log = POILogFactory.getLogger(FormulaParser.class);
+ private static final POILogger log = POILogFactory.getLogger(FormulaParser.class);
private final String _formulaString;
private final int _formulaLength;
/** points at the next character to be read (after the {@link #look} codepoint) */
@@ -101,9 +101,9 @@ public final class FormulaParser {
private ParseNode _rootNode;
- private final static char TAB = '\t'; // HSSF + XSSF
- private final static char CR = '\r'; // Normally just XSSF
- private final static char LF = '\n'; // Normally just XSSF
+ private static final char TAB = '\t'; // HSSF + XSSF
+ private static final char CR = '\r'; // Normally just XSSF
+ private static final char LF = '\n'; // Normally just XSSF
/**
* Lookahead unicode codepoint
@@ -585,11 +585,11 @@ public final class FormulaParser {
- private final static String specHeaders = "Headers";
- private final static String specAll = "All";
- private final static String specData = "Data";
- private final static String specTotals = "Totals";
- private final static String specThisRow = "This Row";
+ private static final String specHeaders = "Headers";
+ private static final String specAll = "All";
+ private static final String specData = "Data";
+ private static final String specTotals = "Totals";
+ private static final String specThisRow = "This Row";
/**
* Parses a structured reference, returns it as area reference.
diff --git a/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java b/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java
index 35c608ac0b..3d6641a3eb 100644
--- a/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java
+++ b/src/java/org/apache/poi/ss/formula/constant/ErrorConstant.java
@@ -22,12 +22,12 @@ import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
/**
* Represents a constant error code value as encoded in a constant values array. <p>
- *
- * This class is a type-safe wrapper for a 16-bit int value performing a similar job to
+ *
+ * This class is a type-safe wrapper for a 16-bit int value performing a similar job to
* <tt>ErrorEval</tt>.
*/
-public class ErrorConstant {
- private static final POILogger logger = POILogFactory.getLogger(ErrorConstant.class);
+public final class ErrorConstant {
+ private static final POILogger LOG = POILogFactory.getLogger(ErrorConstant.class);
private static final ErrorConstant NULL = new ErrorConstant(FormulaError.NULL.getCode());
private static final ErrorConstant DIV_0 = new ErrorConstant(FormulaError.DIV0.getCode());
private static final ErrorConstant VALUE = new ErrorConstant(FormulaError.VALUE.getCode());
@@ -41,7 +41,7 @@ public class ErrorConstant {
private ErrorConstant(int errorCode) {
_errorCode = errorCode;
}
-
+
public int getErrorCode() {
return _errorCode;
}
@@ -66,7 +66,7 @@ public class ErrorConstant {
default: break;
}
}
- logger.log( POILogger.WARN, "Warning - unexpected error code (", errorCode, ")");
+ LOG.log( POILogger.WARN, "Warning - unexpected error code (", errorCode, ")");
return new ErrorConstant(errorCode);
}
diff --git a/src/java/org/apache/poi/ss/formula/functions/Dec2Bin.java b/src/java/org/apache/poi/ss/formula/functions/Dec2Bin.java
index 45c387e915..cbac6b2ebf 100644
--- a/src/java/org/apache/poi/ss/formula/functions/Dec2Bin.java
+++ b/src/java/org/apache/poi/ss/formula/functions/Dec2Bin.java
@@ -52,9 +52,9 @@ public class Dec2Bin extends Var1or2ArgFunction implements FreeRefFunction {
public static final FreeRefFunction instance = new Dec2Bin();
- private final static long MIN_VALUE = -512;
- private final static long MAX_VALUE = 511;
- private final static int DEFAULT_PLACES_VALUE = 10;
+ private static final long MIN_VALUE = -512;
+ private static final long MAX_VALUE = 511;
+ private static final int DEFAULT_PLACES_VALUE = 10;
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval numberVE, ValueEval placesVE) {
ValueEval veText1;
diff --git a/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java b/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java
index dc25aea3ff..299068d4c1 100644
--- a/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java
+++ b/src/java/org/apache/poi/ss/formula/functions/Dec2Hex.java
@@ -56,9 +56,9 @@ public final class Dec2Hex extends Var1or2ArgFunction implements FreeRefFunction
public static final FreeRefFunction instance = new Dec2Hex();
- private final static long MIN_VALUE = Long.parseLong("-549755813888");
- private final static long MAX_VALUE = Long.parseLong("549755813887");
- private final static int DEFAULT_PLACES_VALUE = 10;
+ private static final long MIN_VALUE = Long.parseLong("-549755813888");
+ private static final long MAX_VALUE = Long.parseLong("549755813887");
+ private static final int DEFAULT_PLACES_VALUE = 10;
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval number, ValueEval places) {
ValueEval veText1;
diff --git a/src/java/org/apache/poi/ss/formula/functions/Delta.java b/src/java/org/apache/poi/ss/formula/functions/Delta.java
index c26ca2755c..4fd112f4b0 100644
--- a/src/java/org/apache/poi/ss/formula/functions/Delta.java
+++ b/src/java/org/apache/poi/ss/formula/functions/Delta.java
@@ -44,8 +44,8 @@ public final class Delta extends Fixed2ArgFunction implements FreeRefFunction {
public static final FreeRefFunction instance = new Delta();
- private final static NumberEval ONE = new NumberEval(1);
- private final static NumberEval ZERO = new NumberEval(0);
+ private static final NumberEval ONE = new NumberEval(1);
+ private static final NumberEval ZERO = new NumberEval(0);
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg1, ValueEval arg2) {
try {
diff --git a/src/java/org/apache/poi/ss/formula/functions/NumericFunction.java b/src/java/org/apache/poi/ss/formula/functions/NumericFunction.java
index 87646295bd..39adf4c8cd 100644
--- a/src/java/org/apache/poi/ss/formula/functions/NumericFunction.java
+++ b/src/java/org/apache/poi/ss/formula/functions/NumericFunction.java
@@ -391,7 +391,7 @@ public abstract class NumericFunction implements Function {
};
public static final Function POISSON = new Fixed3ArgFunction() {
- private final static double DEFAULT_RETURN_RESULT =1;
+ private static final double DEFAULT_RETURN_RESULT =1;
/**
* This checks is x = 0 and the mean = 0.
diff --git a/src/java/org/apache/poi/ss/formula/ptg/AddPtg.java b/src/java/org/apache/poi/ss/formula/ptg/AddPtg.java
index 717a39010b..13f6b76a86 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/AddPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/AddPtg.java
@@ -21,9 +21,9 @@ package org.apache.poi.ss.formula.ptg;
* Addition operator PTG the "+" binomial operator.
*/
public final class AddPtg extends ValueOperatorPtg {
- public final static byte sid = 0x03;
+ public static final byte sid = 0x03;
- private final static String ADD = "+";
+ private static final String ADD = "+";
public static final AddPtg instance = new AddPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/Area2DPtgBase.java b/src/java/org/apache/poi/ss/formula/ptg/Area2DPtgBase.java
index ccfd9c76cf..456909d59f 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/Area2DPtgBase.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/Area2DPtgBase.java
@@ -25,7 +25,7 @@ import org.apache.poi.util.LittleEndianOutput;
* Common superclass of 2-D area refs
*/
public abstract class Area2DPtgBase extends AreaPtgBase {
- private final static int SIZE = 9;
+ private static final int SIZE = 9;
protected Area2DPtgBase(int firstRow, int lastRow, int firstColumn, int lastColumn, boolean firstRowRelative, boolean lastRowRelative, boolean firstColRelative, boolean lastColRelative) {
super(firstRow, lastRow, firstColumn, lastColumn, firstRowRelative, lastRowRelative, firstColRelative, lastColRelative);
diff --git a/src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java b/src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java
index 9a21b60660..cb3aaa2234 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/Area3DPtg.java
@@ -37,8 +37,8 @@ import org.apache.poi.util.LittleEndianOutput;
* The XSSF equivalent is {@link Area3DPxg}
*/
public final class Area3DPtg extends AreaPtgBase implements WorkbookDependentFormula, ExternSheetReferenceToken {
- public final static byte sid = 0x3b;
- private final static int SIZE = 11; // 10 + 1 for Ptg
+ public static final byte sid = 0x3b;
+ private static final int SIZE = 11; // 10 + 1 for Ptg
private int field_1_index_extern_sheet;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/AreaErrPtg.java b/src/java/org/apache/poi/ss/formula/ptg/AreaErrPtg.java
index 4a9a041e54..911abbf5bc 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/AreaErrPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/AreaErrPtg.java
@@ -29,7 +29,7 @@ import org.apache.poi.util.LittleEndianOutput;
* AreaErr - handles deleted cell area references.
*/
public final class AreaErrPtg extends OperandPtg {
- public final static byte sid = 0x2B;
+ public static final byte sid = 0x2B;
private final int unused1;
private final int unused2;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/AreaNPtg.java b/src/java/org/apache/poi/ss/formula/ptg/AreaNPtg.java
index 1627704dfe..0ac7d5e74d 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/AreaNPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/AreaNPtg.java
@@ -24,7 +24,7 @@ import org.apache.poi.util.LittleEndianInput;
* @author Jason Height (jheight at chariot dot net dot au)
*/
public final class AreaNPtg extends Area2DPtgBase {
- public final static short sid = 0x2D;
+ public static final short sid = 0x2D;
public AreaNPtg(AreaNPtg other) {
super(other);
diff --git a/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java b/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java
index 0ee4c0292e..2e25703786 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/AreaPtg.java
@@ -24,7 +24,7 @@ import org.apache.poi.util.LittleEndianInput;
* Specifies a rectangular area of cells A1:A4 for instance.
*/
public final class AreaPtg extends Area2DPtgBase {
- public final static short sid = 0x25;
+ public static final short sid = 0x25;
public AreaPtg(int firstRow, int lastRow, int firstColumn, int lastColumn, boolean firstRowRelative, boolean lastRowRelative, boolean firstColRelative, boolean lastColRelative) {
super(firstRow, lastRow, firstColumn, lastColumn, firstRowRelative, lastRowRelative, firstColRelative, lastColRelative);
diff --git a/src/java/org/apache/poi/ss/formula/ptg/AreaPtgBase.java b/src/java/org/apache/poi/ss/formula/ptg/AreaPtgBase.java
index 0beb28f0c4..5fbefc365e 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/AreaPtgBase.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/AreaPtgBase.java
@@ -34,9 +34,9 @@ import org.apache.poi.util.LittleEndianOutput;
*/
public abstract class AreaPtgBase extends OperandPtg implements AreaI {
- private final static BitField rowRelative = BitFieldFactory.getInstance(0x8000);
- private final static BitField colRelative = BitFieldFactory.getInstance(0x4000);
- private final static BitField columnMask = BitFieldFactory.getInstance(0x3FFF);
+ private static final BitField rowRelative = BitFieldFactory.getInstance(0x8000);
+ private static final BitField colRelative = BitFieldFactory.getInstance(0x4000);
+ private static final BitField columnMask = BitFieldFactory.getInstance(0x3FFF);
/** zero based, unsigned 16 bit */
private int field_1_first_row;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/AttrPtg.java b/src/java/org/apache/poi/ss/formula/ptg/AttrPtg.java
index 16dc206dbb..99e0ea0c10 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/AttrPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/AttrPtg.java
@@ -36,8 +36,8 @@ import org.apache.poi.util.LittleEndianOutput;
* in SUM functions (i.e. SUM(A1:A3) causes an area PTG then an ATTR with the SUM option set)
*/
public final class AttrPtg extends ControlPtg {
- public final static byte sid = 0x19;
- private final static int SIZE = 4;
+ public static final byte sid = 0x19;
+ private static final int SIZE = 4;
// flags 'volatile' and 'space', can be combined.
// OOO spec says other combinations are theoretically possible but not likely to occur.
diff --git a/src/java/org/apache/poi/ss/formula/ptg/ConcatPtg.java b/src/java/org/apache/poi/ss/formula/ptg/ConcatPtg.java
index bedcb94162..84777f2091 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/ConcatPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/ConcatPtg.java
@@ -18,9 +18,9 @@
package org.apache.poi.ss.formula.ptg;
public final class ConcatPtg extends ValueOperatorPtg {
- public final static byte sid = 0x08;
+ public static final byte sid = 0x08;
- private final static String CONCAT = "&";
+ private static final String CONCAT = "&";
public static final ConcatPtg instance = new ConcatPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java b/src/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java
index 023bc8d920..1143dc5e7b 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/DeletedArea3DPtg.java
@@ -34,7 +34,7 @@ import org.apache.poi.util.LittleEndianOutput;
* @version 1.0-pre
*/
public final class DeletedArea3DPtg extends OperandPtg implements WorkbookDependentFormula {
- public final static byte sid = 0x3d;
+ public static final byte sid = 0x3d;
private final int field_1_index_extern_sheet;
private final int unused1;
private final int unused2;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/DeletedRef3DPtg.java b/src/java/org/apache/poi/ss/formula/ptg/DeletedRef3DPtg.java
index ea2805203c..04908988d1 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/DeletedRef3DPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/DeletedRef3DPtg.java
@@ -35,7 +35,7 @@ import org.apache.poi.util.LittleEndianOutput;
* @since 1.0-pre
*/
public final class DeletedRef3DPtg extends OperandPtg implements WorkbookDependentFormula {
- public final static byte sid = 0x3c;
+ public static final byte sid = 0x3c;
private final int field_1_index_extern_sheet;
private final int unused1;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/DividePtg.java b/src/java/org/apache/poi/ss/formula/ptg/DividePtg.java
index f53cb09ebd..6a69ff2df6 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/DividePtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/DividePtg.java
@@ -21,7 +21,7 @@ package org.apache.poi.ss.formula.ptg;
* This PTG implements the standard binomial divide "/"
*/
public final class DividePtg extends ValueOperatorPtg {
- public final static byte sid = 0x06;
+ public static final byte sid = 0x06;
public static final DividePtg instance = new DividePtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/EqualPtg.java b/src/java/org/apache/poi/ss/formula/ptg/EqualPtg.java
index 596be4912c..b95a4b4262 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/EqualPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/EqualPtg.java
@@ -22,7 +22,7 @@ package org.apache.poi.ss.formula.ptg;
* @author andy
*/
public final class EqualPtg extends ValueOperatorPtg {
- public final static byte sid = 0x0b;
+ public static final byte sid = 0x0b;
public static final EqualPtg instance = new EqualPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/ExpPtg.java b/src/java/org/apache/poi/ss/formula/ptg/ExpPtg.java
index 93249caa39..6c125e652c 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/ExpPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/ExpPtg.java
@@ -25,8 +25,8 @@ import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
public final class ExpPtg extends ControlPtg {
- private final static int SIZE = 5;
- public final static short sid = 0x1;
+ private static final int SIZE = 5;
+ public static final short sid = 0x1;
private final int field_1_first_row;
private final int field_2_first_col;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/FuncPtg.java b/src/java/org/apache/poi/ss/formula/ptg/FuncPtg.java
index 4b01512aac..9fbcc89690 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/FuncPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/FuncPtg.java
@@ -24,8 +24,8 @@ import org.apache.poi.util.LittleEndianOutput;
public final class FuncPtg extends AbstractFunctionPtg {
- public final static byte sid = 0x21;
- public final static int SIZE = 3;
+ public static final byte sid = 0x21;
+ public static final int SIZE = 3;
public static FuncPtg create(LittleEndianInput in) {
return create(in.readUShort());
diff --git a/src/java/org/apache/poi/ss/formula/ptg/FuncVarPtg.java b/src/java/org/apache/poi/ss/formula/ptg/FuncVarPtg.java
index 398ec47b05..b13381ac22 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/FuncVarPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/FuncVarPtg.java
@@ -28,8 +28,8 @@ import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
public final class FuncVarPtg extends AbstractFunctionPtg {
- public final static byte sid = 0x22;
- private final static int SIZE = 4;
+ public static final byte sid = 0x22;
+ private static final int SIZE = 4;
// See spec at 2.5.198.63 PtgFuncVar
private static final BitField ceFunc = BitFieldFactory.getInstance(0xF000);
diff --git a/src/java/org/apache/poi/ss/formula/ptg/GreaterEqualPtg.java b/src/java/org/apache/poi/ss/formula/ptg/GreaterEqualPtg.java
index 513a537dec..386249eb89 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/GreaterEqualPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/GreaterEqualPtg.java
@@ -22,8 +22,8 @@ package org.apache.poi.ss.formula.ptg;
* PTG class to implement greater or equal to
*/
public final class GreaterEqualPtg extends ValueOperatorPtg {
- public final static int SIZE = 1;
- public final static byte sid = 0x0c;
+ public static final int SIZE = 1;
+ public static final byte sid = 0x0c;
public static final GreaterEqualPtg instance = new GreaterEqualPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/GreaterThanPtg.java b/src/java/org/apache/poi/ss/formula/ptg/GreaterThanPtg.java
index 98a8c2fea8..a58e6e2cc6 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/GreaterThanPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/GreaterThanPtg.java
@@ -22,8 +22,8 @@ package org.apache.poi.ss.formula.ptg;
* Greater than operator PTG ">"
*/
public final class GreaterThanPtg extends ValueOperatorPtg {
- public final static byte sid = 0x0D;
- private final static String GREATERTHAN = ">";
+ public static final byte sid = 0x0D;
+ private static final String GREATERTHAN = ">";
public static final GreaterThanPtg instance = new GreaterThanPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/IntPtg.java b/src/java/org/apache/poi/ss/formula/ptg/IntPtg.java
index 230883e9e2..977c8b6bc4 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/IntPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/IntPtg.java
@@ -42,8 +42,8 @@ public final class IntPtg extends ScalarConstantPtg {
return i >= MIN_VALUE && i <= MAX_VALUE;
}
- public final static int SIZE = 3;
- public final static byte sid = 0x1e;
+ public static final int SIZE = 3;
+ public static final byte sid = 0x1e;
private final int field_1_value;
public IntPtg(LittleEndianInput in) {
diff --git a/src/java/org/apache/poi/ss/formula/ptg/IntersectionPtg.java b/src/java/org/apache/poi/ss/formula/ptg/IntersectionPtg.java
index abad733c4e..963564ad71 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/IntersectionPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/IntersectionPtg.java
@@ -20,7 +20,7 @@ package org.apache.poi.ss.formula.ptg;
import org.apache.poi.util.LittleEndianOutput;
public final class IntersectionPtg extends OperationPtg {
- public final static byte sid = 0x0f;
+ public static final byte sid = 0x0f;
public static final IntersectionPtg instance = new IntersectionPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/LessEqualPtg.java b/src/java/org/apache/poi/ss/formula/ptg/LessEqualPtg.java
index d94206a39c..f66987a3ca 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/LessEqualPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/LessEqualPtg.java
@@ -25,7 +25,7 @@ package org.apache.poi.ss.formula.ptg;
* Ptg class to implement less than or equal
*/
public final class LessEqualPtg extends ValueOperatorPtg {
- public final static byte sid = 0x0a;
+ public static final byte sid = 0x0a;
public static final LessEqualPtg instance = new LessEqualPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/LessThanPtg.java b/src/java/org/apache/poi/ss/formula/ptg/LessThanPtg.java
index 74ed426f8f..5e5731654d 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/LessThanPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/LessThanPtg.java
@@ -24,10 +24,10 @@ package org.apache.poi.ss.formula.ptg;
*/
public final class LessThanPtg extends ValueOperatorPtg {
/** the sid for the less than operator as hex */
- public final static byte sid = 0x09;
+ public static final byte sid = 0x09;
/** identifier for LESS THAN char */
- private final static String LESSTHAN = "<";
+ private static final String LESSTHAN = "<";
public static final LessThanPtg instance = new LessThanPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/MemAreaPtg.java b/src/java/org/apache/poi/ss/formula/ptg/MemAreaPtg.java
index f1eb6d0b8a..18a00eed8b 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/MemAreaPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/MemAreaPtg.java
@@ -25,8 +25,8 @@ import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
public final class MemAreaPtg extends OperandPtg {
- public final static short sid = 0x26;
- private final static int SIZE = 7;
+ public static final short sid = 0x26;
+ private static final int SIZE = 7;
private final int field_1_reserved;
private final int field_2_subex_len;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/MemErrPtg.java b/src/java/org/apache/poi/ss/formula/ptg/MemErrPtg.java
index 2f70c197fc..41adefcaff 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/MemErrPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/MemErrPtg.java
@@ -25,8 +25,8 @@ import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
public final class MemErrPtg extends OperandPtg {
- public final static short sid = 0x27;
- private final static int SIZE = 7;
+ public static final short sid = 0x27;
+ private static final int SIZE = 7;
private int field_1_reserved;
private short field_2_subex_len;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/MemFuncPtg.java b/src/java/org/apache/poi/ss/formula/ptg/MemFuncPtg.java
index 532e66c5c2..548f15f1b4 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/MemFuncPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/MemFuncPtg.java
@@ -26,7 +26,7 @@ import org.apache.poi.util.LittleEndianOutput;
public final class MemFuncPtg extends OperandPtg {
- public final static byte sid = 0x29;
+ public static final byte sid = 0x29;
private final int field_1_len_ref_subexpression;
/**
diff --git a/src/java/org/apache/poi/ss/formula/ptg/MissingArgPtg.java b/src/java/org/apache/poi/ss/formula/ptg/MissingArgPtg.java
index e474aabf37..bb80961b6a 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/MissingArgPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/MissingArgPtg.java
@@ -27,8 +27,8 @@ import org.apache.poi.util.LittleEndianOutput;
*/
public final class MissingArgPtg extends ScalarConstantPtg {
- private final static int SIZE = 1;
- public final static byte sid = 0x16;
+ private static final int SIZE = 1;
+ public static final byte sid = 0x16;
public static final Ptg instance = new MissingArgPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/MultiplyPtg.java b/src/java/org/apache/poi/ss/formula/ptg/MultiplyPtg.java
index d6dc2e2016..6a785c1a07 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/MultiplyPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/MultiplyPtg.java
@@ -21,7 +21,7 @@ package org.apache.poi.ss.formula.ptg;
* Implements the standard mathematical multiplication "*"
*/
public final class MultiplyPtg extends ValueOperatorPtg {
- public final static byte sid = 0x05;
+ public static final byte sid = 0x05;
public static final MultiplyPtg instance = new MultiplyPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/NamePtg.java b/src/java/org/apache/poi/ss/formula/ptg/NamePtg.java
index 8084fa4337..aee1997509 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/NamePtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/NamePtg.java
@@ -30,8 +30,8 @@ import org.apache.poi.util.LittleEndianOutput;
* See the spec at 2.5.198.76 PtgName
*/
public final class NamePtg extends OperandPtg implements WorkbookDependentFormula {
- public final static short sid = 0x23;
- private final static int SIZE = 5;
+ public static final short sid = 0x23;
+ private static final int SIZE = 5;
/** one-based index to defined name record */
private int field_1_label_index;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/NameXPtg.java b/src/java/org/apache/poi/ss/formula/ptg/NameXPtg.java
index 4874c78eab..5ca85df72f 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/NameXPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/NameXPtg.java
@@ -35,8 +35,8 @@ import org.apache.poi.util.LittleEndianOutput;
* is {@link NameXPxg}
*/
public final class NameXPtg extends OperandPtg implements WorkbookDependentFormula {
- public final static short sid = 0x39;
- private final static int SIZE = 7;
+ public static final short sid = 0x39;
+ private static final int SIZE = 7;
/** index to REF entry in externsheet record */
private final int _sheetRefIndex;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/NotEqualPtg.java b/src/java/org/apache/poi/ss/formula/ptg/NotEqualPtg.java
index aaf2b11f29..15313a4a77 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/NotEqualPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/NotEqualPtg.java
@@ -21,7 +21,7 @@ package org.apache.poi.ss.formula.ptg;
* Ptg class to implement not equal
*/
public final class NotEqualPtg extends ValueOperatorPtg {
- public final static byte sid = 0x0e;
+ public static final byte sid = 0x0e;
public static final NotEqualPtg instance = new NotEqualPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/NumberPtg.java b/src/java/org/apache/poi/ss/formula/ptg/NumberPtg.java
index b58d207317..ed6f15f1ee 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/NumberPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/NumberPtg.java
@@ -30,8 +30,8 @@ import org.apache.poi.util.LittleEndianOutput;
* field using IEEE notation
*/
public final class NumberPtg extends ScalarConstantPtg {
- public final static int SIZE = 9;
- public final static byte sid = 0x1f;
+ public static final int SIZE = 9;
+ public static final byte sid = 0x1f;
private final double field_1_value;
public NumberPtg(LittleEndianInput in) {
diff --git a/src/java/org/apache/poi/ss/formula/ptg/OperationPtg.java b/src/java/org/apache/poi/ss/formula/ptg/OperationPtg.java
index 4cfb68db91..111f58b4e6 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/OperationPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/OperationPtg.java
@@ -25,9 +25,9 @@ import java.util.function.Supplier;
* @author andy
*/
public abstract class OperationPtg extends Ptg {
- public final static int TYPE_UNARY = 0;
- public final static int TYPE_BINARY = 1;
- public final static int TYPE_FUNCTION = 2;
+ public static final int TYPE_UNARY = 0;
+ public static final int TYPE_BINARY = 1;
+ public static final int TYPE_FUNCTION = 2;
protected OperationPtg() {}
diff --git a/src/java/org/apache/poi/ss/formula/ptg/ParenthesisPtg.java b/src/java/org/apache/poi/ss/formula/ptg/ParenthesisPtg.java
index 11bbeb2970..050924088d 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/ParenthesisPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/ParenthesisPtg.java
@@ -29,8 +29,8 @@ import org.apache.poi.util.LittleEndianOutput;
*/
public final class ParenthesisPtg extends ControlPtg {
- private final static int SIZE = 1;
- public final static byte sid = 0x15;
+ private static final int SIZE = 1;
+ public static final byte sid = 0x15;
public static final ParenthesisPtg instance = new ParenthesisPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/PercentPtg.java b/src/java/org/apache/poi/ss/formula/ptg/PercentPtg.java
index 90d999790c..bf7eb0a152 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/PercentPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/PercentPtg.java
@@ -21,10 +21,10 @@ package org.apache.poi.ss.formula.ptg;
* Percent PTG.
*/
public final class PercentPtg extends ValueOperatorPtg {
- public final static int SIZE = 1;
- public final static byte sid = 0x14;
+ public static final int SIZE = 1;
+ public static final byte sid = 0x14;
- private final static String PERCENT = "%";
+ private static final String PERCENT = "%";
public static final PercentPtg instance = new PercentPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/PowerPtg.java b/src/java/org/apache/poi/ss/formula/ptg/PowerPtg.java
index f759abe493..05883c4c3a 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/PowerPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/PowerPtg.java
@@ -18,7 +18,7 @@
package org.apache.poi.ss.formula.ptg;
public final class PowerPtg extends ValueOperatorPtg {
- public final static byte sid = 0x07;
+ public static final byte sid = 0x07;
public static final PowerPtg instance = new PowerPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/RangePtg.java b/src/java/org/apache/poi/ss/formula/ptg/RangePtg.java
index 5c2d42a539..25b145a3cb 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/RangePtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/RangePtg.java
@@ -21,8 +21,8 @@ import org.apache.poi.util.LittleEndianOutput;
public final class RangePtg extends OperationPtg {
- public final static int SIZE = 1;
- public final static byte sid = 0x11;
+ public static final int SIZE = 1;
+ public static final byte sid = 0x11;
public static final RangePtg instance = new RangePtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/Ref2DPtgBase.java b/src/java/org/apache/poi/ss/formula/ptg/Ref2DPtgBase.java
index a34327dee4..911e2583ce 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/Ref2DPtgBase.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/Ref2DPtgBase.java
@@ -22,7 +22,7 @@ import org.apache.poi.util.LittleEndianInput;
import org.apache.poi.util.LittleEndianOutput;
abstract class Ref2DPtgBase extends RefPtgBase {
- private final static int SIZE = 5;
+ private static final int SIZE = 5;
protected Ref2DPtgBase(int row, int column, boolean isRowRelative, boolean isColumnRelative) {
setRow(row);
diff --git a/src/java/org/apache/poi/ss/formula/ptg/Ref3DPtg.java b/src/java/org/apache/poi/ss/formula/ptg/Ref3DPtg.java
index 654e57cf9b..7096921c43 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/Ref3DPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/Ref3DPtg.java
@@ -37,9 +37,9 @@ import org.apache.poi.util.LittleEndianOutput;
* is {@link Ref3DPxg}
*/
public final class Ref3DPtg extends RefPtgBase implements WorkbookDependentFormula, ExternSheetReferenceToken {
- public final static byte sid = 0x3a;
+ public static final byte sid = 0x3a;
- private final static int SIZE = 7; // 6 + 1 for Ptg
+ private static final int SIZE = 7; // 6 + 1 for Ptg
private int field_1_index_extern_sheet;
public Ref3DPtg(Ref3DPtg other) {
diff --git a/src/java/org/apache/poi/ss/formula/ptg/RefErrorPtg.java b/src/java/org/apache/poi/ss/formula/ptg/RefErrorPtg.java
index a3effafbf0..06c8489276 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/RefErrorPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/RefErrorPtg.java
@@ -30,8 +30,8 @@ import org.apache.poi.util.LittleEndianOutput;
*/
public final class RefErrorPtg extends OperandPtg {
- private final static int SIZE = 5;
- public final static byte sid = 0x2A;
+ private static final int SIZE = 5;
+ public static final byte sid = 0x2A;
private int field_1_reserved;
public RefErrorPtg() {
diff --git a/src/java/org/apache/poi/ss/formula/ptg/RefNPtg.java b/src/java/org/apache/poi/ss/formula/ptg/RefNPtg.java
index 4aa9f54801..c8e2b0a31e 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/RefNPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/RefNPtg.java
@@ -21,7 +21,7 @@ import org.apache.poi.ss.util.CellReference;
import org.apache.poi.util.LittleEndianInput;
public final class RefNPtg extends Ref2DPtgBase {
- public final static byte sid = 0x2C;
+ public static final byte sid = 0x2C;
public RefNPtg(LittleEndianInput in) {
super(in);
diff --git a/src/java/org/apache/poi/ss/formula/ptg/RefPtg.java b/src/java/org/apache/poi/ss/formula/ptg/RefPtg.java
index 668ba2b172..1068bb8fe0 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/RefPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/RefPtg.java
@@ -24,7 +24,7 @@ import org.apache.poi.util.LittleEndianInput;
* ReferencePtg - handles references (such as A1, A2, IA4)
*/
public final class RefPtg extends Ref2DPtgBase {
- public final static byte sid = 0x24;
+ public static final byte sid = 0x24;
/**
* Takes in a String representation of a cell reference and fills out the
diff --git a/src/java/org/apache/poi/ss/formula/ptg/StringPtg.java b/src/java/org/apache/poi/ss/formula/ptg/StringPtg.java
index 52e8ee388e..379ae2b72f 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/StringPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/StringPtg.java
@@ -30,7 +30,7 @@ import org.apache.poi.util.StringUtil;
* &lt;length 2 bytes&gt;char[]
*/
public final class StringPtg extends ScalarConstantPtg {
- public final static byte sid = 0x17;
+ public static final byte sid = 0x17;
/** the character (") used in formulas to delimit string literals */
private static final char FORMULA_DELIMITER = '"';
diff --git a/src/java/org/apache/poi/ss/formula/ptg/SubtractPtg.java b/src/java/org/apache/poi/ss/formula/ptg/SubtractPtg.java
index 591a47b565..d3e1f6e44b 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/SubtractPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/SubtractPtg.java
@@ -18,7 +18,7 @@
package org.apache.poi.ss.formula.ptg;
public final class SubtractPtg extends ValueOperatorPtg {
- public final static byte sid = 0x04;
+ public static final byte sid = 0x04;
public static final SubtractPtg instance = new SubtractPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/TblPtg.java b/src/java/org/apache/poi/ss/formula/ptg/TblPtg.java
index a4eec5a6bd..63a2aa759e 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/TblPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/TblPtg.java
@@ -39,8 +39,8 @@ import org.apache.poi.util.LittleEndianOutput;
* See page 811 of the june 08 binary docs.
*/
public final class TblPtg extends ControlPtg {
- private final static int SIZE = 5;
- public final static short sid = 0x02;
+ private static final int SIZE = 5;
+ public static final short sid = 0x02;
/** The row number of the upper left corner */
private final int field_1_first_row;
diff --git a/src/java/org/apache/poi/ss/formula/ptg/UnaryMinusPtg.java b/src/java/org/apache/poi/ss/formula/ptg/UnaryMinusPtg.java
index fa936b2cab..0deeb7a8ae 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/UnaryMinusPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/UnaryMinusPtg.java
@@ -21,9 +21,9 @@ package org.apache.poi.ss.formula.ptg;
* Unary Plus operator - does not have any effect on the operand
*/
public final class UnaryMinusPtg extends ValueOperatorPtg {
- public final static byte sid = 0x13;
+ public static final byte sid = 0x13;
- private final static String MINUS = "-";
+ private static final String MINUS = "-";
public static final UnaryMinusPtg instance = new UnaryMinusPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/UnaryPlusPtg.java b/src/java/org/apache/poi/ss/formula/ptg/UnaryPlusPtg.java
index 91cb9012ef..f1c1d96abd 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/UnaryPlusPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/UnaryPlusPtg.java
@@ -21,9 +21,9 @@ package org.apache.poi.ss.formula.ptg;
* Unary Plus operator - does not have any effect on the operand
*/
public final class UnaryPlusPtg extends ValueOperatorPtg {
- public final static byte sid = 0x12;
+ public static final byte sid = 0x12;
- private final static String ADD = "+";
+ private static final String ADD = "+";
public static final UnaryPlusPtg instance = new UnaryPlusPtg();
diff --git a/src/java/org/apache/poi/ss/formula/ptg/UnionPtg.java b/src/java/org/apache/poi/ss/formula/ptg/UnionPtg.java
index 2c1d770da6..da3175f56f 100644
--- a/src/java/org/apache/poi/ss/formula/ptg/UnionPtg.java
+++ b/src/java/org/apache/poi/ss/formula/ptg/UnionPtg.java
@@ -24,7 +24,7 @@ import org.apache.poi.util.LittleEndianOutput;
* @author Glen Stampoultzis (glens at apache.org)
*/
public final class UnionPtg extends OperationPtg {
- public final static byte sid = 0x10;
+ public static final byte sid = 0x10;
public static final UnionPtg instance = new UnionPtg();
diff --git a/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java b/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java
index 57dea18100..c430888178 100644
--- a/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java
+++ b/src/java/org/apache/poi/ss/usermodel/BuiltinFormats.java
@@ -67,7 +67,7 @@ public final class BuiltinFormats {
*/
public static final int FIRST_USER_DEFINED_FORMAT_INDEX = 164;
- private final static String[] _formats = {
+ private static final String[] _formats = {
"General",
"0",
"0.00",
diff --git a/src/java/org/apache/poi/ss/usermodel/DataFormatter.java b/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
index 10e989e5c5..a4c7e32637 100644
--- a/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
+++ b/src/java/org/apache/poi/ss/usermodel/DataFormatter.java
@@ -216,7 +216,7 @@ public class DataFormatter {
private final PropertyChangeSupport pcs;
/** For logging any problems we find */
- private static POILogger logger = POILogFactory.getLogger(DataFormatter.class);
+ private static final POILogger LOG = POILogFactory.getLogger(DataFormatter.class);
/**
* Creates a formatter using the {@link Locale#getDefault() default locale}.
@@ -337,7 +337,7 @@ public class DataFormatter {
// Wrap and return (non-cacheable - CellFormat does that)
return new CellFormatResultWrapper( cfmt.apply(cellValueO) );
} catch (Exception e) {
- logger.log(POILogger.WARN, "Formatting failed for format " + formatStr + ", falling back", e);
+ LOG.log(POILogger.WARN, "Formatting failed for format " + formatStr + ", falling back", e);
}
}
@@ -598,7 +598,7 @@ public class DataFormatter {
try {
return new ExcelStyleDateFormatter(formatStr, dateSymbols);
} catch(IllegalArgumentException iae) {
- logger.log(POILogger.DEBUG, "Formatting failed for format ", formatStr, ", falling back", iae);
+ LOG.log(POILogger.DEBUG, "Formatting failed for format ", formatStr, ", falling back", iae);
// the pattern could not be parsed correctly,
// so fall back to the default number format
return getDefaultFormat(cellValue);
@@ -758,7 +758,7 @@ public class DataFormatter {
try {
return new InternalDecimalFormatWithScale(format, symbols);
} catch(IllegalArgumentException iae) {
- logger.log(POILogger.DEBUG, "Formatting failed for format ", formatStr, ", falling back", iae);
+ LOG.log(POILogger.DEBUG, "Formatting failed for format ", formatStr, ", falling back", iae);
// the pattern could not be parsed correctly,
// so fall back to the default number format
return getDefaultFormat(cellValue);
diff --git a/src/java/org/apache/poi/ss/usermodel/FillPatternType.java b/src/java/org/apache/poi/ss/usermodel/FillPatternType.java
index 705fd6d4ea..0612c928cf 100644
--- a/src/java/org/apache/poi/ss/usermodel/FillPatternType.java
+++ b/src/java/org/apache/poi/ss/usermodel/FillPatternType.java
@@ -19,10 +19,10 @@ package org.apache.poi.ss.usermodel;
/**
* The enumeration value indicating the style of fill pattern being used for a cell format.
- *
+ *
*/
public enum FillPatternType {
-
+
/** No background */
NO_FILL(0),
@@ -79,18 +79,18 @@ public enum FillPatternType {
/** Least Dots */
LEAST_DOTS(18);
-
+
/** Codes are used by ExtendedFormatRecord in HSSF */
private final short code;
private FillPatternType(int code) {
this.code = (short) code;
}
-
+
public short getCode() {
return code;
}
-
- private final static int length = values().length;
+
+ private static final int length = values().length;
public static FillPatternType forInt(int code) {
if (code < 0 || code > length) {
throw new IllegalArgumentException("Invalid FillPatternType code: " + code);
diff --git a/src/java/org/apache/poi/ss/usermodel/IndexedColors.java b/src/java/org/apache/poi/ss/usermodel/IndexedColors.java
index bb5b911695..19053f1cc1 100644
--- a/src/java/org/apache/poi/ss/usermodel/IndexedColors.java
+++ b/src/java/org/apache/poi/ss/usermodel/IndexedColors.java
@@ -90,7 +90,7 @@ public enum IndexedColors {
GREY_80_PERCENT(63),
AUTOMATIC(64);
- private final static IndexedColors[] _values = new IndexedColors[65];
+ private static final IndexedColors[] _values = new IndexedColors[65];
static {
for (IndexedColors color : values()) {
_values[color.index] = color;
diff --git a/src/java/org/apache/poi/ss/usermodel/PatternFormatting.java b/src/java/org/apache/poi/ss/usermodel/PatternFormatting.java
index 8a328e571e..0eb0c589c7 100644
--- a/src/java/org/apache/poi/ss/usermodel/PatternFormatting.java
+++ b/src/java/org/apache/poi/ss/usermodel/PatternFormatting.java
@@ -24,43 +24,43 @@ package org.apache.poi.ss.usermodel;
*/
public interface PatternFormatting {
/** No background */
- public final static short NO_FILL = 0 ;
+ public static final short NO_FILL = 0 ;
/** Solidly filled */
- public final static short SOLID_FOREGROUND = 1 ;
+ public static final short SOLID_FOREGROUND = 1 ;
/** Small fine dots */
- public final static short FINE_DOTS = 2 ;
+ public static final short FINE_DOTS = 2 ;
/** Wide dots */
- public final static short ALT_BARS = 3 ;
+ public static final short ALT_BARS = 3 ;
/** Sparse dots */
- public final static short SPARSE_DOTS = 4 ;
+ public static final short SPARSE_DOTS = 4 ;
/** Thick horizontal bands */
- public final static short THICK_HORZ_BANDS = 5 ;
+ public static final short THICK_HORZ_BANDS = 5 ;
/** Thick vertical bands */
- public final static short THICK_VERT_BANDS = 6 ;
+ public static final short THICK_VERT_BANDS = 6 ;
/** Thick backward facing diagonals */
- public final static short THICK_BACKWARD_DIAG = 7 ;
+ public static final short THICK_BACKWARD_DIAG = 7 ;
/** Thick forward facing diagonals */
- public final static short THICK_FORWARD_DIAG = 8 ;
+ public static final short THICK_FORWARD_DIAG = 8 ;
/** Large spots */
- public final static short BIG_SPOTS = 9 ;
+ public static final short BIG_SPOTS = 9 ;
/** Brick-like layout */
- public final static short BRICKS = 10 ;
+ public static final short BRICKS = 10 ;
/** Thin horizontal bands */
- public final static short THIN_HORZ_BANDS = 11 ;
+ public static final short THIN_HORZ_BANDS = 11 ;
/** Thin vertical bands */
- public final static short THIN_VERT_BANDS = 12 ;
+ public static final short THIN_VERT_BANDS = 12 ;
/** Thin backward diagonal */
- public final static short THIN_BACKWARD_DIAG = 13 ;
+ public static final short THIN_BACKWARD_DIAG = 13 ;
/** Thin forward diagonal */
- public final static short THIN_FORWARD_DIAG = 14 ;
+ public static final short THIN_FORWARD_DIAG = 14 ;
/** Squares */
- public final static short SQUARES = 15 ;
+ public static final short SQUARES = 15 ;
/** Diamonds */
- public final static short DIAMONDS = 16 ;
+ public static final short DIAMONDS = 16 ;
/** Less Dots */
- public final static short LESS_DOTS = 17 ;
+ public static final short LESS_DOTS = 17 ;
/** Least Dots */
- public final static short LEAST_DOTS = 18 ;
+ public static final short LEAST_DOTS = 18 ;
short getFillBackgroundColor();
short getFillForegroundColor();
diff --git a/src/java/org/apache/poi/ss/util/DateFormatConverter.java b/src/java/org/apache/poi/ss/util/DateFormatConverter.java
index f8c7f338cf..deb4050daf 100644
--- a/src/java/org/apache/poi/ss/util/DateFormatConverter.java
+++ b/src/java/org/apache/poi/ss/util/DateFormatConverter.java
@@ -49,7 +49,7 @@ import org.apache.poi.util.POILogger;
*/
@SuppressWarnings("unused")
public final class DateFormatConverter {
- private static POILogger logger = POILogFactory.getLogger(DateFormatConverter.class);
+ private static final POILogger LOG = POILogFactory.getLogger(DateFormatConverter.class);
private DateFormatConverter() {
}
@@ -152,7 +152,7 @@ public final class DateFormatConverter {
loc = LocaleID.lookupByLanguageTag(languageTag.substring(0, idx));
}
if (loc == null) {
- logger.log( POILogger.ERROR, "Unable to find prefix for Locale '", languageTag, "' or its parent locales." );
+ LOG.log( POILogger.ERROR, "Unable to find prefix for Locale '", languageTag, "' or its parent locales." );
return "";
}
}
diff --git a/src/java/org/apache/poi/ss/util/ImageUtils.java b/src/java/org/apache/poi/ss/util/ImageUtils.java
index d1c3a5f982..8ab65b5813 100644
--- a/src/java/org/apache/poi/ss/util/ImageUtils.java
+++ b/src/java/org/apache/poi/ss/util/ImageUtils.java
@@ -45,7 +45,7 @@ import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
public final class ImageUtils {
- private static final POILogger logger = POILogFactory.getLogger(ImageUtils.class);
+ private static final POILogger LOG = POILogFactory.getLogger(ImageUtils.class);
private static final int WIDTH_UNITS = 1024;
private static final int HEIGHT_UNITS = 256;
@@ -93,18 +93,18 @@ public final class ImageUtils {
r.dispose();
}
} else {
- logger.log(POILogger.WARN, "ImageIO found no images");
+ LOG.log(POILogger.WARN, "ImageIO found no images");
}
}
} catch (IOException e) {
//silently return if ImageIO failed to read the image
- logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
}
break;
default:
- logger.log(POILogger.WARN, "Only JPEG, PNG and DIB pictures can be automatically sized");
+ LOG.log(POILogger.WARN, "Only JPEG, PNG and DIB pictures can be automatically sized");
}
return size;
}
diff --git a/src/java/org/apache/poi/util/Configurator.java b/src/java/org/apache/poi/util/Configurator.java
index 98595babbc..a8efb68e08 100644
--- a/src/java/org/apache/poi/util/Configurator.java
+++ b/src/java/org/apache/poi/util/Configurator.java
@@ -21,7 +21,7 @@ package org.apache.poi.util;
* Helper for fetching int values from system properties
*/
public class Configurator {
- private static POILogger logger = POILogFactory.getLogger(Configurator.class);
+ private static final POILogger LOG = POILogFactory.getLogger(Configurator.class);
public static int getIntValue(String systemProperty, int defaultValue) {
String property = System.getProperty(systemProperty);
@@ -31,7 +31,7 @@ public class Configurator {
try {
return Integer.parseInt(property);
} catch (Exception e) {
- logger.log(POILogger.ERROR, "System property -D", systemProperty, " does not contains a valid integer: ", property);
+ LOG.log(POILogger.ERROR, "System property -D", systemProperty, " does not contains a valid integer: ", property);
return defaultValue;
}
}
diff --git a/src/java/org/apache/poi/util/IOUtils.java b/src/java/org/apache/poi/util/IOUtils.java
index 26a720ab98..a578a2b004 100644
--- a/src/java/org/apache/poi/util/IOUtils.java
+++ b/src/java/org/apache/poi/util/IOUtils.java
@@ -37,7 +37,7 @@ import org.apache.poi.EmptyFileException;
@Internal
public final class IOUtils {
- private static final POILogger logger = POILogFactory.getLogger( IOUtils.class );
+ private static final POILogger LOG = POILogFactory.getLogger( IOUtils.class );
/**
* The default buffer size to use for the skip() methods.
@@ -395,7 +395,7 @@ public final class IOUtils {
try {
closeable.close();
} catch ( Exception exc ) {
- logger.log( POILogger.ERROR, "Unable to close resource: ", exc,
+ LOG.log( POILogger.ERROR, "Unable to close resource: ", exc,
exc );
}
}
diff --git a/src/java/org/apache/poi/util/XMLHelper.java b/src/java/org/apache/poi/util/XMLHelper.java
index 77d06b6430..72a7633a04 100644
--- a/src/java/org/apache/poi/util/XMLHelper.java
+++ b/src/java/org/apache/poi/util/XMLHelper.java
@@ -74,7 +74,7 @@ public final class XMLHelper {
};
- private static POILogger logger = POILogFactory.getLogger(XMLHelper.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XMLHelper.class);
private static long lastLog;
// DocumentBuilderFactory.newDocumentBuilder is thread-safe
@@ -290,7 +290,7 @@ public final class XMLHelper {
private static void logThrowable(Throwable t, String message, String name) {
if (System.currentTimeMillis() > lastLog + TimeUnit.MINUTES.toMillis(5)) {
- logger.log(POILogger.WARN, message + " [log suppressed for 5 minutes]", name, t);
+ LOG.log(POILogger.WARN, message + " [log suppressed for 5 minutes]", name, t);
lastLog = System.currentTimeMillis();
}
}
@@ -326,7 +326,7 @@ public final class XMLHelper {
':' + ex.getColumnNumber() +
':' + ex.getMessage();
- logger.log(type, message, ex);
+ LOG.log(type, message, ex);
}
}
diff --git a/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java b/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
index 49add44ceb..e1291fe6d9 100644
--- a/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
+++ b/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
@@ -52,7 +52,7 @@ import org.apache.poi.xwpf.usermodel.XWPFRelation;
* </p>
*/
public class POIXMLDocumentPart {
- private static final POILogger logger = POILogFactory.getLogger(POIXMLDocumentPart.class);
+ private static final POILogger LOG = POILogFactory.getLogger(POIXMLDocumentPart.class);
private String coreDocumentRel = PackageRelationshipTypes.CORE_DOCUMENT;
private PackagePart packagePart;
@@ -619,7 +619,7 @@ public class POIXMLDocumentPart {
PackagePart pp = getPackagePart();
if (pp.getContentType().equals(XWPFRelation.GLOSSARY_DOCUMENT.getContentType())) {
- logger.log(POILogger.WARN,
+ LOG.log(POILogger.WARN,
"POI does not currently support template.main+xml (glossary) parts. " +
"Skipping this part for now.");
return;
@@ -651,7 +651,7 @@ public class POIXMLDocumentPart {
final PackagePart p = packagePart.getPackage().getPart(relName);
if (p == null) {
- logger.log(POILogger.ERROR, "Skipped invalid entry ", rel.getTargetURI());
+ LOG.log(POILogger.ERROR, "Skipped invalid entry ", rel.getTargetURI());
continue;
}
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
index 292e016d1a..6a95fcee5f 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
@@ -70,7 +70,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
/**
* Logger.
*/
- private static final POILogger logger = POILogFactory.getLogger(OPCPackage.class);
+ private static final POILogger LOG = POILogFactory.getLogger(OPCPackage.class);
/**
* Default package access.
@@ -442,13 +442,13 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
}
if (this.packageAccess == PackageAccess.READ) {
- logger.log(POILogger.WARN,
+ LOG.log(POILogger.WARN,
"The close() method is intended to SAVE a package. This package is open in READ ONLY mode, use the revert() method instead !");
revert();
return;
}
if (this.contentTypeManager == null) {
- logger.log(POILogger.WARN,
+ LOG.log(POILogger.WARN,
"Unable to call close() on a package that hasn't been fully opened yet");
revert();
return;
@@ -748,7 +748,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
if (!hasCorePropertiesPart) {
hasCorePropertiesPart = true;
} else {
- logger.log(POILogger.WARN, "OPC Compliance error [M4.1]: " +
+ LOG.log(POILogger.WARN, "OPC Compliance error [M4.1]: " +
"there is more than one core properties relationship in the package! " +
"POI will use only the first, but other software may reject this file.");
}
@@ -772,7 +772,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
needCorePropertiesPart = false;
}
} catch (IOException ioe) {
- logger.log(POILogger.WARN, "Unmarshall operation : IOException for "
+ LOG.log(POILogger.WARN, "Unmarshall operation : IOException for "
+ part._partName);
continue;
} catch (InvalidOperationException invoe) {
@@ -1005,7 +1005,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
try {
sourcePartName = PackagingURIHelper.createPartName(sourceURI);
} catch (InvalidFormatException e) {
- logger
+ LOG
.log(POILogger.ERROR, "Part name URI '", sourceURI,
"' is not valid ! This message is not intended to be displayed !");
return;
@@ -1109,7 +1109,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
this.deletePartRecursive(targetPartName);
}
} catch (InvalidFormatException e) {
- logger.log(POILogger.WARN, "An exception occurs while deleting part '"
+ LOG.log(POILogger.WARN, "An exception occurs while deleting part '"
+ partName.getName()
+ "'. Some parts may remain in the package. - "
+ e.getMessage());
@@ -1397,7 +1397,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
try {
partMarshallers.put(new ContentType(contentType), marshaller);
} catch (InvalidFormatException e) {
- logger.log(POILogger.WARN, "The specified content type is not valid: '"
+ LOG.log(POILogger.WARN, "The specified content type is not valid: '"
+ e.getMessage() + "'. The marshaller will not be added !");
}
}
@@ -1415,7 +1415,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
try {
partUnmarshallers.put(new ContentType(contentType), unmarshaller);
} catch (InvalidFormatException e) {
- logger.log(POILogger.WARN, "The specified content type is not valid: '"
+ LOG.log(POILogger.WARN, "The specified content type is not valid: '"
+ e.getMessage()
+ "'. The unmarshaller will not be added !");
}
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
index 73dec957ed..53fb37246c 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackageRelationshipCollection.java
@@ -37,10 +37,9 @@ import org.w3c.dom.NodeList;
* @author Julien Chable, CDubettier
* @version 0.1
*/
-public final class PackageRelationshipCollection implements
- Iterable<PackageRelationship> {
+public final class PackageRelationshipCollection implements Iterable<PackageRelationship> {
- private final static POILogger logger = POILogFactory.getLogger(PackageRelationshipCollection.class);
+ private static final POILogger LOG = POILogFactory.getLogger(PackageRelationshipCollection.class);
/**
* Package relationships ordered by ID.
@@ -301,7 +300,7 @@ public final class PackageRelationshipCollection implements
public void parseRelationshipsPart(PackagePart relPart)
throws InvalidFormatException {
try {
- logger.log(POILogger.DEBUG, "Parsing relationship: ", relPart.getPartName());
+ LOG.log(POILogger.DEBUG, "Parsing relationship: ", relPart.getPartName());
Document xmlRelationshipsDoc = DocumentHelper.readDocument(relPart.getInputStream());
// Browse default types
@@ -349,7 +348,7 @@ public final class PackageRelationshipCollection implements
// package
target = PackagingURIHelper.toURI(value);
} catch (URISyntaxException e) {
- logger.log(POILogger.ERROR, "Cannot convert ", value,
+ LOG.log(POILogger.ERROR, "Cannot convert ", value,
" in a valid relationship URI-> dummy-URI used", e);
}
addRelationship(target, targetMode, type, id);
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java
index 7825ca8aab..32f8950b2f 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/PackagingURIHelper.java
@@ -38,7 +38,7 @@ public final class PackagingURIHelper {
// FIXME: this class implements a lot of path joining and splitting logic that
// is already implemented in java.nio.file.Path.
// This class should heavily leverage Java library code to reduce the number of lines of code that POI has to maintain and test
- private final static POILogger _logger = POILogFactory.getLogger(PackagingURIHelper.class);
+ private static final POILogger LOG = POILogFactory.getLogger(PackagingURIHelper.class);
/**
* Package root URI.
@@ -290,7 +290,7 @@ public final class PackagingURIHelper {
try {
targetURI = new URI(path.substring(1));
} catch (Exception e) {
- _logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
return null;
}
}
@@ -328,7 +328,7 @@ public final class PackagingURIHelper {
try {
return new URI(retVal.toString());
} catch (Exception e) {
- _logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
return null;
}
}
@@ -377,7 +377,7 @@ public final class PackagingURIHelper {
try {
return new URI(retVal.toString());
} catch (Exception e) {
- _logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
return null;
}
}
@@ -394,7 +394,7 @@ public final class PackagingURIHelper {
* <code>null</code>.
*/
public static URI relativizeURI(URI sourceURI, URI targetURI) {
- return relativizeURI(sourceURI, targetURI, false);
+ return relativizeURI(sourceURI, targetURI, false);
}
/**
@@ -754,7 +754,7 @@ public final class PackagingURIHelper {
return sb.toString();
}
- private final static char[] hexDigits = {
+ private static final char[] hexDigits = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java
index 2933a70ccf..2e186be949 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentType.java
@@ -71,16 +71,16 @@ public final class ContentType {
/**
* Media type compiled pattern, without parameters
*/
- private final static Pattern patternTypeSubType;
+ private static final Pattern patternTypeSubType;
/**
* Media type compiled pattern, with parameters.
*/
- private final static Pattern patternTypeSubTypeParams;
+ private static final Pattern patternTypeSubTypeParams;
/**
* Pattern to match on just the parameters part, to work
* around the Java Regexp group capture behaviour
*/
- private final static Pattern patternParams;
+ private static final Pattern patternParams;
static {
/*
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java
index aab394a73d..34e66326b5 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/PackagePropertiesPart.java
@@ -46,15 +46,15 @@ import org.apache.poi.util.LocaleUtil;
*/
public final class PackagePropertiesPart extends PackagePart implements PackageProperties {
- public final static String NAMESPACE_DC_URI = PackageProperties.NAMESPACE_DC;
+ public static final String NAMESPACE_DC_URI = PackageProperties.NAMESPACE_DC;
- public final static String NAMESPACE_CP_URI = PackageNamespaces.CORE_PROPERTIES;
+ public static final String NAMESPACE_CP_URI = PackageNamespaces.CORE_PROPERTIES;
- public final static String NAMESPACE_DCTERMS_URI = PackageProperties.NAMESPACE_DCTERMS;
+ public static final String NAMESPACE_DCTERMS_URI = PackageProperties.NAMESPACE_DCTERMS;
- private final static String DEFAULT_DATEFORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
+ private static final String DEFAULT_DATEFORMAT = "yyyy-MM-dd'T'HH:mm:ss'Z'";
- private final static String[] DATE_FORMATS = new String[]{
+ private static final String[] DATE_FORMATS = new String[]{
DEFAULT_DATEFORMAT,
"yyyy-MM-dd'T'HH:mm:ss.SS'Z'",
"yyyy-MM-dd"
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java
index 731a61d121..3040262ba3 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipContentTypeManager.java
@@ -38,7 +38,7 @@ import org.w3c.dom.Document;
* @see ContentTypeManager
*/
public class ZipContentTypeManager extends ContentTypeManager {
- private final static POILogger logger = POILogFactory.getLogger(ZipContentTypeManager.class);
+ private static final POILogger LOG = POILogFactory.getLogger(ZipContentTypeManager.class);
/**
* Delegate constructor to the super constructor.
@@ -71,7 +71,7 @@ public class ZipContentTypeManager extends ContentTypeManager {
zos.closeArchiveEntry();
}
} catch (IOException ioe) {
- logger.log(POILogger.ERROR, "Cannot write: ", CONTENT_TYPES_PART_NAME,
+ LOG.log(POILogger.ERROR, "Cannot write: ", CONTENT_TYPES_PART_NAME,
" in Zip !", ioe);
return false;
}
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java
index 0169909c9b..8208c545ad 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ZipHelper.java
@@ -43,7 +43,7 @@ public final class ZipHelper {
* Forward slash use to convert part name between OPC and zip item naming
* conventions.
*/
- private final static String FORWARD_SLASH = "/";
+ private static final String FORWARD_SLASH = "/";
/**
* Prevent this class to be instancied.
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/PackagePropertiesMarshaller.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/PackagePropertiesMarshaller.java
index 4e858067fe..459cbef831 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/PackagePropertiesMarshaller.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/PackagePropertiesMarshaller.java
@@ -34,13 +34,13 @@ import org.w3c.dom.Element;
* Package properties marshaller.
*/
public class PackagePropertiesMarshaller implements PartMarshaller {
- private final static NamespaceImpl namespaceDC =
+ private static final NamespaceImpl namespaceDC =
new NamespaceImpl("dc", PackagePropertiesPart.NAMESPACE_DC_URI);
- private final static NamespaceImpl namespaceCoreProperties =
+ private static final NamespaceImpl namespaceCoreProperties =
new NamespaceImpl("cp", PackagePropertiesPart.NAMESPACE_CP_URI);
- private final static NamespaceImpl namespaceDcTerms =
+ private static final NamespaceImpl namespaceDcTerms =
new NamespaceImpl("dcterms", PackagePropertiesPart.NAMESPACE_DCTERMS_URI);
- private final static NamespaceImpl namespaceXSI =
+ private static final NamespaceImpl namespaceXSI =
new NamespaceImpl("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
protected static final String KEYWORD_CATEGORY = "category";
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java
index c8b6b601a0..c1e058ea6d 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/ZipPartMarshaller.java
@@ -47,7 +47,7 @@ import org.w3c.dom.Element;
* Zip part marshaller. This marshaller is use to save any part in a zip stream.
*/
public final class ZipPartMarshaller implements PartMarshaller {
- private final static POILogger logger = POILogFactory.getLogger(ZipPartMarshaller.class);
+ private static final POILogger LOG = POILogFactory.getLogger(ZipPartMarshaller.class);
/**
* Save the specified part to the given stream.
@@ -64,7 +64,7 @@ public final class ZipPartMarshaller implements PartMarshaller {
public boolean marshall(PackagePart part, OutputStream os)
throws OpenXML4JException {
if (!(os instanceof ZipArchiveOutputStream)) {
- logger.log(POILogger.ERROR,"Unexpected class ", os.getClass().getName());
+ LOG.log(POILogger.ERROR,"Unexpected class ", os.getClass().getName());
throw new OpenXML4JException("ZipOutputStream expected !");
// Normally should happen only in development phase, so just throw
// exception
@@ -91,7 +91,7 @@ public final class ZipPartMarshaller implements PartMarshaller {
zos.closeArchiveEntry();
}
} catch (IOException ioe) {
- logger.log(POILogger.ERROR,"Cannot write: ", part.getPartName(), ": in ZIP",
+ LOG.log(POILogger.ERROR,"Cannot write: ", part.getPartName(), ": in ZIP",
ioe);
return false;
}
@@ -186,7 +186,7 @@ public final class ZipPartMarshaller implements PartMarshaller {
zos.closeArchiveEntry();
}
} catch (IOException e) {
- logger.log(POILogger.ERROR,"Cannot create zip entry ", relPartName, e);
+ LOG.log(POILogger.ERROR,"Cannot create zip entry ", relPartName, e);
return false;
}
}
diff --git a/src/ooxml/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java b/src/ooxml/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java
index d5dd4e2303..a2d900bf7d 100644
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/temp/EncryptedTempData.java
@@ -47,8 +47,8 @@ import org.apache.poi.util.TempFile;
public class EncryptedTempData {
private static POILogger LOG = POILogFactory.getLogger(EncryptedTempData.class);
- private final static CipherAlgorithm cipherAlgorithm = CipherAlgorithm.aes128;
- private final static String PADDING = "PKCS5Padding";
+ private static final CipherAlgorithm cipherAlgorithm = CipherAlgorithm.aes128;
+ private static final String PADDING = "PKCS5Padding";
private final SecretKeySpec skeySpec;
private final byte[] ivBytes;
private final File tempFile;
diff --git a/src/ooxml/java/org/apache/poi/poifs/crypt/temp/SheetDataWriterWithDecorator.java b/src/ooxml/java/org/apache/poi/poifs/crypt/temp/SheetDataWriterWithDecorator.java
index 08163ead9f..ea6a0519aa 100644
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/temp/SheetDataWriterWithDecorator.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/temp/SheetDataWriterWithDecorator.java
@@ -39,14 +39,14 @@ import org.apache.poi.xssf.streaming.SheetDataWriter;
@Beta
public class SheetDataWriterWithDecorator extends SheetDataWriter {
- final static CipherAlgorithm cipherAlgorithm = CipherAlgorithm.aes128;
+ static final CipherAlgorithm cipherAlgorithm = CipherAlgorithm.aes128;
SecretKeySpec skeySpec;
byte[] ivBytes;
-
+
public SheetDataWriterWithDecorator() throws IOException {
super();
}
-
+
void init() {
if(skeySpec == null) {
SecureRandom sr = new SecureRandom();
@@ -64,7 +64,7 @@ public class SheetDataWriterWithDecorator extends SheetDataWriter {
Cipher ciEnc = CryptoFunctions.getCipher(skeySpec, cipherAlgorithm, ChainingMode.cbc, ivBytes, Cipher.ENCRYPT_MODE, "PKCS5Padding");
return new CipherOutputStream(fos, ciEnc);
}
-
+
@Override
protected InputStream decorateInputStream(FileInputStream fis) {
Cipher ciDec = CryptoFunctions.getCipher(skeySpec, cipherAlgorithm, ChainingMode.cbc, ivBytes, Cipher.DECRYPT_MODE, "PKCS5Padding");
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/BlackWhiteMode.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/BlackWhiteMode.java
index 683bc0a10e..9767064fe4 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/BlackWhiteMode.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/BlackWhiteMode.java
@@ -33,7 +33,7 @@ public enum BlackWhiteMode {
this.underlying = mode;
}
- private final static HashMap<STBlackWhiteMode.Enum, BlackWhiteMode> reverse = new HashMap<>();
+ private static final HashMap<STBlackWhiteMode.Enum, BlackWhiteMode> reverse = new HashMap<>();
static {
for (BlackWhiteMode value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/CompoundLine.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/CompoundLine.java
index 2ab6e109fb..b241e44a6a 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/CompoundLine.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/CompoundLine.java
@@ -34,7 +34,7 @@ public enum CompoundLine {
this.underlying = line;
}
- private final static HashMap<STCompoundLine.Enum, CompoundLine> reverse = new HashMap<>();
+ private static final HashMap<STCompoundLine.Enum, CompoundLine> reverse = new HashMap<>();
static {
for (CompoundLine value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/LineCap.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/LineCap.java
index 1585d39e7a..f8885bc81c 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/LineCap.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/LineCap.java
@@ -32,7 +32,7 @@ public enum LineCap {
this.underlying = line;
}
- private final static HashMap<STLineCap.Enum, LineCap> reverse = new HashMap<>();
+ private static final HashMap<STLineCap.Enum, LineCap> reverse = new HashMap<>();
static {
for (LineCap value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndLength.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndLength.java
index 8a6ecc25de..aed43f85f3 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndLength.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndLength.java
@@ -32,7 +32,7 @@ public enum LineEndLength {
this.underlying = lineEnd;
}
- private final static HashMap<STLineEndLength.Enum, LineEndLength> reverse = new HashMap<>();
+ private static final HashMap<STLineEndLength.Enum, LineEndLength> reverse = new HashMap<>();
static {
for (LineEndLength value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndType.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndType.java
index f2cbd3ceb9..e3e03580ea 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndType.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndType.java
@@ -35,7 +35,7 @@ public enum LineEndType {
this.underlying = lineEnd;
}
- private final static HashMap<STLineEndType.Enum, LineEndType> reverse = new HashMap<>();
+ private static final HashMap<STLineEndType.Enum, LineEndType> reverse = new HashMap<>();
static {
for (LineEndType value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndWidth.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndWidth.java
index 937dd269ab..096d358c4b 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndWidth.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/LineEndWidth.java
@@ -32,7 +32,7 @@ public enum LineEndWidth {
this.underlying = lineEnd;
}
- private final static HashMap<STLineEndWidth.Enum, LineEndWidth> reverse = new HashMap<>();
+ private static final HashMap<STLineEndWidth.Enum, LineEndWidth> reverse = new HashMap<>();
static {
for (LineEndWidth value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/PathShadeType.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/PathShadeType.java
index ba98d42883..4ab3cf1f04 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/PathShadeType.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/PathShadeType.java
@@ -32,7 +32,7 @@ public enum PathShadeType {
this.underlying = pathShadeType;
}
- private final static HashMap<STPathShadeType.Enum, PathShadeType> reverse = new HashMap<>();
+ private static final HashMap<STPathShadeType.Enum, PathShadeType> reverse = new HashMap<>();
static {
for (PathShadeType value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/PenAlignment.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/PenAlignment.java
index d0c43df903..1414564ed0 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/PenAlignment.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/PenAlignment.java
@@ -31,7 +31,7 @@ public enum PenAlignment {
this.underlying = alignment;
}
- private final static HashMap<STPenAlignment.Enum, PenAlignment> reverse = new HashMap<>();
+ private static final HashMap<STPenAlignment.Enum, PenAlignment> reverse = new HashMap<>();
static {
for (PenAlignment value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetColor.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetColor.java
index 0bf1f41260..1adccfedfb 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetColor.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetColor.java
@@ -167,7 +167,7 @@ public enum PresetColor {
this.underlying = color;
}
- private final static HashMap<STPresetColorVal.Enum, PresetColor> reverse = new HashMap<>();
+ private static final HashMap<STPresetColorVal.Enum, PresetColor> reverse = new HashMap<>();
static {
for (PresetColor value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetGeometry.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetGeometry.java
index ae853e8ae1..8e0e466288 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetGeometry.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetGeometry.java
@@ -217,7 +217,7 @@ public enum PresetGeometry {
this.underlying = shape;
}
- private final static HashMap<STShapeType.Enum, PresetGeometry> reverse = new HashMap<>();
+ private static final HashMap<STShapeType.Enum, PresetGeometry> reverse = new HashMap<>();
static {
for (PresetGeometry value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetLineDash.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetLineDash.java
index 4802896577..5febf1aa9f 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetLineDash.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetLineDash.java
@@ -40,7 +40,7 @@ public enum PresetLineDash {
this.underlying = dash;
}
- private final static HashMap<STPresetLineDashVal.Enum, PresetLineDash> reverse = new HashMap<>();
+ private static final HashMap<STPresetLineDashVal.Enum, PresetLineDash> reverse = new HashMap<>();
static {
for (PresetLineDash value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetPattern.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetPattern.java
index 5a30599841..fe54fa5f17 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetPattern.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/PresetPattern.java
@@ -83,7 +83,7 @@ public enum PresetPattern {
this.underlying = pattern;
}
- private final static HashMap<STPresetPatternVal.Enum, PresetPattern> reverse = new HashMap<>();
+ private static final HashMap<STPresetPatternVal.Enum, PresetPattern> reverse = new HashMap<>();
static {
for (PresetPattern value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/RectangleAlignment.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/RectangleAlignment.java
index 8667915ba9..9020a448d6 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/RectangleAlignment.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/RectangleAlignment.java
@@ -38,7 +38,7 @@ public enum RectangleAlignment {
this.underlying = alignment;
}
- private final static HashMap<STRectAlignment.Enum, RectangleAlignment> reverse = new HashMap<>();
+ private static final HashMap<STRectAlignment.Enum, RectangleAlignment> reverse = new HashMap<>();
static {
for (RectangleAlignment value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/SchemeColor.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/SchemeColor.java
index 1119e699f1..ce574c74a8 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/SchemeColor.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/SchemeColor.java
@@ -46,7 +46,7 @@ public enum SchemeColor {
this.underlying = color;
}
- private final static HashMap<STSchemeColorVal.Enum, SchemeColor> reverse = new HashMap<>();
+ private static final HashMap<STSchemeColorVal.Enum, SchemeColor> reverse = new HashMap<>();
static {
for (SchemeColor value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/SystemColor.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/SystemColor.java
index 1b293e6570..ecb075d9de 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/SystemColor.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/SystemColor.java
@@ -59,7 +59,7 @@ public enum SystemColor {
this.underlying = color;
}
- private final static HashMap<STSystemColorVal.Enum, SystemColor> reverse = new HashMap<>();
+ private static final HashMap<STSystemColorVal.Enum, SystemColor> reverse = new HashMap<>();
static {
for (SystemColor value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/TileFlipMode.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/TileFlipMode.java
index 5f29c4e625..f540459856 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/TileFlipMode.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/TileFlipMode.java
@@ -33,7 +33,7 @@ public enum TileFlipMode {
this.underlying = mode;
}
- private final static HashMap<STTileFlipMode.Enum, TileFlipMode> reverse = new HashMap<>();
+ private static final HashMap<STTileFlipMode.Enum, TileFlipMode> reverse = new HashMap<>();
static {
for (TileFlipMode value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrossBetween.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrossBetween.java
index a25a892f86..cd509cb9ce 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrossBetween.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrossBetween.java
@@ -31,7 +31,7 @@ public enum AxisCrossBetween {
this.underlying = crossBetween;
}
- private final static HashMap<STCrossBetween.Enum, AxisCrossBetween> reverse = new HashMap<>();
+ private static final HashMap<STCrossBetween.Enum, AxisCrossBetween> reverse = new HashMap<>();
static {
for (AxisCrossBetween value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrosses.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrosses.java
index 39193a85a6..772a671ebc 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrosses.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisCrosses.java
@@ -32,7 +32,7 @@ public enum AxisCrosses {
this.underlying = crosses;
}
- private final static HashMap<STCrosses.Enum, AxisCrosses> reverse = new HashMap<>();
+ private static final HashMap<STCrosses.Enum, AxisCrosses> reverse = new HashMap<>();
static {
for (AxisCrosses value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisLabelAlignment.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisLabelAlignment.java
index 69054b5630..7be31ce03c 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisLabelAlignment.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisLabelAlignment.java
@@ -32,7 +32,7 @@ public enum AxisLabelAlignment {
this.underlying = alignment;
}
- private final static HashMap<STLblAlgn.Enum, AxisLabelAlignment> reverse = new HashMap<>();
+ private static final HashMap<STLblAlgn.Enum, AxisLabelAlignment> reverse = new HashMap<>();
static {
for (AxisLabelAlignment value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisOrientation.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisOrientation.java
index fda40ad2cf..cb83f084a4 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisOrientation.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisOrientation.java
@@ -31,7 +31,7 @@ public enum AxisOrientation {
this.underlying = orientation;
}
- private final static HashMap<STOrientation.Enum, AxisOrientation> reverse = new HashMap<>();
+ private static final HashMap<STOrientation.Enum, AxisOrientation> reverse = new HashMap<>();
static {
for (AxisOrientation value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisPosition.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisPosition.java
index 115e1f0532..c601836e3e 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisPosition.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisPosition.java
@@ -33,7 +33,7 @@ public enum AxisPosition {
this.underlying = position;
}
- private final static HashMap<STAxPos.Enum, AxisPosition> reverse = new HashMap<>();
+ private static final HashMap<STAxPos.Enum, AxisPosition> reverse = new HashMap<>();
static {
for (AxisPosition value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickLabelPosition.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickLabelPosition.java
index 16d383ff9a..2d5823d000 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickLabelPosition.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickLabelPosition.java
@@ -33,7 +33,7 @@ public enum AxisTickLabelPosition {
this.underlying = position;
}
- private final static HashMap<STTickLblPos.Enum, AxisTickLabelPosition> reverse = new HashMap<>();
+ private static final HashMap<STTickLblPos.Enum, AxisTickLabelPosition> reverse = new HashMap<>();
static {
for (AxisTickLabelPosition value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickMark.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickMark.java
index 557e4edd9c..457cc34f96 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickMark.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/AxisTickMark.java
@@ -33,7 +33,7 @@ public enum AxisTickMark {
this.underlying = tickMark;
}
- private final static HashMap<STTickMark.Enum, AxisTickMark> reverse = new HashMap<>();
+ private static final HashMap<STTickMark.Enum, AxisTickMark> reverse = new HashMap<>();
static {
for (AxisTickMark value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarDirection.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarDirection.java
index ad0e9b58bd..c3d0747617 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarDirection.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarDirection.java
@@ -31,7 +31,7 @@ public enum BarDirection {
this.underlying = direction;
}
- private final static HashMap<STBarDir.Enum, BarDirection> reverse = new HashMap<>();
+ private static final HashMap<STBarDir.Enum, BarDirection> reverse = new HashMap<>();
static {
for (BarDirection value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarGrouping.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarGrouping.java
index d7deda11f6..bb606fde33 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarGrouping.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/BarGrouping.java
@@ -33,7 +33,7 @@ public enum BarGrouping {
this.underlying = grouping;
}
- private final static HashMap<STBarGrouping.Enum, BarGrouping> reverse = new HashMap<>();
+ private static final HashMap<STBarGrouping.Enum, BarGrouping> reverse = new HashMap<>();
static {
for (BarGrouping value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/DisplayBlanks.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/DisplayBlanks.java
index 0d8bbbfb03..043bf21b11 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/DisplayBlanks.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/DisplayBlanks.java
@@ -32,7 +32,7 @@ public enum DisplayBlanks {
this.underlying = mode;
}
- private final static HashMap<STDispBlanksAs.Enum, DisplayBlanks> reverse = new HashMap<>();
+ private static final HashMap<STDispBlanksAs.Enum, DisplayBlanks> reverse = new HashMap<>();
static {
for (DisplayBlanks value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorBarType.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorBarType.java
index c97fc8d9b6..f90e43185d 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorBarType.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorBarType.java
@@ -32,7 +32,7 @@ public enum ErrorBarType {
this.underlying = barType;
}
- private final static HashMap<STErrBarType.Enum, ErrorBarType> reverse = new HashMap<>();
+ private static final HashMap<STErrBarType.Enum, ErrorBarType> reverse = new HashMap<>();
static {
for (ErrorBarType value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorDirection.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorDirection.java
index 479b4ad5b2..bd06b4bfdb 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorDirection.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorDirection.java
@@ -31,7 +31,7 @@ public enum ErrorDirection {
this.underlying = direction;
}
- private final static HashMap<STErrDir.Enum, ErrorDirection> reverse = new HashMap<>();
+ private static final HashMap<STErrDir.Enum, ErrorDirection> reverse = new HashMap<>();
static {
for (ErrorDirection value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorValueType.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorValueType.java
index 8414c8b043..f46bdb363b 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorValueType.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ErrorValueType.java
@@ -34,7 +34,7 @@ public enum ErrorValueType {
this.underlying = valueType;
}
- private final static HashMap<STErrValType.Enum, ErrorValueType> reverse = new HashMap<>();
+ private static final HashMap<STErrValType.Enum, ErrorValueType> reverse = new HashMap<>();
static {
for (ErrorValueType value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Grouping.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Grouping.java
index 9549c8755d..516477343e 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Grouping.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Grouping.java
@@ -32,7 +32,7 @@ public enum Grouping {
this.underlying = grouping;
}
- private final static HashMap<STGrouping.Enum, Grouping> reverse = new HashMap<STGrouping.Enum, Grouping>();
+ private static final HashMap<STGrouping.Enum, Grouping> reverse = new HashMap<STGrouping.Enum, Grouping>();
static {
for (Grouping value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutMode.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutMode.java
index 7eeb0e80ad..425dd2202e 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutMode.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutMode.java
@@ -31,7 +31,7 @@ public enum LayoutMode {
this.underlying = layoutMode;
}
- private final static HashMap<STLayoutMode.Enum, LayoutMode> reverse = new HashMap<>();
+ private static final HashMap<STLayoutMode.Enum, LayoutMode> reverse = new HashMap<>();
static {
for (LayoutMode value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutTarget.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutTarget.java
index c9d84e78cb..1ed359f6df 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutTarget.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LayoutTarget.java
@@ -31,7 +31,7 @@ public enum LayoutTarget {
this.underlying = layoutTarget;
}
- private final static HashMap<STLayoutTarget.Enum, LayoutTarget> reverse = new HashMap<>();
+ private static final HashMap<STLayoutTarget.Enum, LayoutTarget> reverse = new HashMap<>();
static {
for (LayoutTarget value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LegendPosition.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LegendPosition.java
index 43ef49da9b..88f67cd001 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LegendPosition.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/LegendPosition.java
@@ -34,7 +34,7 @@ public enum LegendPosition {
this.underlying = position;
}
- private final static HashMap<STLegendPos.Enum, LegendPosition> reverse = new HashMap<>();
+ private static final HashMap<STLegendPos.Enum, LegendPosition> reverse = new HashMap<>();
static {
for (LegendPosition value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/MarkerStyle.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/MarkerStyle.java
index 62a03cd1a7..3d6724720f 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/MarkerStyle.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/MarkerStyle.java
@@ -40,7 +40,7 @@ public enum MarkerStyle {
this.underlying = style;
}
- private final static HashMap<STMarkerStyle.Enum, MarkerStyle> reverse = new HashMap<>();
+ private static final HashMap<STMarkerStyle.Enum, MarkerStyle> reverse = new HashMap<>();
static {
for (MarkerStyle value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/RadarStyle.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/RadarStyle.java
index ab118c48d8..6b8d9854b6 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/RadarStyle.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/RadarStyle.java
@@ -32,7 +32,7 @@ public enum RadarStyle {
this.underlying = style;
}
- private final static HashMap<STRadarStyle.Enum, RadarStyle> reverse = new HashMap<>();
+ private static final HashMap<STRadarStyle.Enum, RadarStyle> reverse = new HashMap<>();
static {
for (RadarStyle value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ScatterStyle.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ScatterStyle.java
index 836105d183..29b986cfd8 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ScatterStyle.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/ScatterStyle.java
@@ -35,7 +35,7 @@ public enum ScatterStyle {
this.underlying = style;
}
- private final static HashMap<STScatterStyle.Enum, ScatterStyle> reverse = new HashMap<>();
+ private static final HashMap<STScatterStyle.Enum, ScatterStyle> reverse = new HashMap<>();
static {
for (ScatterStyle value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Shape.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Shape.java
index 2150290b16..ad9ea25931 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Shape.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/chart/Shape.java
@@ -35,7 +35,7 @@ public enum Shape {
this.underlying = grouping;
}
- private final static HashMap<STShape.Enum, Shape> reverse = new HashMap<>();
+ private static final HashMap<STShape.Enum, Shape> reverse = new HashMap<>();
static {
for (Shape value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/AnchorType.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/AnchorType.java
index 1f0888539d..43575a6c4f 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/AnchorType.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/AnchorType.java
@@ -34,7 +34,7 @@ public enum AnchorType {
this.underlying = caps;
}
- private final static HashMap<STTextAnchoringType.Enum, AnchorType> reverse = new HashMap<>();
+ private static final HashMap<STTextAnchoringType.Enum, AnchorType> reverse = new HashMap<>();
static {
for (AnchorType value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/AutonumberScheme.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/AutonumberScheme.java
index a882bd36e9..71eb95aac5 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/AutonumberScheme.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/AutonumberScheme.java
@@ -70,7 +70,7 @@ public enum AutonumberScheme {
this.underlying = scheme;
}
- private final static HashMap<STTextAutonumberScheme.Enum, AutonumberScheme> reverse = new HashMap<>();
+ private static final HashMap<STTextAutonumberScheme.Enum, AutonumberScheme> reverse = new HashMap<>();
static {
for (AutonumberScheme value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/CapsType.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/CapsType.java
index a419736f30..b6dc261095 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/CapsType.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/CapsType.java
@@ -32,7 +32,7 @@ public enum CapsType {
this.underlying = caps;
}
- private final static HashMap<STTextCapsType.Enum, CapsType> reverse = new HashMap<>();
+ private static final HashMap<STTextCapsType.Enum, CapsType> reverse = new HashMap<>();
static {
for (CapsType value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/FontAlignment.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/FontAlignment.java
index 7a0dd2bf1d..79327f769e 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/FontAlignment.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/FontAlignment.java
@@ -34,7 +34,7 @@ public enum FontAlignment {
this.underlying = align;
}
- private final static HashMap<STTextFontAlignType.Enum, FontAlignment> reverse = new HashMap<>();
+ private static final HashMap<STTextFontAlignType.Enum, FontAlignment> reverse = new HashMap<>();
static {
for (FontAlignment value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/StrikeType.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/StrikeType.java
index 17aa3f25a4..68544ec032 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/StrikeType.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/StrikeType.java
@@ -32,7 +32,7 @@ public enum StrikeType {
this.underlying = strike;
}
- private final static HashMap<STTextStrikeType.Enum, StrikeType> reverse = new HashMap<>();
+ private static final HashMap<STTextStrikeType.Enum, StrikeType> reverse = new HashMap<>();
static {
for (StrikeType value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/TabAlignment.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/TabAlignment.java
index 974a321cf6..d3a8e768f9 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/TabAlignment.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/TabAlignment.java
@@ -33,7 +33,7 @@ public enum TabAlignment {
this.underlying = align;
}
- private final static HashMap<STTextTabAlignType.Enum, TabAlignment> reverse = new HashMap<>();
+ private static final HashMap<STTextTabAlignType.Enum, TabAlignment> reverse = new HashMap<>();
static {
for (TabAlignment value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/TextAlignment.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/TextAlignment.java
index 8b173ff019..67f0a88e3d 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/TextAlignment.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/TextAlignment.java
@@ -36,7 +36,7 @@ public enum TextAlignment {
this.underlying = align;
}
- private final static HashMap<STTextAlignType.Enum, TextAlignment> reverse = new HashMap<>();
+ private static final HashMap<STTextAlignType.Enum, TextAlignment> reverse = new HashMap<>();
static {
for (TextAlignment value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/UnderlineType.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/UnderlineType.java
index e70a20929a..453ce20d35 100644
--- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/UnderlineType.java
+++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/UnderlineType.java
@@ -47,7 +47,7 @@ public enum UnderlineType {
this.underlying = underline;
}
- private final static HashMap<STTextUnderlineType.Enum, UnderlineType> reverse = new HashMap<>();
+ private static final HashMap<STTextUnderlineType.Enum, UnderlineType> reverse = new HashMap<>();
static {
for (UnderlineType value : values()) {
reverse.put(value.underlying, value);
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java
index 095659a153..0838d4e929 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFGroupShape.java
@@ -56,7 +56,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTShape;
@Beta
public class XSLFGroupShape extends XSLFShape
implements XSLFShapeContainer, GroupShape<XSLFShape,XSLFTextParagraph> {
- private final static POILogger _logger = POILogFactory.getLogger(XSLFGroupShape.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSLFGroupShape.class);
private final List<XSLFShape> _shapes;
private final CTGroupShapeProperties _grpSpPr;
@@ -396,7 +396,7 @@ implements XSLFShapeContainer, GroupShape<XSLFShape,XSLFTextParagraph> {
} else if (shape instanceof XSLFTable) {
newShape = createTable();
} else {
- _logger.log(POILogger.WARN, "copying of class "+shape.getClass()+" not supported.");
+ LOG.log(POILogger.WARN, "copying of class "+shape.getClass()+" not supported.");
continue;
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
index 919f68554d..f7ed872f45 100644
--- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
+++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
@@ -48,7 +48,7 @@ import org.xml.sax.helpers.DefaultHandler;
* you need to implement for reading information from a file.
*/
public class XSSFSheetXMLHandler extends DefaultHandler {
- private static final POILogger logger = POILogFactory.getLogger(XSSFSheetXMLHandler.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFSheetXMLHandler.class);
/**
* These are the different kinds of cells we support.
@@ -63,7 +63,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
SST_STRING,
NUMBER,
}
-
+
/**
* Table with the styles used for formatting
*/
@@ -136,7 +136,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
this.formatter = dataFormatter;
init(comments);
}
-
+
/**
* Accepts objects needed while parsing.
*
@@ -151,7 +151,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
boolean formulasNotResults) {
this(styles, null, strings, sheetContentsHandler, dataFormatter, formulasNotResults);
}
-
+
/**
* Accepts objects needed while parsing.
*
@@ -165,7 +165,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
boolean formulasNotResults) {
this(styles, strings, sheetContentsHandler, new DataFormatter(), formulasNotResults);
}
-
+
private void init(Comments commentsTable) {
if (commentsTable != null) {
commentCellRefs = new LinkedList<>();
@@ -191,7 +191,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
// It isn't a text tag
return false;
}
-
+
@Override
@SuppressWarnings("unused")
public void startElement(String uri, String localName, String qName,
@@ -211,29 +211,29 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
} else if ("f".equals(localName)) {
// Clear contents cache
formula.setLength(0);
-
+
// Mark us as being a formula if not already
if(nextDataType == xssfDataType.NUMBER) {
nextDataType = xssfDataType.FORMULA;
}
-
+
// Decide where to get the formula string from
String type = attributes.getValue("t");
if(type != null && type.equals("shared")) {
// Is it the one that defines the shared, or uses it?
String ref = attributes.getValue("ref");
String si = attributes.getValue("si");
-
+
if(ref != null) {
// This one defines it
// TODO Save it somewhere
fIsOpen = true;
} else {
// This one uses a shared formula
- // TODO Retrieve the shared formula and tweak it to
+ // TODO Retrieve the shared formula and tweak it to
// match the current cell
if(formulasNotResults) {
- logger.log(POILogger.WARN, "shared formulas not yet supported!");
+ LOG.log(POILogger.WARN, "shared formulas not yet supported!");
} /*else {
// It's a shared formula, so we can't get at the formula string yet
// However, they don't care about the formula string, so that's ok!
@@ -312,7 +312,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
// v => contents of a cell
if (isTextTag(localName)) {
vIsOpen = false;
-
+
// Process the value contents as required, now we have it all
switch (nextDataType) {
case BOOLEAN:
@@ -329,7 +329,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
thisStr = formula.toString();
} else {
String fv = value.toString();
-
+
if (this.formatString != null) {
try {
// Try to use the value as a formattable number
@@ -360,7 +360,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
thisStr = rtss.toString();
}
catch (NumberFormatException ex) {
- logger.log(POILogger.ERROR, "Failed to parse SST index '", sstIndex, ex);
+ LOG.log(POILogger.ERROR, "Failed to parse SST index '", sstIndex, ex);
}
break;
@@ -376,11 +376,11 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
thisStr = "(TODO: Unexpected type: " + nextDataType + ")";
break;
}
-
+
// Do we have a comment for this cell?
checkForEmptyCellComments(EmptyCellCommentsCheckType.CELL);
XSSFComment comment = comments != null ? comments.findCellComment(new CellAddress(cellRef)) : null;
-
+
// Output
output.cell(cellRef, thisStr, comment);
} else if ("f".equals(localName)) {
@@ -390,10 +390,10 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
} else if ("row".equals(localName)) {
// Handle any "missing" cells which had comments attached
checkForEmptyCellComments(EmptyCellCommentsCheckType.END_OF_ROW);
-
+
// Finish up the row
output.endRow(rowNum);
-
+
// some sheets do not have rowNum set in the XML, Excel can read them so we should try to read them as well
nextRowNum = rowNum + 1;
} else if ("sheetData".equals(localName)) {
@@ -432,7 +432,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
headerFooter.append(ch, start, length);
}
}
-
+
/**
* Do a check for, and output, comments in otherwise empty cells.
*/
@@ -496,7 +496,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
XSSFComment comment = comments.findCellComment(cellRef);
output.cell(cellRef.formatAsString(), null, comment);
}
-
+
private enum EmptyCellCommentsCheckType {
CELL,
END_OF_ROW,
@@ -520,7 +520,7 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
void endRow(int rowNum);
/**
- * A cell, with the given formatted value (may be null),
+ * A cell, with the given formatted value (may be null),
* and possibly a comment (may be null), was encountered.
*
* Sheets that have missing or empty cells may result in
diff --git a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java
index 7c0a71c8e4..0295c3b707 100644
--- a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java
+++ b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFImportFromXML.java
@@ -70,7 +70,7 @@ public class XSSFImportFromXML {
private final XSSFMap _map;
- private static final POILogger logger = POILogFactory.getLogger(XSSFImportFromXML.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFImportFromXML.class);
public XSSFImportFromXML(XSSFMap map) {
_map = map;
@@ -109,9 +109,9 @@ public class XSSFImportFromXML {
// result can be null if value is optional (xsd:minOccurs=0), see bugzilla 55864
if (result != null) {
String textContent = result.getTextContent();
- logger.log(POILogger.DEBUG, "Extracting with xpath " + xpathString + " : value is '" + textContent + "'");
+ LOG.log(POILogger.DEBUG, "Extracting with xpath " + xpathString + " : value is '" + textContent + "'");
XSSFCell cell = singleXmlCell.getReferencedCell();
- logger.log(POILogger.DEBUG, "Setting '" + textContent + "' to cell " + cell.getColumnIndex() + "-" + cell.getRowIndex() + " in sheet "
+ LOG.log(POILogger.DEBUG, "Setting '" + textContent + "' to cell " + cell.getColumnIndex() + "-" + cell.getRowIndex() + " in sheet "
+ cell.getSheet().getSheetName());
setCellValue(textContent, cell, xmlDataType);
}
@@ -147,7 +147,7 @@ public class XSSFImportFromXML {
// TODO: convert the data to the cell format
String value = (String) xpath.evaluate(localXPath, singleNode, XPathConstants.STRING);
- logger.log(POILogger.DEBUG, "Extracting with xpath " + localXPath + " : value is '" + value + "'");
+ LOG.log(POILogger.DEBUG, "Extracting with xpath " + localXPath + " : value is '" + value + "'");
XSSFRow row = table.getXSSFSheet().getRow(rowId);
if (row == null) {
row = table.getXSSFSheet().createRow(rowId);
@@ -157,7 +157,7 @@ public class XSSFImportFromXML {
if (cell == null) {
cell = row.createCell(columnId);
}
- logger.log(POILogger.DEBUG, "Setting '" + value + "' to cell " + cell.getColumnIndex() + "-" + cell.getRowIndex() + " in sheet "
+ LOG.log(POILogger.DEBUG, "Setting '" + value + "' to cell " + cell.getColumnIndex() + "-" + cell.getRowIndex() + " in sheet "
+ table.getXSSFSheet().getSheetName());
setCellValue(value, cell, xmlColumnPr.getXmlDataType());
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java
index 7dbf4d2f11..e3c66fa089 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/DeferredSXSSFWorkbook.java
@@ -32,25 +32,25 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
/**
* An variant of SXSSFWorkbook that avoids generating a temporary file and writes data directly to
* the provided OutputStream.
- *
+ *
* This variant is experimental and APIs may change at short notice.
- *
+ *
* @since 5.0.0
*/
@Beta
public class DeferredSXSSFWorkbook extends SXSSFWorkbook {
- private static final POILogger logger = POILogFactory.getLogger(DeferredSXSSFWorkbook.class);
-
+ private static final POILogger LOG = POILogFactory.getLogger(DeferredSXSSFWorkbook.class);
+
public DeferredSXSSFWorkbook() {
this(null);
}
public DeferredSXSSFWorkbook(int rowAccessWindowSize) { this(null, rowAccessWindowSize); }
-
+
public DeferredSXSSFWorkbook(XSSFWorkbook workbook) {
this(workbook, SXSSFWorkbook.DEFAULT_WINDOW_SIZE);
}
-
+
public DeferredSXSSFWorkbook(XSSFWorkbook workbook, int rowAccessWindowSize) {
super(workbook, rowAccessWindowSize, false, false);
}
@@ -60,11 +60,11 @@ public class DeferredSXSSFWorkbook extends SXSSFWorkbook {
protected SheetDataWriter createSheetDataWriter() throws IOException {
throw new RuntimeException("Not supported by DeferredSXSSFWorkbook");
}
-
+
protected StreamingSheetWriter createSheetDataWriter(OutputStream out) throws IOException {
return new StreamingSheetWriter(out);
}
-
+
@Override
protected ISheetInjector createSheetInjector(SXSSFSheet sxSheet) throws IOException {
DeferredSXSSFSheet ssxSheet = (DeferredSXSSFSheet) sxSheet;
@@ -72,7 +72,7 @@ public class DeferredSXSSFWorkbook extends SXSSFWorkbook {
ssxSheet.writeRows(output);
};
}
-
+
@Override
SXSSFSheet createAndRegisterSXSSFSheet(XSSFSheet xSheet) {
final DeferredSXSSFSheet sxSheet;
@@ -84,15 +84,15 @@ public class DeferredSXSSFWorkbook extends SXSSFWorkbook {
registerSheetMapping(sxSheet, xSheet);
return sxSheet;
}
-
+
public DeferredSXSSFSheet createSheet() {
return (DeferredSXSSFSheet) super.createSheet();
}
-
+
public DeferredSXSSFSheet createSheet(String sheetname) {
return (DeferredSXSSFSheet) super.createSheet(sheetname);
}
-
+
/**
* Returns an iterator of the sheets in the workbook in sheet order. Includes hidden and very hidden sheets.
*
@@ -102,7 +102,7 @@ public class DeferredSXSSFWorkbook extends SXSSFWorkbook {
public Iterator<Sheet> sheetIterator() {
return new SheetIterator<>();
}
-
+
/**
* Gets the sheet at the given index for streaming.
*
@@ -118,11 +118,11 @@ public class DeferredSXSSFWorkbook extends SXSSFWorkbook {
return (DeferredSXSSFSheet) sxSheet;
}
}
-
+
public XSSFSheet getXSSFSheet(String name) {
return _wb.getSheet(name);
}
-
+
/**
* Gets sheet with the given name for streaming.
*
@@ -138,7 +138,7 @@ public class DeferredSXSSFWorkbook extends SXSSFWorkbook {
return sxSheet;
}
}
-
+
/**
* Removes sheet at the given index
*
@@ -149,19 +149,19 @@ public class DeferredSXSSFWorkbook extends SXSSFWorkbook {
// Get the sheet to be removed
XSSFSheet xSheet = _wb.getSheetAt(index);
SXSSFSheet sxSheet = getSXSSFSheet(xSheet);
-
+
// De-register it
_wb.removeSheetAt(index);
-
+
// The sheet may not be a streaming sheet and is not mapped
if (sxSheet != null) {
deregisterSheetMapping(xSheet);
-
+
// Clean up temporary resources
try {
sxSheet.dispose();
} catch (IOException e) {
- logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
}
}
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java
index a4b0e2e303..707b8ba365 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFCreationHelper.java
@@ -37,11 +37,11 @@ import org.apache.poi.xssf.usermodel.XSSFRichTextString;
* regular XSSF Workbook
*/
public class SXSSFCreationHelper implements CreationHelper {
- private static final POILogger logger = POILogFactory.getLogger(SXSSFCreationHelper.class);
-
+ private static final POILogger LOG = POILogFactory.getLogger(SXSSFCreationHelper.class);
+
private final SXSSFWorkbook wb;
private final XSSFCreationHelper helper;
-
+
/**
* Should only be called by {@link SXSSFWorkbook#getCreationHelper()}
*
@@ -55,7 +55,7 @@ public class SXSSFCreationHelper implements CreationHelper {
@Override
public XSSFRichTextString createRichTextString(String text) {
- logger.log(POILogger.INFO, "SXSSF doesn't support Rich Text Strings, any formatting information will be lost");
+ LOG.log(POILogger.INFO, "SXSSF doesn't support Rich Text Strings, any formatting information will be lost");
return new XSSFRichTextString(text);
}
@@ -81,7 +81,7 @@ public class SXSSFCreationHelper implements CreationHelper {
public ClientAnchor createClientAnchor() {
return helper.createClientAnchor();
}
-
+
/**
* {@inheritDoc}
*/
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java
index 7b8526d7e0..a846b48458 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFFormulaEvaluator.java
@@ -30,14 +30,14 @@ import org.apache.poi.util.POILogger;
import org.apache.poi.xssf.usermodel.BaseXSSFFormulaEvaluator;
/**
- * Streaming-specific Formula Evaluator, which is able to
+ * Streaming-specific Formula Evaluator, which is able to
* lookup cells within the current Window.
*/
public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator {
- private static final POILogger logger = POILogFactory.getLogger(SXSSFFormulaEvaluator.class);
-
- private SXSSFWorkbook wb;
-
+ private static final POILogger LOG = POILogFactory.getLogger(SXSSFFormulaEvaluator.class);
+
+ private final SXSSFWorkbook wb;
+
public SXSSFFormulaEvaluator(SXSSFWorkbook workbook) {
this(workbook, null, null);
}
@@ -48,7 +48,7 @@ public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator {
super(bookEvaluator);
this.wb = workbook;
}
-
+
/**
* @param stabilityClassifier used to optimise caching performance. Pass <code>null</code>
* for the (conservative) assumption that any cell may have its definition changed after
@@ -81,12 +81,12 @@ public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator {
return new SXSSFEvaluationCell((SXSSFCell)cell);
}
-
+
@Override
public SXSSFCell evaluateInCell(Cell cell) {
return (SXSSFCell) super.evaluateInCell(cell);
}
-
+
/**
* For active worksheets only, will loop over rows and
* cells, evaluating formula cells there.
@@ -95,26 +95,26 @@ public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator {
*/
public static void evaluateAllFormulaCells(SXSSFWorkbook wb, boolean skipOutOfWindow) {
SXSSFFormulaEvaluator eval = new SXSSFFormulaEvaluator(wb);
-
+
// Check they're all available
for (Sheet sheet : wb) {
if (((SXSSFSheet)sheet).areAllRowsFlushed()) {
throw new SheetsFlushedException();
}
}
-
+
// Process the sheets as best we can
for (Sheet sheet : wb) {
-
+
if (sheet instanceof SXSSFSheet) {
// Check if any rows have already been flushed out
int lastFlushedRowNum = ((SXSSFSheet) sheet).getLastFlushedRowNum();
if (lastFlushedRowNum > -1) {
if (! skipOutOfWindow) throw new RowFlushedException(0);
- logger.log(POILogger.INFO, "Rows up to ", lastFlushedRowNum, " have already been flushed, skipping");
+ LOG.log(POILogger.INFO, "Rows up to ", lastFlushedRowNum, " have already been flushed, skipping");
}
}
-
+
// Evaluate what we have
for (Row r : sheet) {
for (Cell c : r) {
@@ -125,7 +125,7 @@ public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator {
}
}
}
-
+
/**
* Loops over rows and cells, evaluating formula cells there.
* If any sheets are inactive, or any cells outside of the window,
@@ -137,7 +137,7 @@ public final class SXSSFFormulaEvaluator extends BaseXSSFFormulaEvaluator {
// Have the evaluation done, with exceptions
evaluateAllFormulaCells(wb, false);
}
-
+
public static class SheetsFlushedException extends IllegalStateException {
protected SheetsFlushedException() {
super("One or more sheets have been flushed, cannot evaluate all cells");
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFPicture.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFPicture.java
index 23a43dc342..6711d82860 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFPicture.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFPicture.java
@@ -50,7 +50,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCol;
* The main change is to access the rows in the SXSSF sheet, not the always empty rows in the XSSF sheet when checking the row heights.
*/
public final class SXSSFPicture implements Picture {
- private static final POILogger logger = POILogFactory.getLogger(SXSSFPicture.class);
+ private static final POILogger LOG = POILogFactory.getLogger(SXSSFPicture.class);
/**
* Column width measured as the number of characters of the maximum digit width of the
* numbers 0, 1, 2, ..., 9 as rendered in the normal style's font. There are 4 pixels of margin
@@ -58,7 +58,7 @@ public final class SXSSFPicture implements Picture {
*
* This value is the same for default font in Office 2007 (Calibri) and Office 2003 and earlier (Arial)
*/
- private static float DEFAULT_COLUMN_WIDTH = 9.140625f;
+ private static final float DEFAULT_COLUMN_WIDTH = 9.140625f;
private final SXSSFWorkbook _wb;
private final XSSFPicture _picture;
@@ -109,7 +109,7 @@ public final class SXSSFPicture implements Picture {
XSSFClientAnchor anchor = getClientAnchor();
XSSFClientAnchor pref = getPreferredSize(scale);
if (anchor == null || pref == null) {
- logger.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
+ LOG.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
return;
}
@@ -144,7 +144,7 @@ public final class SXSSFPicture implements Picture {
public XSSFClientAnchor getPreferredSize(double scale){
XSSFClientAnchor anchor = getClientAnchor();
if (anchor == null) {
- logger.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
+ LOG.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
return null;
}
@@ -222,7 +222,7 @@ public final class SXSSFPicture implements Picture {
return ImageUtils.getImageDimension(part.getInputStream(), type);
} catch (IOException e){
//return a "singulariry" if ImageIO failed to read the image
- logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
return new Dimension();
}
}
@@ -266,7 +266,7 @@ public final class SXSSFPicture implements Picture {
XSSFAnchor a = getAnchor();
return (a instanceof XSSFClientAnchor) ? (XSSFClientAnchor)a : null;
}
-
+
public XSSFDrawing getDrawing() {
return _picture.getDrawing();
}
@@ -300,7 +300,7 @@ public final class SXSSFPicture implements Picture {
public void setFillColor(int red, int green, int blue) {
_picture.setFillColor(red, green, blue);
}
-
+
@Override
public void setLineStyleColor( int red, int green, int blue ) {
_picture.setLineStyleColor(red, green, blue);
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
index 19734b5b9a..42fc9c0584 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java
@@ -102,7 +102,7 @@ public class SXSSFWorkbook implements Workbook {
* via {@link SXSSFSheet#getRow} anymore.
*/
public static final int DEFAULT_WINDOW_SIZE = 100;
- private static final POILogger logger = POILogFactory.getLogger(SXSSFWorkbook.class);
+ private static final POILogger LOG = POILogFactory.getLogger(SXSSFWorkbook.class);
protected final XSSFWorkbook _wb;
@@ -839,7 +839,7 @@ public class SXSSFWorkbook implements Workbook {
try {
sxSheet.dispose();
} catch (IOException e) {
- logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
}
}
@@ -935,7 +935,7 @@ public class SXSSFWorkbook implements Workbook {
SheetDataWriter _writer = sheet.getSheetDataWriter();
if (_writer != null) _writer.close();
} catch (IOException e) {
- logger.log(POILogger.WARN,
+ LOG.log(POILogger.WARN,
"An exception occurred while closing sheet data writer for sheet "
+ sheet.getSheetName() + ".", e);
}
@@ -998,7 +998,7 @@ public class SXSSFWorkbook implements Workbook {
try {
success = sheet.dispose() && success;
} catch (IOException e) {
- logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
success = false;
}
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java
index d6594d4e87..67dbd3dc71 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java
@@ -52,7 +52,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.STCellType;
* so that it was renamed to "SheetDataWriter"
*/
public class SheetDataWriter implements Closeable {
- private static final POILogger logger = POILogFactory.getLogger(SheetDataWriter.class);
+ private static final POILogger LOG = POILogFactory.getLogger(SheetDataWriter.class);
private final File _fd;
protected final Writer _out;
@@ -186,7 +186,7 @@ public class SheetDataWriter implements Closeable {
@Override
protected void finalize() throws Throwable {
if (_fd.exists() && !_fd.delete()) {
- logger.log(POILogger.ERROR, "Can't delete temporary encryption file: ", _fd);
+ LOG.log(POILogger.ERROR, "Can't delete temporary encryption file: ", _fd);
}
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java b/src/ooxml/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java
index c4f6471219..065f585b54 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/StreamingSheetWriter.java
@@ -36,46 +36,46 @@ import org.apache.poi.util.POILogger;
*/
@Beta
public class StreamingSheetWriter extends SheetDataWriter {
- private static final POILogger logger = POILogFactory.getLogger(StreamingSheetWriter.class);
-
+ private static final POILogger LOG = POILogFactory.getLogger(StreamingSheetWriter.class);
+
public StreamingSheetWriter() throws IOException {
throw new RuntimeException("StreamingSheetWriter requires OutputStream");
}
-
+
public StreamingSheetWriter(OutputStream out) throws IOException {
super(createWriter(out));
- logger.log(POILogger.DEBUG, "Preparing SSXSSF sheet writer");
+ LOG.log(POILogger.DEBUG, "Preparing SSXSSF sheet writer");
}
-
+
@Override
public File createTempFile() throws IOException {
throw new RuntimeException("Not supported with StreamingSheetWriter");
}
-
+
@Override
public Writer createWriter(File fd) throws IOException {
throw new RuntimeException("Not supported with StreamingSheetWriter");
}
-
+
/**
* Create a writer for the sheet data.
- *
+ *
* @param out the output stream to write to
*/
protected static Writer createWriter(OutputStream out) throws IOException {
return new BufferedWriter(new OutputStreamWriter(out, "UTF-8"));
}
-
+
@Override
public void close() throws IOException {
_out.flush();
}
-
+
@Override
public InputStream getWorksheetXMLInputStream() throws IOException {
throw new RuntimeException("Not supported with StreamingSheetWriter");
}
-
+
@Override
boolean dispose() throws IOException {
_out.close();
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
index bd39bc0359..1055d6bccc 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
@@ -46,7 +46,7 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTPictureNo
* @author Yegor Kozlov
*/
public final class XSSFPicture extends XSSFShape implements Picture {
- private static final POILogger logger = POILogFactory.getLogger(XSSFPicture.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFPicture.class);
/**
* Column width measured as the number of characters of the maximum digit width of the
@@ -154,7 +154,7 @@ public final class XSSFPicture extends XSSFShape implements Picture {
public void resize(double scale) {
resize(scale, scale);
}
-
+
/**
* Resize the image relatively to its current size.
* <p>
@@ -166,7 +166,7 @@ public final class XSSFPicture extends XSSFShape implements Picture {
* <code>resize(1.0,1.0)</code> keeps the original size,<br>
* <code>resize(0.5,0.5)</code> resize to 50% of the original,<br>
* <code>resize(2.0,2.0)</code> resizes to 200% of the original.<br>
- * <code>resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE})</code> resizes to the dimension of the embedded image.
+ * <code>resize({@link Double#MAX_VALUE},{@link Double#MAX_VALUE})</code> resizes to the dimension of the embedded image.
* </p>
*
* @param scaleX the amount by which the image width is multiplied relative to the original width,
@@ -178,7 +178,7 @@ public final class XSSFPicture extends XSSFShape implements Picture {
XSSFClientAnchor anchor = getClientAnchor();
XSSFClientAnchor pref = getPreferredSize(scaleX,scaleY);
if (anchor == null || pref == null) {
- logger.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
+ LOG.log(POILogger.WARN, "picture is not anchored via client anchor - ignoring resize call");
return;
}
@@ -212,7 +212,7 @@ public final class XSSFPicture extends XSSFShape implements Picture {
public XSSFClientAnchor getPreferredSize(double scale){
return getPreferredSize(scale, scale);
}
-
+
/**
* Calculate the preferred size for this picture.
*
@@ -242,7 +242,7 @@ public final class XSSFPicture extends XSSFShape implements Picture {
return ImageUtils.getImageDimension(part.getInputStream(), type);
} catch (IOException e){
//return a "singulariry" if ImageIO failed to read the image
- logger.log(POILogger.WARN, e);
+ LOG.log(POILogger.WARN, e);
return new Dimension();
}
}
@@ -256,7 +256,7 @@ public final class XSSFPicture extends XSSFShape implements Picture {
XSSFPictureData picData = getPictureData();
return getImageDimension(picData.getPackagePart(), picData.getPictureType());
}
-
+
/**
* Return picture data for this shape
*
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
index aa964a4394..2e285dc747 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
@@ -45,8 +45,6 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRow;
* High level representation of a row of a spreadsheet.
*/
public class XSSFRow implements Row, Comparable<XSSFRow> {
- //private static final POILogger _logger = POILogFactory.getLogger(XSSFRow.class);
-
/**
* the xml bean containing all cell definitions for this row
*/
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
index abaca3a5cf..b93f165885 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -103,7 +103,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.*;
* </p>
*/
public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
- private static final POILogger logger = POILogFactory.getLogger(XSSFSheet.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFSheet.class);
private static final double DEFAULT_ROW_HEIGHT = 15.0;
private static final double DEFAULT_MARGIN_HEADER = 0.3;
@@ -556,7 +556,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
break;
}
}
- logger.log(POILogger.ERROR, "Can't find drawing with id=", ctDrawing.getId(), " in the list of the sheet's relationships");
+ LOG.log(POILogger.ERROR, "Can't find drawing with id=", ctDrawing.getId(), " in the list of the sheet's relationships");
}
return null;
}
@@ -628,7 +628,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
}
}
if(drawing == null){
- logger.log(POILogger.ERROR, "Can't find VML drawing with id=", id, " in the list of the sheet's relationships");
+ LOG.log(POILogger.ERROR, "Can't find VML drawing with id=", id, " in the list of the sheet's relationships");
}
}
return drawing;
@@ -4676,12 +4676,12 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
}
coo = coos.getOleObjectArray(0);
} catch (XmlException e) {
- logger.log(POILogger.INFO, "can't parse CTOleObjects", e);
+ LOG.log(POILogger.INFO, "can't parse CTOleObjects", e);
} finally {
try {
reader.close();
} catch (XMLStreamException e) {
- logger.log(POILogger.INFO, "can't close reader", e);
+ LOG.log(POILogger.INFO, "can't close reader", e);
}
}
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java
index 74652b9f68..b51a92d5c3 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTableStyle.java
@@ -41,7 +41,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTTableStyleElement;
* Also used for built-in styles via dummy XML generated from presetTableStyles.xml.
*/
public class XSSFTableStyle implements TableStyle {
- private static final POILogger logger = POILogFactory.getLogger(XSSFTableStyle.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFTableStyle.class);
private final String name;
private final int index;
@@ -57,7 +57,7 @@ public class XSSFTableStyle implements TableStyle {
public XSSFTableStyle(int index, CTDxfs dxfs, CTTableStyle tableStyle, IndexedColorMap colorMap) {
this.name = tableStyle.getName();
this.index = index;
-
+
List<CTDxf> dxfList = new ArrayList<>();
// CT* classes don't handle "mc:AlternateContent" elements, so get the Dxf instances manually
@@ -79,7 +79,7 @@ public class XSSFTableStyle implements TableStyle {
}
if (dxf != null) dxfList.add(dxf);
} catch (XmlException e) {
- logger.log(POILogger.WARN, "Error parsing XSSFTableStyle", e);
+ LOG.log(POILogger.WARN, "Error parsing XSSFTableStyle", e);
}
}
}
@@ -98,7 +98,7 @@ public class XSSFTableStyle implements TableStyle {
elementMap.put(type, dstyle);
}
}
-
+
public String getName() {
return name;
}
@@ -106,16 +106,16 @@ public class XSSFTableStyle implements TableStyle {
public int getIndex() {
return index;
}
-
+
/**
* Always false for these, these are user defined styles
*/
public boolean isBuiltin() {
return false;
}
-
+
public DifferentialStyleProvider getStyle(TableStyleType type) {
return elementMap.get(type);
}
-
+
} \ No newline at end of file
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
index f60c8a9d84..e390bca2ca 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
@@ -214,7 +214,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
*/
private List<XSSFPictureData> pictures;
- private static final POILogger logger = POILogFactory.getLogger(XSSFWorkbook.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFWorkbook.class);
/**
* cached instance of XSSFCreationHelper for this workbook
@@ -415,7 +415,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
for (CTExternalReference er : this.workbook.getExternalReferences().getExternalReferenceArray()) {
ExternalLinksTable el = elIdMap.get(er.getId());
if(el == null) {
- logger.log(POILogger.WARN, "ExternalLinksTable with r:id ", er.getId(), " was defined, but didn't exist in package, skipping");
+ LOG.log(POILogger.WARN, "ExternalLinksTable with r:id ", er.getId(), " was defined, but didn't exist in package, skipping");
continue;
}
externalLinks.add(el);
@@ -436,7 +436,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
public void parseSheet(Map<String, XSSFSheet> shIdMap, CTSheet ctSheet) {
XSSFSheet sh = shIdMap.get(ctSheet.getId());
if(sh == null) {
- logger.log(POILogger.WARN, "Sheet with name ", ctSheet.getName(), " and r:id ",
+ LOG.log(POILogger.WARN, "Sheet with name ", ctSheet.getName(), " and r:id ",
ctSheet.getId(), " was defined, but didn't exist in package, skipping");
return;
}
@@ -649,11 +649,11 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Date1904Su
}
CTWorksheet ct = clonedSheet.getCTWorksheet();
if(ct.isSetLegacyDrawing()) {
- logger.log(POILogger.WARN, "Cloning sheets with comments is not yet supported.");
+ LOG.log(POILogger.WARN, "Cloning sheets with comments is not yet supported.");
ct.unsetLegacyDrawing();
}
if (ct.isSetPageSetup()) {
- logger.log(POILogger.WARN, "Cloning sheets with page setup is not yet supported.");
+ LOG.log(POILogger.WARN, "Cloning sheets with page setup is not yet supported.");
ct.unsetPageSetup();
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFColumnShifter.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFColumnShifter.java
index 8f8a712000..8532c8b022 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFColumnShifter.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFColumnShifter.java
@@ -33,7 +33,7 @@ import org.apache.poi.xssf.usermodel.XSSFSheet;
// {@link org.apache.poi.hssf.usermodel.helpers.HSSFColumnShifter}
@Beta
public final class XSSFColumnShifter extends ColumnShifter {
- private static final POILogger logger = POILogFactory.getLogger(XSSFColumnShifter.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFColumnShifter.class);
public XSSFColumnShifter(XSSFSheet sh) {
super(sh);
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java
index 81db9bc52c..b15910bc9c 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowColShifter.java
@@ -42,7 +42,7 @@ import java.util.List;
*/
@Internal
/*private*/ final class XSSFRowColShifter {
- private static final POILogger logger = POILogFactory.getLogger(XSSFRowColShifter.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFRowColShifter.class);
private XSSFRowColShifter() { /*no instances for static classes*/}
@@ -151,7 +151,7 @@ import java.util.List;
return shiftedFmla;
} catch (FormulaParseException fpe) {
// Log, but don't change, rather than breaking
- logger.log(POILogger.WARN, "Error shifting formula on row ", row.getRowNum(), fpe);
+ LOG.log(POILogger.WARN, "Error shifting formula on row ", row.getRowNum(), fpe);
return formula;
}
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java
index d7628bcf42..4de9c60625 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java
@@ -31,7 +31,7 @@ import org.apache.poi.xssf.usermodel.XSSFSheet;
// non-Javadoc: When possible, code should be implemented in the RowShifter abstract class to avoid duplication with
// {@link org.apache.poi.hssf.usermodel.helpers.HSSFRowShifter}
public final class XSSFRowShifter extends RowShifter {
- private static final POILogger logger = POILogFactory.getLogger(XSSFRowShifter.class);
+ private static final POILogger LOG = POILogFactory.getLogger(XSSFRowShifter.class);
public XSSFRowShifter(XSSFSheet sh) {
super(sh);
@@ -45,7 +45,7 @@ public final class XSSFRowShifter extends RowShifter {
public void updateFormulas(FormulaShifter formulaShifter) {
XSSFRowColShifter.updateFormulas(sheet, formulaShifter);
}
-
+
/**
* Update the formulas in specified row using the formula shifting policy specified by shifter
*
diff --git a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java
index 2b24c2e5f3..8e97627336 100644
--- a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java
+++ b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestListParts.java
@@ -32,7 +32,7 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public final class TestListParts {
- private static final POILogger logger = POILogFactory.getLogger(TestListParts.class);
+ private static final POILogger LOG = POILogFactory.getLogger(TestListParts.class);
private TreeMap<PackagePartName, String> expectedValues;
@@ -91,7 +91,7 @@ public final class TestListParts {
for (PackagePart part : p.getParts()) {
values.put(part.getPartName(), part.getContentType());
- logger.log(POILogger.DEBUG, part.getPartName());
+ LOG.log(POILogger.DEBUG, part.getPartName());
}
// Compare expected values with values return by the package
diff --git a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java
index 2e6df39dc4..07e9a17d21 100644
--- a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java
+++ b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackage.java
@@ -98,7 +98,7 @@ import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
public final class TestPackage {
- private static final POILogger logger = POILogFactory.getLogger(TestPackage.class);
+ private static final POILogger LOG = POILogFactory.getLogger(TestPackage.class);
private static final String NS_OOXML_WP_MAIN = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
private static final String CONTENT_EXT_PROPS = "application/vnd.openxmlformats-officedocument.extended-properties+xml";
private static final POIDataSamples xlsSamples = POIDataSamples.getSpreadSheetInstance();
@@ -444,7 +444,7 @@ public final class TestPackage {
for (PackagePart part : p.getParts()) {
values.put(part.getPartName(), part.getContentType());
- logger.log(POILogger.DEBUG, part.getPartName());
+ LOG.log(POILogger.DEBUG, part.getPartName());
}
// Compare expected values with values return by the package
@@ -478,7 +478,7 @@ public final class TestPackage {
for (PackagePart part : p.getParts()) {
values.put(part.getPartName(), part.getContentType());
- logger.log(POILogger.DEBUG, part.getPartName());
+ LOG.log(POILogger.DEBUG, part.getPartName());
}
// Compare expected values with values return by the package
diff --git a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestRelationships.java b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestRelationships.java
index 28e1941f89..38c13780b2 100644
--- a/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestRelationships.java
+++ b/src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestRelationships.java
@@ -44,7 +44,7 @@ class TestRelationships {
private static final String SHEET_WITH_COMMENTS =
"/xl/worksheets/sheet1.xml";
- private static final POILogger logger = POILogFactory.getLogger(TestPackageCoreProperties.class);
+ private static final POILogger LOG = POILogFactory.getLogger(TestPackageCoreProperties.class);
/**
* Test relationships are correctly loaded. This at the moment fails (as of r499)
@@ -56,7 +56,7 @@ class TestRelationships {
void testLoadRelationships() throws Exception {
InputStream is = openSampleStream("sample.xlsx");
try (OPCPackage pkg = OPCPackage.open(is)) {
- logger.log(POILogger.DEBUG, "1: " + pkg);
+ LOG.log(POILogger.DEBUG, "1: " + pkg);
PackageRelationshipCollection rels = pkg.getRelationshipsByType(PackageRelationshipTypes.CORE_DOCUMENT);
PackageRelationship coreDocRelationship = rels.getRelationship(0);
PackagePart corePart = pkg.getPart(coreDocRelationship);
diff --git a/src/ooxml/testcases/org/apache/poi/sl/tests/draw/TestDrawPictureShape.java b/src/ooxml/testcases/org/apache/poi/sl/tests/draw/TestDrawPictureShape.java
index 0baa8a25e7..9f5568c4c4 100644
--- a/src/ooxml/testcases/org/apache/poi/sl/tests/draw/TestDrawPictureShape.java
+++ b/src/ooxml/testcases/org/apache/poi/sl/tests/draw/TestDrawPictureShape.java
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
class TestDrawPictureShape {
- final static POIDataSamples ssSamples = POIDataSamples.getSlideShowInstance();
+ static final POIDataSamples ssSamples = POIDataSamples.getSlideShowInstance();
private static boolean xslfOnly;
diff --git a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java
index d848ed8e65..749a8faeca 100644
--- a/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java
+++ b/src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextParagraph.java
@@ -38,12 +38,7 @@ import org.apache.poi.sl.usermodel.TextParagraph.TextAlign;
import org.apache.poi.xslf.XSLFTestDataSamples;
import org.junit.jupiter.api.Test;
-/**
- * @author Yegor Kozlov
- */
class TestXSLFTextParagraph {
- // private static POILogger _logger = POILogFactory.getLogger(XSLFTextParagraph.class);
-
static class DrawTextParagraphProxy extends DrawTextParagraph {
DrawTextParagraphProxy(XSLFTextParagraph p) {
super(p);
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestAutoSizeColumnTracker.java b/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestAutoSizeColumnTracker.java
index 6d977db3da..f7161fd0e9 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestAutoSizeColumnTracker.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/streaming/TestAutoSizeColumnTracker.java
@@ -59,8 +59,8 @@ class TestAutoSizeColumnTracker {
_columns.add(3);
columns = Collections.unmodifiableSortedSet(_columns);
}
- private final static String SHORT_MESSAGE = "short";
- private final static String LONG_MESSAGE = "This is a test of a long message! This is a test of a long message!";
+ private static final String SHORT_MESSAGE = "short";
+ private static final String LONG_MESSAGE = "This is a test of a long message! This is a test of a long message!";
@BeforeEach
void setUpSheetAndWorkbook() {
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
index 6e81707be2..3d820ccb52 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestFormulaEvaluatorOnXSSF.java
@@ -58,7 +58,7 @@ import org.junit.jupiter.params.provider.MethodSource;
*
*/
public final class TestFormulaEvaluatorOnXSSF {
- private static final POILogger logger = POILogFactory.getLogger(TestFormulaEvaluatorOnXSSF.class);
+ private static final POILogger LOG = POILogFactory.getLogger(TestFormulaEvaluatorOnXSSF.class);
private static XSSFWorkbook workbook;
private static Sheet sheet;
@@ -244,12 +244,12 @@ public final class TestFormulaEvaluatorOnXSSF {
*/
private static String getTargetFunctionName(Row r) {
if(r == null) {
- logger.log(POILogger.WARN, "Warning - given null row, can't figure out function name");
+ LOG.log(POILogger.WARN, "Warning - given null row, can't figure out function name");
return null;
}
Cell cell = r.getCell(SS.COLUMN_INDEX_FUNCTION_NAME);
if(cell == null) {
- logger.log(POILogger.WARN, "Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_FUNCTION_NAME + ", can't figure out function name");
+ LOG.log(POILogger.WARN, "Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_FUNCTION_NAME + ", can't figure out function name");
return null;
}
if(cell.getCellType() == CellType.BLANK) {
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java
index 03a91b904e..91045bfbb7 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestMultiSheetFormulaEvaluatorOnXSSF.java
@@ -49,7 +49,7 @@ import org.junit.jupiter.params.provider.MethodSource;
* Tests formulas for multi sheet reference (i.e. SUM(Sheet1:Sheet5!A1))
*/
public final class TestMultiSheetFormulaEvaluatorOnXSSF {
- private static final POILogger logger = POILogFactory.getLogger(TestMultiSheetFormulaEvaluatorOnXSSF.class);
+ private static final POILogger LOG = POILogFactory.getLogger(TestMultiSheetFormulaEvaluatorOnXSSF.class);
private static XSSFWorkbook workbook;
private static Sheet sheet;
@@ -211,12 +211,12 @@ public final class TestMultiSheetFormulaEvaluatorOnXSSF {
*/
private static String getTargetFunctionName(Row r) {
if(r == null) {
- logger.log(POILogger.WARN, "Warning - given null row, can't figure out function name");
+ LOG.log(POILogger.WARN, "Warning - given null row, can't figure out function name");
return null;
}
Cell cell = r.getCell(SS.COLUMN_INDEX_FUNCTION_NAME);
if(cell == null) {
- logger.log(POILogger.WARN, "Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_FUNCTION_NAME + ", can't figure out function name");
+ LOG.log(POILogger.WARN, "Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_FUNCTION_NAME + ", can't figure out function name");
return null;
}
@@ -232,12 +232,12 @@ public final class TestMultiSheetFormulaEvaluatorOnXSSF {
*/
private static String getTargetTestName(Row r) {
if(r == null) {
- logger.log(POILogger.WARN, "Warning - given null row, can't figure out test name");
+ LOG.log(POILogger.WARN, "Warning - given null row, can't figure out test name");
return null;
}
Cell cell = r.getCell(SS.COLUMN_INDEX_TEST_NAME);
if(cell == null) {
- logger.log(POILogger.WARN, "Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_TEST_NAME + ", can't figure out test name");
+ LOG.log(POILogger.WARN, "Warning - Row " + r.getRowNum() + " has no cell " + SS.COLUMN_INDEX_TEST_NAME + ", can't figure out test name");
return null;
}
CellType ct = cell.getCellType();
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java
index 47babc0925..a86d72282b 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFColGrouping.java
@@ -43,7 +43,7 @@ import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTCols;
*/
class TestXSSFColGrouping {
- private static final POILogger logger = POILogFactory.getLogger(TestXSSFColGrouping.class);
+ private static final POILogger LOG = POILogFactory.getLogger(TestXSSFColGrouping.class);
/**
@@ -65,7 +65,7 @@ class TestXSSFColGrouping {
sheet = wb2.getSheet("test");
CTCols cols = sheet.getCTWorksheet().getColsArray(0);
- logger.log(POILogger.DEBUG, "test52186/cols:" + cols);
+ LOG.log(POILogger.DEBUG, "test52186/cols:" + cols);
for (CTCol col : cols.getColArray()) {
assertTrue(col.isSetWidth(), "Col width attribute is unset: " + col);
}
@@ -91,7 +91,7 @@ class TestXSSFColGrouping {
sheet.setColumnGroupCollapsed(4, true);
CTCols cols = sheet.getCTWorksheet().getColsArray(0);
- logger.log(POILogger.DEBUG, "test52186_2/cols:" + cols);
+ LOG.log(POILogger.DEBUG, "test52186_2/cols:" + cols);
try (XSSFWorkbook wb2 = XSSFTestDataSamples.writeOutAndReadBack(wb1, "testNoColsWithoutWidthWhenGroupingAndCollapsing")) {
sheet = wb2.getSheet("test");
@@ -125,7 +125,7 @@ class TestXSSFColGrouping {
sheet.groupColumn((short) 2, (short) 3);
sheet.getCTWorksheet().getColsArray(0);
- logger.log(POILogger.DEBUG, "testMergingOverlappingCols_OVERLAPS_2_WRAPS/cols:" + cols);
+ LOG.log(POILogger.DEBUG, "testMergingOverlappingCols_OVERLAPS_2_WRAPS/cols:" + cols);
assertEquals(0, cols.getColArray(0).getOutlineLevel());
assertEquals(2, cols.getColArray(0).getMin()); // 1 based
@@ -173,7 +173,7 @@ class TestXSSFColGrouping {
sheet.groupColumn((short) 1, (short) 5);
cols = sheet.getCTWorksheet().getColsArray(0);
- logger.log(POILogger.DEBUG, "testMergingOverlappingCols_OVERLAPS_1_WRAPS/cols:" + cols);
+ LOG.log(POILogger.DEBUG, "testMergingOverlappingCols_OVERLAPS_1_WRAPS/cols:" + cols);
assertEquals(1, cols.getColArray(0).getOutlineLevel());
assertEquals(2, cols.getColArray(0).getMin()); // 1 based
@@ -221,7 +221,7 @@ class TestXSSFColGrouping {
sheet.groupColumn((short) 3, (short) 5);
cols = sheet.getCTWorksheet().getColsArray(0);
- logger.log(POILogger.DEBUG, "testMergingOverlappingCols_OVERLAPS_1_MINOR/cols:" + cols);
+ LOG.log(POILogger.DEBUG, "testMergingOverlappingCols_OVERLAPS_1_MINOR/cols:" + cols);
assertEquals(0, cols.getColArray(0).getOutlineLevel());
assertEquals(3, cols.getColArray(0).getMin()); // 1 based
@@ -270,7 +270,7 @@ class TestXSSFColGrouping {
sheet.groupColumn((short) 1, (short) 3);
cols = sheet.getCTWorksheet().getColsArray(0);
- logger.log(POILogger.DEBUG, "testMergingOverlappingCols_OVERLAPS_2_MINOR/cols:" + cols);
+ LOG.log(POILogger.DEBUG, "testMergingOverlappingCols_OVERLAPS_2_MINOR/cols:" + cols);
assertEquals(1, cols.getColArray(0).getOutlineLevel());
assertEquals(2, cols.getColArray(0).getMin()); // 1 based
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java
index 320aacf44c..30d92dda2f 100644
--- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java
+++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java
@@ -67,7 +67,7 @@ class TestXSSFConditionalFormatting extends BaseTestConditionalFormatting {
testReadOffice2007("NewStyleConditionalFormattings.xlsx");
}
- private final static java.awt.Color PEAK_ORANGE = new java.awt.Color(255, 239, 221);
+ private static final java.awt.Color PEAK_ORANGE = new java.awt.Color(255, 239, 221);
@Test
void testFontFormattingColor() {
diff --git a/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java b/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
index 40904fe718..30936c4690 100644
--- a/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
+++ b/src/scratchpad/src/org/apache/poi/extractor/ole2/OLE2ScratchpadExtractorFactory.java
@@ -58,7 +58,7 @@ import org.apache.poi.util.POILogger;
*/
@SuppressWarnings("WeakerAccess")
public class OLE2ScratchpadExtractorFactory implements ExtractorProvider {
- private static final POILogger logger = POILogFactory.getLogger(OLE2ScratchpadExtractorFactory.class);
+ private static final POILogger LOG = POILogFactory.getLogger(OLE2ScratchpadExtractorFactory.class);
@Override
public boolean accepts(FileMagic fm) {
@@ -169,7 +169,7 @@ public class OLE2ScratchpadExtractorFactory implements ExtractorProvider {
.filter(entry -> entry.getName().startsWith("_"))
.forEach(dirs::add);
} catch(FileNotFoundException e) {
- logger.log(POILogger.INFO, "Ignoring FileNotFoundException while extracting Word document", e.getLocalizedMessage());
+ LOG.log(POILogger.INFO, "Ignoring FileNotFoundException while extracting Word document", e.getLocalizedMessage());
// ignored here
}
//} else if(ext instanceof PowerPointExtractor) {
diff --git a/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java b/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
index 9c1716b571..ef9d42b412 100644
--- a/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
+++ b/src/scratchpad/src/org/apache/poi/hdgf/chunks/Chunk.java
@@ -28,16 +28,19 @@ import org.apache.poi.util.POILogger;
* Base of all chunks, which hold data, flags etc
*/
public final class Chunk {
+ /** For logging warnings about the structure of the file */
+ private static final POILogger LOG = POILogFactory.getLogger(Chunk.class);
+
/**
* The contents of the chunk, excluding the header,
* trailer and separator
*/
- private byte[] contents;
- private ChunkHeader header;
+ private final byte[] contents;
+ private final ChunkHeader header;
/** May be null */
- private ChunkTrailer trailer;
+ private final ChunkTrailer trailer;
/** May be null */
- private ChunkSeparator separator;
+ private final ChunkSeparator separator;
/** The possible different commands we can hold */
private CommandDefinition[] commandDefinitions;
/** The command+value pairs we hold */
@@ -47,9 +50,6 @@ public final class Chunk {
/** The name of the chunk, as found from the commandDefinitions */
private String name;
- /** For logging warnings about the structure of the file */
- private POILogger logger = POILogFactory.getLogger(Chunk.class);
-
public Chunk(ChunkHeader header, ChunkTrailer trailer, ChunkSeparator separator, byte[] contents) {
this.header = header;
this.trailer = trailer;
@@ -179,7 +179,7 @@ public final class Chunk {
// Check we seem to have enough data
if(offset >= contents.length) {
- logger.log(POILogger.WARN,
+ LOG.log(POILogger.WARN,
"Command offset ", offset, " past end of data at ", contents.length
);
continue;
@@ -241,12 +241,12 @@ public final class Chunk {
break;
default:
- logger.log(POILogger.INFO,
+ LOG.log(POILogger.INFO,
"Command of type ", type, " not processed!");
}
}
catch (Exception e) {
- logger.log(POILogger.ERROR, "Unexpected error processing command, ignoring and continuing. Command: ", command, e);
+ LOG.log(POILogger.ERROR, "Unexpected error processing command, ignoring and continuing. Command: ", command, e);
}
// Add to the array
diff --git a/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java b/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java
index 101d4545ba..6bf22a02d7 100644
--- a/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java
+++ b/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java
@@ -59,7 +59,7 @@ public final class ChunkFactory {
"/org/apache/poi/hdgf/chunks_parse_cmds.tbl";
/** For logging problems we spot with the file */
- private static final POILogger logger = POILogFactory.getLogger(ChunkFactory.class);
+ private static final POILogger LOG = POILogFactory.getLogger(ChunkFactory.class);
public ChunkFactory(int version) throws IOException {
this.version = version;
@@ -139,7 +139,7 @@ public final class ChunkFactory {
// Check we have enough data, and tweak the header size
// as required
if(endOfDataPos > data.length) {
- logger.log(POILogger.WARN,
+ LOG.log(POILogger.WARN,
"Header called for ", header.getLength(), " bytes, but that would take us past the end of the data!");
endOfDataPos = data.length;
@@ -165,7 +165,7 @@ public final class ChunkFactory {
data, endOfDataPos);
endOfDataPos += 8;
} else {
- logger.log(POILogger.ERROR, "Header claims a length to ", endOfDataPos, " there's then no space for the trailer in the data (", data.length, ")");
+ LOG.log(POILogger.ERROR, "Header claims a length to ", endOfDataPos, " there's then no space for the trailer in the data (", data.length, ")");
}
}
if(header.hasSeparator()) {
@@ -173,7 +173,7 @@ public final class ChunkFactory {
separator = new ChunkSeparator(
data, endOfDataPos);
} else {
- logger.log(POILogger.ERROR, "Header claims a length to ", endOfDataPos, " there's then no space for the separator in the data (", data.length, ")");
+ LOG.log(POILogger.ERROR, "Header claims a length to ", endOfDataPos, " there's then no space for the separator in the data (", data.length, ")");
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hdgf/dev/VSDDumper.java b/src/scratchpad/src/org/apache/poi/hdgf/dev/VSDDumper.java
index a8798a8d2f..a82e914edd 100644
--- a/src/scratchpad/src/org/apache/poi/hdgf/dev/VSDDumper.java
+++ b/src/scratchpad/src/org/apache/poi/hdgf/dev/VSDDumper.java
@@ -35,7 +35,7 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
* of a Visio file
*/
public final class VSDDumper {
- final static String tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
+ static final String tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
private final PrintStream ps;
private final HDGFDiagram hdgf;
diff --git a/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java b/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java
index 143d5ad0a2..dc923c588d 100644
--- a/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java
+++ b/src/scratchpad/src/org/apache/poi/hdgf/streams/ChunkStream.java
@@ -27,13 +27,13 @@ import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
public final class ChunkStream extends Stream {
- private final static POILogger logger = POILogFactory.getLogger(ChunkStream.class);
-
- private ChunkFactory chunkFactory;
+ private static final POILogger LOG = POILogFactory.getLogger(ChunkStream.class);
+
+ private final ChunkFactory chunkFactory;
/** All the Chunks we contain */
private Chunk[] chunks;
- protected ChunkStream(Pointer pointer, StreamStore store, ChunkFactory chunkFactory) {
+ ChunkStream(Pointer pointer, StreamStore store, ChunkFactory chunkFactory) {
super(pointer, store);
this.chunkFactory = chunkFactory;
@@ -66,14 +66,14 @@ public final class ChunkStream extends Stream {
pos += chunk.getOnDiskSize();
} else {
- logger.log(POILogger.WARN, "Needed ", headerSize, " bytes to create the next chunk header, but only found ", (contents.length-pos), " bytes, ignoring rest of data");
+ LOG.log(POILogger.WARN, "Needed ", headerSize, " bytes to create the next chunk header, but only found ", (contents.length-pos), " bytes, ignoring rest of data");
pos = contents.length;
}
}
}
catch (Exception e)
{
- logger.log(POILogger.ERROR, "Failed to create chunk at ", pos, ", ignoring rest of data." + e);
+ LOG.log(POILogger.ERROR, "Failed to create chunk at ", pos, ", ignoring rest of data." + e);
}
chunks = chunksA.toArray(new Chunk[0]);
diff --git a/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java b/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java
index 2590fd85b9..0d42389055 100644
--- a/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java
+++ b/src/scratchpad/src/org/apache/poi/hemf/record/emf/HemfComment.java
@@ -52,7 +52,7 @@ import org.apache.poi.util.RecordFormatException;
*/
@Internal
public class HemfComment {
- private static final POILogger logger = POILogFactory.getLogger(HemfComment.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HemfComment.class);
private static final int MAX_RECORD_LENGTH = HwmfPicture.MAX_RECORD_LENGTH;
public enum HemfCommentRecordType {
@@ -601,7 +601,7 @@ public class HemfComment {
// some emf comments are truncated, so we don't use readFully here
int readBytes = leis.read(wmfData);
if (readBytes < wmfData.length) {
- logger.log(POILogger.INFO, "Emf comment with WMF: expected ", wmfData.length,
+ LOG.log(POILogger.INFO, "Emf comment with WMF: expected ", wmfData.length,
" bytes - received only ", readBytes, " bytes.");
}
diff --git a/src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusPen.java b/src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusPen.java
index 7d0fc5c2d3..cd00d453cc 100644
--- a/src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusPen.java
+++ b/src/scratchpad/src/org/apache/poi/hemf/record/emfplus/HemfPlusPen.java
@@ -295,62 +295,62 @@ public class HemfPlusPen {
/**
* If set, a 2x3 transform matrix MUST be specified in the OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField TRANSFORM = BitFieldFactory.getInstance(0x00000001);
+ private static final BitField TRANSFORM = BitFieldFactory.getInstance(0x00000001);
/**
* If set, the style of a starting line cap MUST be specified in the OptionalData field of an
* EmfPlusPenData object.
*/
- private final static BitField START_CAP = BitFieldFactory.getInstance(0x00000002);
+ private static final BitField START_CAP = BitFieldFactory.getInstance(0x00000002);
/**
* Indicates whether the style of an ending line cap MUST be specified in the OptionalData field
* of an EmfPlusPenData object.
*/
- private final static BitField END_CAP = BitFieldFactory.getInstance(0x00000004);
+ private static final BitField END_CAP = BitFieldFactory.getInstance(0x00000004);
/**
* Indicates whether a line join type MUST be specified in the OptionalData
* field of an EmfPlusPenData object.
*/
- private final static BitField JOIN = BitFieldFactory.getInstance(0x00000008);
+ private static final BitField JOIN = BitFieldFactory.getInstance(0x00000008);
/**
* Indicates whether a miter limit MUST be specified in the OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField MITER_LIMIT = BitFieldFactory.getInstance(0x00000010);
+ private static final BitField MITER_LIMIT = BitFieldFactory.getInstance(0x00000010);
/**
* Indicates whether a line style MUST be specified in the OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField LINE_STYLE = BitFieldFactory.getInstance(0x00000020);
+ private static final BitField LINE_STYLE = BitFieldFactory.getInstance(0x00000020);
/**
* Indicates whether a dashed line cap MUST be specified in the OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField DASHED_LINE_CAP = BitFieldFactory.getInstance(0x00000040);
+ private static final BitField DASHED_LINE_CAP = BitFieldFactory.getInstance(0x00000040);
/**
* Indicates whether a dashed line offset MUST be specified in the OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField DASHED_LINE_OFFSET = BitFieldFactory.getInstance(0x00000080);
+ private static final BitField DASHED_LINE_OFFSET = BitFieldFactory.getInstance(0x00000080);
/**
* Indicates whether an EmfPlusDashedLineData object MUST be specified in the
* OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField DASHED_LINE = BitFieldFactory.getInstance(0x00000100);
+ private static final BitField DASHED_LINE = BitFieldFactory.getInstance(0x00000100);
/**
* Indicates whether a pen alignment MUST be specified in the OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField NON_CENTER = BitFieldFactory.getInstance(0x00000200);
+ private static final BitField NON_CENTER = BitFieldFactory.getInstance(0x00000200);
/**
* Indicates whether the length and content of a EmfPlusCompoundLineData object are present in the
* OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField COMPOUND_LINE = BitFieldFactory.getInstance(0x00000400);
+ private static final BitField COMPOUND_LINE = BitFieldFactory.getInstance(0x00000400);
/**
* Indicates whether an EmfPlusCustomStartCapData object MUST be specified
* in the OptionalData field of an EmfPlusPenData object.y
*/
- private final static BitField CUSTOM_START_CAP = BitFieldFactory.getInstance(0x00000800);
+ private static final BitField CUSTOM_START_CAP = BitFieldFactory.getInstance(0x00000800);
/**
* Indicates whether an EmfPlusCustomEndCapData object MUST be specified in
* the OptionalData field of an EmfPlusPenData object.
*/
- private final static BitField CUSTOM_END_CAP = BitFieldFactory.getInstance(0x00001000);
+ private static final BitField CUSTOM_END_CAP = BitFieldFactory.getInstance(0x00001000);
private static final int[] FLAGS_MASKS = {
0x00000001, 0x00000002, 0x00000004, 0x00000008, 0x00000010,
diff --git a/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java b/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java
index 1d8956c374..e70d7ca480 100644
--- a/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java
+++ b/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIDateAttribute.java
@@ -33,25 +33,25 @@ import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
/**
- * A pure-MAPI attribute holding a Date, which applies
+ * A pure-MAPI attribute holding a Date, which applies
* to a {@link HMEFMessage} or one of its {@link Attachment}s.
- *
+ *
* Timestamps are usually given in UTC.
- *
+ *
* @see <a href="https://msdn.microsoft.com/en-us/library/cc433482(v=exchg.80).aspx">[MS-OXOMSG]: Email Object Protocol</a>
* @see <a href="https://msdn.microsoft.com/en-us/library/cc433490(v=exchg.80).aspx">[MS-OXPROPS]: Exchange Server Protocols Master Property List</a>
*/
public final class MAPIDateAttribute extends MAPIAttribute {
- private final static POILogger logger = POILogFactory.getLogger(MAPIDateAttribute.class);
- private Date data;
-
+ private static final POILogger LOG = POILogFactory.getLogger(MAPIDateAttribute.class);
+ private final Date data;
+
/**
* Constructs a single new date attribute from the id, type,
* and the contents of the stream
*/
protected MAPIDateAttribute(MAPIProperty property, int type, byte[] data) {
super(property, type, data);
-
+
// The value is a 64 bit Windows Filetime
this.data = Filetime.filetimeToDate(
LittleEndian.getLong(data, 0)
@@ -61,14 +61,14 @@ public final class MAPIDateAttribute extends MAPIAttribute {
public Date getDate() {
return this.data;
}
-
+
public String toString() {
DateFormatSymbols dfs = DateFormatSymbols.getInstance(Locale.ROOT);
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", dfs);
df.setTimeZone(LocaleUtil.TIMEZONE_UTC);
return getProperty() + " " + df.format(data);
}
-
+
/**
* Returns the Date of a Attribute, converting as appropriate
*/
@@ -79,8 +79,8 @@ public final class MAPIDateAttribute extends MAPIAttribute {
if(attr instanceof MAPIDateAttribute) {
return ((MAPIDateAttribute)attr).getDate();
}
-
- logger.log(POILogger.WARN, "Warning, non date property found: ", attr);
+
+ LOG.log(POILogger.WARN, "Warning, non date property found: ", attr);
return null;
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java b/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java
index 952ad14465..d91449e5ca 100644
--- a/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java
+++ b/src/scratchpad/src/org/apache/poi/hmef/attribute/MAPIStringAttribute.java
@@ -28,17 +28,17 @@ import org.apache.poi.util.POILogger;
import org.apache.poi.util.StringUtil;
/**
- * A pure-MAPI attribute holding a String, which applies
+ * A pure-MAPI attribute holding a String, which applies
* to a {@link HMEFMessage} or one of its {@link Attachment}s.
*/
public final class MAPIStringAttribute extends MAPIAttribute {
- private final static POILogger logger = POILogFactory.getLogger(MAPIStringAttribute.class);
+ private static final POILogger LOG = POILogFactory.getLogger(MAPIStringAttribute.class);
private static final String CODEPAGE = "CP1252";
private final String data;
-
+
public MAPIStringAttribute(MAPIProperty property, int type, byte[] data) {
super(property, type, data);
-
+
String tmpData = null;
if(type == Types.ASCII_STRING.getId()) {
tmpData = new String(data, Charset.forName(CODEPAGE));
@@ -47,22 +47,22 @@ public final class MAPIStringAttribute extends MAPIAttribute {
} else {
throw new IllegalArgumentException("Not a string type " + type);
}
-
+
// Strip off the null terminator if present
if(tmpData.endsWith("\0")) {
tmpData = tmpData.substring(0, tmpData.length()-1);
}
this.data = tmpData;
}
-
+
public String getDataString() {
return data;
}
-
+
public String toString() {
return getProperty() + " " + data;
}
-
+
/**
* Returns the string of a Attribute, converting as appropriate
*/
@@ -76,8 +76,8 @@ public final class MAPIStringAttribute extends MAPIAttribute {
if(attr instanceof MAPIRtfAttribute) {
return ((MAPIRtfAttribute)attr).getDataString();
}
-
- logger.log(POILogger.WARN, "Warning, non string property found: ", attr);
+
+ LOG.log(POILogger.WARN, "Warning, non string property found: ", attr);
return null;
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java b/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java
index 764b308089..e9f4e6e22a 100644
--- a/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java
+++ b/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFDateAttribute.java
@@ -39,16 +39,16 @@ import org.apache.poi.util.POILogger;
* or one of its {@link Attachment}s.
*/
public final class TNEFDateAttribute extends TNEFAttribute {
- private final static POILogger logger = POILogFactory.getLogger(TNEFDateAttribute.class);
- private Date data;
-
+ private static final POILogger LOG = POILogFactory.getLogger(TNEFDateAttribute.class);
+ private final Date data;
+
/**
* Constructs a single new date attribute from the id, type,
* and the contents of the stream
*/
protected TNEFDateAttribute(int id, int type, InputStream inp) throws IOException {
super(id, type, inp);
-
+
byte[] binData = getData();
if(binData.length == 8) {
// The value is a 64 bit Windows Filetime
@@ -75,15 +75,15 @@ public final class TNEFDateAttribute extends TNEFAttribute {
public Date getDate() {
return this.data;
}
-
+
public String toString() {
DateFormatSymbols dfs = DateFormatSymbols.getInstance(Locale.ROOT);
DateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", dfs);
- df.setTimeZone(LocaleUtil.TIMEZONE_UTC);
+ df.setTimeZone(LocaleUtil.TIMEZONE_UTC);
return "Attribute " + getProperty() + ", type=" + getType() +
- ", date=" + df.format(data);
+ ", date=" + df.format(data);
}
-
+
/**
* Returns the Date of a Attribute, converting as appropriate
*/
@@ -94,8 +94,8 @@ public final class TNEFDateAttribute extends TNEFAttribute {
if(attr instanceof TNEFDateAttribute) {
return ((TNEFDateAttribute)attr).getDate();
}
-
- logger.log(POILogger.WARN, "Warning, non date property found: ", attr);
+
+ LOG.log(POILogger.WARN, "Warning, non date property found: ", attr);
return null;
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java b/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java
index b7cd4690a0..e5e79dfebf 100644
--- a/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java
+++ b/src/scratchpad/src/org/apache/poi/hmef/attribute/TNEFStringAttribute.java
@@ -31,16 +31,16 @@ import org.apache.poi.util.StringUtil;
* or one of its {@link Attachment}s.
*/
public final class TNEFStringAttribute extends TNEFAttribute {
- private final static POILogger logger = POILogFactory.getLogger(TNEFStringAttribute.class);
- private String data;
-
+ private static final POILogger LOG = POILogFactory.getLogger(TNEFStringAttribute.class);
+ private final String data;
+
/**
* Constructs a single new string attribute from the id, type,
* and the contents of the stream
*/
protected TNEFStringAttribute(int id, int type, InputStream inp) throws IOException {
super(id, type, inp);
-
+
String tmpData = null;
byte[] data = getData();
if(getType() == TNEFProperty.TYPE_TEXT) {
@@ -50,7 +50,7 @@ public final class TNEFStringAttribute extends TNEFAttribute {
data, 0, data.length
);
}
-
+
// Strip off the null terminator if present
if(tmpData.endsWith("\0")) {
tmpData = tmpData.substring(0, tmpData.length()-1);
@@ -61,12 +61,12 @@ public final class TNEFStringAttribute extends TNEFAttribute {
public String getString() {
return this.data;
}
-
+
public String toString() {
return "Attribute " + getProperty() + ", type=" + getType() +
- ", data=" + getString();
+ ", data=" + getString();
}
-
+
/**
* Returns the string of a Attribute, converting as appropriate
*/
@@ -77,8 +77,8 @@ public final class TNEFStringAttribute extends TNEFAttribute {
if(attr instanceof TNEFStringAttribute) {
return ((TNEFStringAttribute)attr).getString();
}
-
- logger.log(POILogger.WARN, "Warning, non string property found: ", attr);
+
+ LOG.log(POILogger.WARN, "Warning, non string property found: ", attr);
return null;
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hpbf/model/QuillContents.java b/src/scratchpad/src/org/apache/poi/hpbf/model/QuillContents.java
index ab5b5d09e9..4c50e690ca 100644
--- a/src/scratchpad/src/org/apache/poi/hpbf/model/QuillContents.java
+++ b/src/scratchpad/src/org/apache/poi/hpbf/model/QuillContents.java
@@ -34,12 +34,12 @@ import org.apache.poi.util.POILogger;
* Read Quill Contents (/Quill/QuillSub/CONTENTS) from an HPBF (Publisher .pub) document
*/
public final class QuillContents extends HPBFPart {
- private static POILogger logger = POILogFactory.getLogger(QuillContents.class);
+ private static final POILogger LOG = POILogFactory.getLogger(QuillContents.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 1_000_000;
private static final String[] PATH = { "Quill", "QuillSub", "CONTENTS", };
- private QCBit[] bits;
+ private final QCBit[] bits;
public QuillContents(DirectoryNode baseDir) throws IOException {
super(baseDir, PATH);
@@ -79,7 +79,7 @@ public final class QuillContents extends HPBFPart {
bits[i] = QCPLCBit.createQCPLCBit(thingType, bitType, bitData);
} catch (ArrayIndexOutOfBoundsException e) {
// bug 60685: fall back so that the rest of the document can be read
- logger.log(POILogger.WARN, "Unable to read Quill Contents PLC Bit record. Ignoring this record.");
+ LOG.log(POILogger.WARN, "Unable to read Quill Contents PLC Bit record. Ignoring this record.");
bits[i] = new UnknownQCBit(thingType, bitType, bitData);
}
} else {
diff --git a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java
index d1699779f0..8463080ca3 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowRecordDumper.java
@@ -44,7 +44,7 @@ import org.apache.poi.util.HexDump;
* @author Nick Burch
*/
public final class SlideShowRecordDumper {
- final static String tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
+ static final String tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
private boolean optVerbose;
private boolean optEscher;
diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java b/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java
index 6466748a6a..8851d6c269 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/BitMaskTextProp.java
@@ -34,7 +34,7 @@ import org.apache.poi.util.POILogger;
* (but related) properties
*/
public abstract class BitMaskTextProp extends TextProp {
- protected static final POILogger logger = POILogFactory.getLogger(BitMaskTextProp.class);
+ protected static final POILogger LOG = POILogFactory.getLogger(BitMaskTextProp.class);
private String[] subPropNames;
private int[] subPropMasks;
@@ -148,8 +148,8 @@ public abstract class BitMaskTextProp extends TextProp {
setWriteMask(writeMask);
super.setValue(maskValue(val));
if (val != super.getValue()) {
- logger.log(POILogger.WARN, "Style properties of '", getName(), "' don't match mask - output will be sanitized");
- if (logger.check(POILogger.DEBUG)) {
+ LOG.log(POILogger.WARN, "Style properties of '", getName(), "' don't match mask - output will be sanitized");
+ if (LOG.check(POILogger.DEBUG)) {
StringBuilder sb = new StringBuilder("The following style attributes of the '")
.append(getName()).append("' property will be ignored:\n");
int i=0;
@@ -159,7 +159,7 @@ public abstract class BitMaskTextProp extends TextProp {
}
i++;
}
- logger.log(POILogger.DEBUG, sb.toString());
+ LOG.log(POILogger.DEBUG, sb.toString());
}
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java b/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java
index 0ad60d0e7a..927cbe553d 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java
@@ -41,8 +41,8 @@ import org.apache.poi.util.LittleEndian;
*/
public class TextPFException9 implements GenericRecord {
- private final static AutoNumberingScheme DEFAULT_AUTONUMBER_SCHEME = AutoNumberingScheme.arabicPeriod;
- private final static Short DEFAULT_START_NUMBER = 1;
+ private static final AutoNumberingScheme DEFAULT_AUTONUMBER_SCHEME = AutoNumberingScheme.arabicPeriod;
+ private static final Short DEFAULT_START_NUMBER = 1;
//private final byte mask1;
//private final byte mask2;
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfo.java b/src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfo.java
index 7b8e173ec1..ded20953dd 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfo.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/AnimationInfo.java
@@ -58,7 +58,7 @@ public final class AnimationInfo extends RecordContainer {
if(_children[0] instanceof AnimationInfoAtom) {
animationAtom = (AnimationInfoAtom)_children[0];
} else {
- logger.log(POILogger.ERROR, "First child record wasn't a AnimationInfoAtom, was of type ", _children[0].getRecordType());
+ LOG.log(POILogger.ERROR, "First child record wasn't a AnimationInfoAtom, was of type ", _children[0].getRecordType());
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/Comment2000.java b/src/scratchpad/src/org/apache/poi/hslf/record/Comment2000.java
index 181a960ef0..9f12084e15 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/Comment2000.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/Comment2000.java
@@ -129,7 +129,7 @@ public final class Comment2000 extends RecordContainer {
} else if (r instanceof Comment2000Atom){
commentAtom = (Comment2000Atom)r;
} else {
- logger.log(POILogger.WARN, "Unexpected record with type=", r.getRecordType(), " in Comment2000: ", r.getClass().getName());
+ LOG.log(POILogger.WARN, "Unexpected record with type=", r.getRecordType(), " in Comment2000: ", r.getClass().getName());
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java
index 01098dfd19..d3793ce15c 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/CurrentUserAtom.java
@@ -46,7 +46,7 @@ import org.apache.poi.util.StringUtil;
*/
public class CurrentUserAtom
{
- private final static POILogger logger = POILogFactory.getLogger(CurrentUserAtom.class);
+ private static final POILogger LOG = POILogFactory.getLogger(CurrentUserAtom.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 1_000_000;
@@ -177,7 +177,7 @@ public class CurrentUserAtom
long usernameLen = LittleEndian.getUShort(_contents,20);
if(usernameLen > 512) {
// Handle the case of it being garbage
- logger.log(POILogger.WARN, "Warning - invalid username length ", usernameLen, " found, treating as if there was no username set");
+ LOG.log(POILogger.WARN, "Warning - invalid username length ", usernameLen, " found, treating as if there was no username set");
usernameLen = 0;
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/Document.java b/src/scratchpad/src/org/apache/poi/hslf/record/Document.java
index 01710d0f71..007c83f9f6 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/Document.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/Document.java
@@ -161,10 +161,10 @@ public final class Document extends PositionDependentRecordContainer
// (normally it's 2, or 3 if you have notes)
// Complain if it's not
if(slwtcount == 0) {
- logger.log(POILogger.WARN, "No SlideListWithText's found - there should normally be at least one!");
+ LOG.log(POILogger.WARN, "No SlideListWithText's found - there should normally be at least one!");
}
if(slwtcount > 3) {
- logger.log(POILogger.WARN, "Found ", slwtcount, " SlideListWithTexts - normally there should only be three!");
+ LOG.log(POILogger.WARN, "Found ", slwtcount, " SlideListWithTexts - normally there should only be three!");
}
// Now grab all the SLWTs
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/ExEmbed.java b/src/scratchpad/src/org/apache/poi/hslf/record/ExEmbed.java
index bc0de3d22f..7cb1caa894 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/ExEmbed.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/ExEmbed.java
@@ -105,14 +105,14 @@ public class ExEmbed extends RecordContainer {
if(_children[0] instanceof ExEmbedAtom) {
embedAtom = (ExEmbedAtom)_children[0];
} else {
- logger.log(POILogger.ERROR, "First child record wasn't a ExEmbedAtom, was of type ", _children[0].getRecordType());
+ LOG.log(POILogger.ERROR, "First child record wasn't a ExEmbedAtom, was of type ", _children[0].getRecordType());
}
// Second child should be the ExOleObjAtom
if (_children[1] instanceof ExOleObjAtom) {
oleObjAtom = (ExOleObjAtom)_children[1];
} else {
- logger.log(POILogger.ERROR, "Second child record wasn't a ExOleObjAtom, was of type ", _children[1].getRecordType());
+ LOG.log(POILogger.ERROR, "Second child record wasn't a ExOleObjAtom, was of type ", _children[1].getRecordType());
}
for (int i = 2; i < _children.length; i++) {
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/ExHyperlink.java b/src/scratchpad/src/org/apache/poi/hslf/record/ExHyperlink.java
index c0cdd557c6..eeb260cf1a 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/ExHyperlink.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/ExHyperlink.java
@@ -118,7 +118,7 @@ public class ExHyperlink extends RecordContainer {
if(_children[0] instanceof ExHyperlinkAtom) {
linkAtom = (ExHyperlinkAtom)_children[0];
} else {
- logger.log(POILogger.ERROR, "First child record wasn't a ExHyperlinkAtom, was of type ", _children[0].getRecordType());
+ LOG.log(POILogger.ERROR, "First child record wasn't a ExHyperlinkAtom, was of type ", _children[0].getRecordType());
}
for (int i = 1; i < _children.length; i++) {
@@ -126,7 +126,7 @@ public class ExHyperlink extends RecordContainer {
if ( linkDetailsA == null) linkDetailsA = (CString)_children[i];
else linkDetailsB = (CString)_children[i];
} else {
- logger.log(POILogger.ERROR, "Record after ExHyperlinkAtom wasn't a CString, was of type ", _children[1].getRecordType());
+ LOG.log(POILogger.ERROR, "Record after ExHyperlinkAtom wasn't a CString, was of type ", _children[1].getRecordType());
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/ExMCIMovie.java b/src/scratchpad/src/org/apache/poi/hslf/record/ExMCIMovie.java
index 58fb5c1c0f..e1f9375184 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/ExMCIMovie.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/ExMCIMovie.java
@@ -72,7 +72,7 @@ public class ExMCIMovie extends RecordContainer { // TODO - instantiable supercl
if (_children[0] instanceof ExVideoContainer) {
exVideo = (ExVideoContainer) _children[0];
} else {
- logger.log(POILogger.ERROR, "First child record wasn't a ExVideoContainer, was of type ", _children[0].getRecordType());
+ LOG.log(POILogger.ERROR, "First child record wasn't a ExVideoContainer, was of type ", _children[0].getRecordType());
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/ExVideoContainer.java b/src/scratchpad/src/org/apache/poi/hslf/record/ExVideoContainer.java
index 430b774b1b..3787a99860 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/ExVideoContainer.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/ExVideoContainer.java
@@ -60,12 +60,12 @@ public final class ExVideoContainer extends RecordContainer {
if(_children[0] instanceof ExMediaAtom) {
mediaAtom = (ExMediaAtom)_children[0];
} else {
- logger.log(POILogger.ERROR, "First child record wasn't a ExMediaAtom, was of type ", _children[0].getRecordType());
+ LOG.log(POILogger.ERROR, "First child record wasn't a ExMediaAtom, was of type ", _children[0].getRecordType());
}
if(_children[1] instanceof CString) {
pathAtom = (CString)_children[1];
} else {
- logger.log(POILogger.ERROR, "Second child record wasn't a CString, was of type ", _children[1].getRecordType());
+ LOG.log(POILogger.ERROR, "Second child record wasn't a CString, was of type ", _children[1].getRecordType());
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/FontCollection.java b/src/scratchpad/src/org/apache/poi/hslf/record/FontCollection.java
index c8e47ab13b..c3e17e89db 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/FontCollection.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/FontCollection.java
@@ -62,7 +62,7 @@ public final class FontCollection extends RecordContainer {
HSLFFontInfo fi = addFont(fontHeader);
fi.addFacet(fed);
} else {
- logger.log(POILogger.WARN, "Warning: FontCollection child wasn't a FontEntityAtom, was ", r.getClass().getSimpleName());
+ LOG.log(POILogger.WARN, "Warning: FontCollection child wasn't a FontEntityAtom, was ", r.getClass().getSimpleName());
}
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersContainer.java b/src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersContainer.java
index 022eb116d2..ff4eaf478f 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersContainer.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/HeadersFootersContainer.java
@@ -89,11 +89,11 @@ public final class HeadersFootersContainer extends RecordContainer {
csFooter = cs;
break;
default:
- logger.log(POILogger.WARN, "Unexpected CString.Options in HeadersFootersContainer: ", opts);
+ LOG.log(POILogger.WARN, "Unexpected CString.Options in HeadersFootersContainer: ", opts);
break;
}
} else {
- logger.log(POILogger.WARN, "Unexpected record in HeadersFootersContainer: ", child);
+ LOG.log(POILogger.WARN, "Unexpected record in HeadersFootersContainer: ", child);
}
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/InteractiveInfo.java b/src/scratchpad/src/org/apache/poi/hslf/record/InteractiveInfo.java
index 76b84c554a..53cf4639ed 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/InteractiveInfo.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/InteractiveInfo.java
@@ -61,7 +61,7 @@ public class InteractiveInfo extends RecordContainer {
private void findInterestingChildren() {
// First child should be the InteractiveInfoAtom
if (_children == null || _children.length == 0 || !(_children[0] instanceof InteractiveInfoAtom)) {
- logger.log(POILogger.WARN, "First child record wasn't a InteractiveInfoAtom - leaving this atom in an invalid state...");
+ LOG.log(POILogger.WARN, "First child record wasn't a InteractiveInfoAtom - leaving this atom in an invalid state...");
return;
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/MasterTextPropAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/MasterTextPropAtom.java
index 8da3d439b6..82cc9e13ac 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/MasterTextPropAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/MasterTextPropAtom.java
@@ -85,7 +85,7 @@ public final class MasterTextPropAtom extends RecordAtom {
try {
read();
} catch (Exception e){
- logger.log(POILogger.ERROR, "Failed to parse MasterTextPropAtom", e);
+ LOG.log(POILogger.ERROR, "Failed to parse MasterTextPropAtom", e);
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java b/src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java
index dddfaec55f..bb55a91eef 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/PPDrawing.java
@@ -201,7 +201,7 @@ public final class PPDrawing extends RecordAtom implements Iterable<EscherRecord
// Wind on
int size = r.getRecordSize();
if(size < 8) {
- logger.log(POILogger.WARN, "Hit short DDF record at ", startPos, " - ", size);
+ LOG.log(POILogger.WARN, "Hit short DDF record at ", startPos, " - ", size);
}
/*
@@ -211,7 +211,7 @@ public final class PPDrawing extends RecordAtom implements Iterable<EscherRecord
* Sometimes it is not so, see an example in bug #44770. Most likely reason is that one of ddf records calculates wrong size.
*/
if(size != escherBytes){
- logger.log(POILogger.WARN, "Record length=", escherBytes, " but getRecordSize() returned ", r.getRecordSize(), "; record: ", r.getClass());
+ LOG.log(POILogger.WARN, "Record length=", escherBytes, " but getRecordSize() returned ", r.getRecordSize(), "; record: ", r.getClass());
size = escherBytes;
}
startPos += size;
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java b/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java
index 0084d9020b..2b3f5eef9b 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/PersistPtrHolder.java
@@ -176,8 +176,8 @@ public final class PersistPtrHolder extends PositionDependentRecordAtom
if (newPos == null) {
Integer id = me.getKey();
- logger.log(POILogger.WARN, "Couldn't find the new location of the \"slide\" with id " + id + " that used to be at " + oldPos);
- logger.log(POILogger.WARN, "Not updating the position of it, you probably won't be able to find it any more (if you ever could!)");
+ LOG.log(POILogger.WARN, "Couldn't find the new location of the \"slide\" with id " + id + " that used to be at " + oldPos);
+ LOG.log(POILogger.WARN, "Not updating the position of it, you probably won't be able to find it any more (if you ever could!)");
} else {
me.setValue(newPos);
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/Record.java b/src/scratchpad/src/org/apache/poi/hslf/record/Record.java
index cf6b738ddb..dba30ed230 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/Record.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/Record.java
@@ -42,7 +42,7 @@ import org.apache.poi.util.POILogger;
public abstract class Record implements GenericRecord
{
// For logging
- protected static final POILogger logger = POILogFactory.getLogger(Record.class);
+ protected static final POILogger LOG = POILogFactory.getLogger(Record.class);
/**
* Is this record type an Atom record (only has data),
@@ -183,7 +183,7 @@ public abstract class Record implements GenericRecord
// Handle case of a corrupt last record, whose claimed length
// would take us passed the end of the file
if(start + len > b.length ) {
- logger.log(POILogger.WARN, "Warning: Skipping record of type " + type + " at position " + start + " which claims to be longer than the file! (" + len + " vs " + (b.length-start) + ")");
+ LOG.log(POILogger.WARN, "Warning: Skipping record of type " + type + " at position " + start + " which claims to be longer than the file! (" + len + " vs " + (b.length-start) + ")");
return null;
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/Sound.java b/src/scratchpad/src/org/apache/poi/hslf/record/Sound.java
index df9c245d6d..41c97a934d 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/Sound.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/Sound.java
@@ -68,14 +68,14 @@ public final class Sound extends RecordContainer {
if(_children[0] instanceof CString) {
_name = (CString)_children[0];
} else {
- logger.log(POILogger.ERROR, "First child record wasn't a CString, was of type ", _children[0].getRecordType());
+ LOG.log(POILogger.ERROR, "First child record wasn't a CString, was of type ", _children[0].getRecordType());
}
// Second child should be the ExOleObjAtom
if (_children[1] instanceof CString) {
_type = (CString)_children[1];
} else {
- logger.log(POILogger.ERROR, "Second child record wasn't a CString, was of type ", _children[1].getRecordType());
+ LOG.log(POILogger.ERROR, "Second child record wasn't a CString, was of type ", _children[1].getRecordType());
}
for (int i = 2; i < _children.length; i++) {
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
index 5ed2fe45b5..fe9e11fcbe 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
@@ -251,7 +251,7 @@ public final class StyleTextPropAtom extends RecordAtom {
}
if (rawContents.length > 0 && textHandled != (size+1)){
- logger.log(POILogger.WARN, "Problem reading paragraph style runs: textHandled = ", textHandled, ", text.size+1 = ", (size+1));
+ LOG.log(POILogger.WARN, "Problem reading paragraph style runs: textHandled = ", textHandled, ", text.size+1 = ", (size+1));
}
// Now do the character stylings
@@ -283,7 +283,7 @@ public final class StyleTextPropAtom extends RecordAtom {
}
}
if (rawContents.length > 0 && textHandled != (size+1)){
- logger.log(POILogger.WARN, "Problem reading character style runs: textHandled = ", textHandled, ", text.size+1 = ", (size+1));
+ LOG.log(POILogger.WARN, "Problem reading character style runs: textHandled = ", textHandled, ", text.size+1 = ", (size+1));
}
// Handle anything left over
@@ -296,7 +296,7 @@ public final class StyleTextPropAtom extends RecordAtom {
private int checkTextLength(int readLength, int handledSoFar, int overallSize) {
if (readLength + handledSoFar > overallSize + 1) {
- logger.log(POILogger.WARN, "Style length of ", readLength, " at ", handledSoFar,
+ LOG.log(POILogger.WARN, "Style length of ", readLength, " at ", handledSoFar,
" larger than stated size of ", overallSize, ", truncating");
return overallSize + 1 - handledSoFar;
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/record/TextRulerAtom.java b/src/scratchpad/src/org/apache/poi/hslf/record/TextRulerAtom.java
index 2ffb80a949..9ca6644789 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/record/TextRulerAtom.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/record/TextRulerAtom.java
@@ -98,7 +98,7 @@ public final class TextRulerAtom extends RecordAtom {
// Get the record data.
read(leis);
} catch (IOException e){
- logger.log(POILogger.ERROR, "Failed to parse TextRulerAtom: ", e.getMessage());
+ LOG.log(POILogger.ERROR, "Failed to parse TextRulerAtom: ", e.getMessage());
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFNotes.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFNotes.java
index 70f15e0213..f5806790a5 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFNotes.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFNotes.java
@@ -36,14 +36,14 @@ import org.apache.poi.util.POILogger;
*/
public final class HSLFNotes extends HSLFSheet implements Notes<HSLFShape,HSLFTextParagraph> {
- protected static final POILogger logger = POILogFactory.getLogger(HSLFNotes.class);
-
- private List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<>();
+ private static final POILogger LOG = POILogFactory.getLogger(HSLFNotes.class);
+
+ private final List<List<HSLFTextParagraph>> _paragraphs = new ArrayList<>();
/**
* Constructs a Notes Sheet from the given Notes record.
* Initialises TextRuns, to provide easier access to the text
- *
+ *
* @param notes the Notes record to read from
*/
public HSLFNotes(org.apache.poi.hslf.record.Notes notes) {
@@ -55,9 +55,9 @@ public final class HSLFNotes extends HSLFSheet implements Notes<HSLFShape,HSLFTe
for (List<HSLFTextParagraph> l : HSLFTextParagraph.findTextParagraphs(getPPDrawing(), this)) {
if (!_paragraphs.contains(l)) _paragraphs.add(l);
}
-
+
if (_paragraphs.isEmpty()) {
- logger.log(POILogger.WARN, "No text records found for notes sheet");
+ LOG.log(POILogger.WARN, "No text records found for notes sheet");
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java
index 15273ddb05..67896494de 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFShapeFactory.java
@@ -45,12 +45,10 @@ import org.apache.poi.util.POILogger;
/**
* Create a <code>Shape</code> object depending on its type
- *
- * @author Yegor Kozlov
*/
public final class HSLFShapeFactory {
// For logging
- protected static final POILogger logger = POILogFactory.getLogger(HSLFShapeFactory.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HSLFShapeFactory.class);
/**
* Create a new shape from the data provided.
@@ -79,15 +77,15 @@ public final class HSLFShapeFactory {
}
}
}
-
+
HSLFGroupShape group;
if (isTable) {
group = new HSLFTable(spContainer, parent);
-
+
} else {
group = new HSLFGroupShape(spContainer, parent);
}
-
+
return group;
}
@@ -114,7 +112,7 @@ public final class HSLFShapeFactory {
if (parent instanceof HSLFTable) {
EscherTextboxRecord etr = spContainer.getChildById(EscherTextboxRecord.RECORD_ID);
if (etr == null) {
- logger.log(POILogger.WARN, "invalid ppt - add EscherTextboxRecord to cell");
+ LOG.log(POILogger.WARN, "invalid ppt - add EscherTextboxRecord to cell");
etr = new EscherTextboxRecord();
etr.setRecordId(EscherTextboxRecord.RECORD_ID);
etr.setOptions((short)15);
@@ -141,24 +139,24 @@ public final class HSLFShapeFactory {
break;
}
}
-
+
ExObjRefAtom oes = getClientDataRecord(spContainer, RecordTypes.ExObjRefAtom.typeID);
return (oes != null)
? new HSLFObjectShape(spContainer, parent)
: new HSLFPictureShape(spContainer, parent);
}
-
+
private static HSLFShape createNonPrimitive(EscherContainerRecord spContainer, ShapeContainer<HSLFShape,HSLFTextParagraph> parent) {
AbstractEscherOptRecord opt = HSLFShape.getEscherChild(spContainer, EscherOptRecord.RECORD_ID);
EscherProperty prop = HSLFShape.getEscherProperty(opt, EscherPropertyTypes.GEOMETRY__VERTICES);
if(prop != null) {
return new HSLFFreeformShape(spContainer, parent);
}
-
- logger.log(POILogger.INFO, "Creating AutoShape for a NotPrimitive shape");
+
+ LOG.log(POILogger.INFO, "Creating AutoShape for a NotPrimitive shape");
return new HSLFAutoShape(spContainer, parent);
}
-
+
@SuppressWarnings("unchecked")
protected static <T extends Record> T getClientDataRecord(EscherContainerRecord spContainer, int recordType) {
HSLFEscherClientDataRecord cldata = spContainer.getChildById(EscherClientDataRecord.RECORD_ID);
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java
index fff3764bb4..922bbfc3f0 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java
@@ -60,7 +60,7 @@ import org.apache.poi.util.Units;
public abstract class HSLFSimpleShape extends HSLFShape implements SimpleShape<HSLFShape,HSLFTextParagraph> {
private static final POILogger LOG = POILogFactory.getLogger(HSLFSimpleShape.class);
- public final static double DEFAULT_LINE_WIDTH = 0.75;
+ public static final double DEFAULT_LINE_WIDTH = 0.75;
protected static final EscherPropertyTypes[] ADJUST_VALUES = {
EscherPropertyTypes.GEOMETRY__ADJUSTVALUE,
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
index 9e8d255798..6052a49800 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShow.java
@@ -73,14 +73,17 @@ import org.apache.poi.util.Units;
*/
public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFShape,HSLFTextParagraph>, Closeable, GenericRecord {
- //arbitrarily selected; may need to increase
- private static final int MAX_RECORD_LENGTH = 10_000_000;
-
/** Powerpoint document entry/stream name */
- public static final String POWERPOINT_DOCUMENT = "PowerPoint Document";
+ public static final String POWERPOINT_DOCUMENT = "PowerPoint Document";
public static final String PP97_DOCUMENT = "PP97_DUALSTORAGE";
public static final String PP95_DOCUMENT = "PP40";
+ // For logging
+ private static final POILogger LOG = POILogFactory.getLogger(HSLFSlideShow.class);
+
+ //arbitrarily selected; may need to increase
+ private static final int MAX_RECORD_LENGTH = 10_000_000;
+
enum LoadSavePhase {
INIT, LOADED
}
@@ -106,9 +109,6 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
private final List<HSLFNotes> _notes = new ArrayList<>();
private FontCollection _fonts;
- // For logging
- private static final POILogger logger = POILogFactory.getLogger(HSLFSlideShow.class);
-
/**
* Constructs a Powerpoint document from the underlying
@@ -290,7 +290,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
if (coreRecordId != null) {
return _mostRecentCoreRecords[coreRecordId];
}
- logger.log(POILogger.ERROR,
+ LOG.log(POILogger.ERROR,
"We tried to look up a reference to a core record, but there was no core ID for reference ID ", refID);
return null;
}
@@ -382,13 +382,13 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
// we need to add null-records, otherwise the index references to other existing don't work anymore
if (r == null) {
- logger.log(POILogger.WARN, loggerLoc+", but that record didn't exist - record ignored.");
+ LOG.log(POILogger.WARN, loggerLoc+", but that record didn't exist - record ignored.");
continue;
}
// Ensure it really is a notes record
if (!(r instanceof Notes)) {
- logger.log(POILogger.ERROR, loggerLoc, ", but that was actually a ", r);
+ LOG.log(POILogger.ERROR, loggerLoc, ", but that was actually a ", r);
continue;
}
@@ -420,7 +420,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
// Ensure it really is a slide record
if (!(r instanceof Slide)) {
- logger.log(POILogger.ERROR, "A Slide SlideAtomSet at ", idx,
+ LOG.log(POILogger.ERROR, "A Slide SlideAtomSet at ", idx,
" said its record was at refID ",
spa.getRefID(),
", but that was actually a ", r);
@@ -439,7 +439,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
if (notesPos != null && 0 <= notesPos && notesPos < _notes.size()) {
notes = _notes.get(notesPos);
} else {
- logger.log(POILogger.ERROR, "Notes not found for noteId=", noteId);
+ LOG.log(POILogger.ERROR, "Notes not found for noteId=", noteId);
}
}
@@ -759,7 +759,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
// Add in to the list of Slides
_slides.add(slide);
- logger.log(POILogger.INFO, "Added slide ", _slides.size(), " with ref ", sp.getRefID(),
+ LOG.log(POILogger.INFO, "Added slide ", _slides.size(), " with ref ", sp.getRefID(),
" and identifier ", sp.getSlideIdentifier());
// Add the core records for this new Slide to the record tree
@@ -1145,7 +1145,7 @@ public final class HSLFSlideShow extends POIDocument implements SlideShow<HSLFSh
int slideOffset = slideRecord.getLastOnDiskOffset();
slideRecord.setLastOnDiskOffset(slideOffset);
ptr.addSlideLookup(psrId, slideOffset);
- logger.log(POILogger.INFO, "New slide/object ended up at ", slideOffset);
+ LOG.log(POILogger.INFO, "New slide/object ended up at ", slideOffset);
return psrId;
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
index c5a43fff87..aa5671e06e 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
@@ -68,7 +68,7 @@ import org.apache.poi.util.POILogger;
* "reader". It is only a very basic class for now
*/
public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
- private static final POILogger logger = POILogFactory.getLogger(HSLFSlideShowImpl.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HSLFSlideShowImpl.class);
static final int UNSET_OFFSET = -1;
@@ -303,7 +303,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
int type = LittleEndian.getUShort(docstream, usrOffset + 2);
int len = LittleEndian.getInt(docstream, usrOffset + 4);
if (ver_inst == 0 && type == 4085 && (len == 0x1C || len == 0x20)) {
- logger.log(POILogger.WARN, "Repairing invalid user edit atom");
+ LOG.log(POILogger.WARN, "Repairing invalid user edit atom");
usr.setLastUserEditAtomOffset(usrOffset);
} else {
throw new CorruptPowerPointFileException("Powerpoint document contains invalid user edit atom");
@@ -329,7 +329,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
try {
currentUser = new CurrentUserAtom(getDirectory());
} catch (IOException ie) {
- logger.log(POILogger.ERROR, "Error finding Current User Atom", ie);
+ LOG.log(POILogger.ERROR, "Error finding Current User Atom", ie);
currentUser = new CurrentUserAtom();
}
}
@@ -393,14 +393,14 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
// If they type (including the bonus 0xF018) is 0, skip it
PictureType pt = PictureType.forNativeID(type - 0xF018);
if (pt == null) {
- logger.log(POILogger.ERROR, "Problem reading picture: Invalid image type 0, on picture with length ", imgsize, ".\nYour document will probably become corrupted if you save it!");
- logger.log(POILogger.ERROR, "position: ", pos);
+ LOG.log(POILogger.ERROR, "Problem reading picture: Invalid image type 0, on picture with length ", imgsize, ".\nYour document will probably become corrupted if you save it!");
+ LOG.log(POILogger.ERROR, "position: ", pos);
} else {
//The pictstream can be truncated halfway through a picture.
//This is not a problem if the pictstream contains extra pictures
//that are not used in any slide -- BUG-60305
if (pos + imgsize > pictstream.length) {
- logger.log(POILogger.WARN, "\"Pictures\" stream may have ended early. In some circumstances, this is not a problem; " +
+ LOG.log(POILogger.WARN, "\"Pictures\" stream may have ended early. In some circumstances, this is not a problem; " +
"in others, this could indicate a corrupt file");
break;
}
@@ -417,7 +417,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
pict.setIndex(_pictures.size() + 1); // index is 1-based
_pictures.add(pict);
} catch (IllegalArgumentException e) {
- logger.log(POILogger.ERROR, "Problem reading picture: ", e, "\nYour document will probably become corrupted if you save it!");
+ LOG.log(POILogger.ERROR, "Problem reading picture: ", e, "\nYour document will probably become corrupted if you save it!");
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
index 6a763101f6..867f573fcb 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
@@ -82,7 +82,7 @@ import org.apache.poi.util.Units;
*/
public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFTextParagraph,HSLFTextRun> {
- protected static final POILogger logger = POILogFactory.getLogger(HSLFTextParagraph.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HSLFTextParagraph.class);
/**
* How to align the text
@@ -322,7 +322,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
}
if (startIdx[0] >= records.length) {
- logger.log(POILogger.INFO, "header atom wasn't found - container might contain only an OutlineTextRefAtom");
+ LOG.log(POILogger.INFO, "header atom wasn't found - container might contain only an OutlineTextRefAtom");
return new org.apache.poi.hslf.record.Record[0];
}
@@ -884,7 +884,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
} else {
master = sheet.getMasterSheet();
if (master == null) {
- logger.log(POILogger.WARN, "MasterSheet is not available");
+ LOG.log(POILogger.WARN, "MasterSheet is not available");
return null;
}
}
@@ -984,7 +984,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
}
if (style == null) {
- logger.log(POILogger.INFO, "styles atom doesn't exist. Creating dummy record for later saving.");
+ LOG.log(POILogger.INFO, "styles atom doesn't exist. Creating dummy record for later saving.");
style = new StyleTextPropAtom((textLen < 0) ? 1 : textLen);
} else {
if (textLen >= 0) {
@@ -1395,7 +1395,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
}
}
if (rv == null || rv.isEmpty()) {
- logger.log(POILogger.WARN, "text run not found for OutlineTextRefAtom.TextIndex=" + idx);
+ LOG.log(POILogger.WARN, "text run not found for OutlineTextRefAtom.TextIndex=" + idx);
}
} else {
if (sheet != null) {
@@ -1481,7 +1481,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
if (tbytes == null && tchars == null) {
tbytes = new TextBytesAtom();
// don't add record yet - set it in storeText
- logger.log(POILogger.INFO, "bytes nor chars atom doesn't exist. Creating dummy record for later saving.");
+ LOG.log(POILogger.INFO, "bytes nor chars atom doesn't exist. Creating dummy record for later saving.");
}
String rawText = (tchars != null) ? tchars.getText() : tbytes.getText();
@@ -1510,7 +1510,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
}
if (paragraphCollection.isEmpty()) {
- logger.log(POILogger.DEBUG, "No text records found.");
+ LOG.log(POILogger.DEBUG, "No text records found.");
}
return paragraphCollection;
diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java
index 144fa33950..c17f60c1e0 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextRun.java
@@ -46,7 +46,7 @@ import org.apache.poi.util.POILogger;
*/
@SuppressWarnings({"WeakerAccess", "Duplicates", "unused"})
public final class HSLFTextRun implements TextRun {
- private static final POILogger logger = POILogFactory.getLogger(HSLFTextRun.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HSLFTextRun.class);
/** The TextRun we belong to */
private HSLFTextParagraph parentParagraph;
@@ -147,13 +147,13 @@ public final class HSLFTextRun implements TextRun {
final int txtype = parentParagraph.getRunType();
final HSLFSheet sheet = parentParagraph.getSheet();
if (sheet == null) {
- logger.log(POILogger.ERROR, "Sheet is not available");
+ LOG.log(POILogger.ERROR, "Sheet is not available");
return null;
}
final HSLFMasterSheet master = sheet.getMasterSheet();
if (master == null) {
- logger.log(POILogger.WARN, "MasterSheet is not available");
+ LOG.log(POILogger.WARN, "MasterSheet is not available");
return null;
}
diff --git a/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java b/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
index 58273e9caa..469bd9b6d1 100644
--- a/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
+++ b/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
@@ -56,10 +56,10 @@ import org.apache.poi.util.POILogger;
/**
* Reads an Outlook MSG File in and provides hooks into its data structure.
- *
+ *
* If you want to develop with HSMF, you might find it worth getting
* some of the Microsoft public documentation, such as:
- *
+ *
* [MS-OXCMSG]: Message and Attachment Object Protocol Specification
*/
public class MAPIMessage extends POIReadOnlyDocument {
@@ -79,8 +79,8 @@ public class MAPIMessage extends POIReadOnlyDocument {
}
/** For logging problems we spot with the file */
- private POILogger logger = POILogFactory.getLogger(MAPIMessage.class);
-
+ private static final POILogger LOG = POILogFactory.getLogger(MAPIMessage.class);
+
private Chunks mainChunks;
private NameIdChunks nameIdChunks;
private RecipientChunks[] recipientChunks;
@@ -99,7 +99,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Constructor for reading MSG Files from the file system.
- *
+ *
* @param filename Name of the file to read
* @exception IOException on errors reading, or invalid data
*/
@@ -108,7 +108,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
}
/**
* Constructor for reading MSG Files from the file system.
- *
+ *
* @param file The file to read from
* @exception IOException on errors reading, or invalid data
*/
@@ -118,10 +118,10 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Constructor for reading MSG Files from an input stream.
- *
+ *
* <p>Note - this will buffer the whole message into memory
* in order to process. For lower memory use, use {@link #MAPIMessage(File)}
- *
+ *
* @param in The InputStream to buffer then read from
* @exception IOException on errors reading, or invalid data
*/
@@ -130,7 +130,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
}
/**
* Constructor for reading MSG Files from a POIFS filesystem
- *
+ *
* @param fs Open POIFS FileSystem containing the message
* @exception IOException on errors reading, or invalid data
*/
@@ -221,7 +221,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
byte[] htmlBodyBinary = htmlBodyBinaryChunk.getValue();
return new String(htmlBodyBinary, encoding);
} catch (UnsupportedEncodingException e) {
- logger.log(POILogger.WARN, "HTML body binary: Invalid codepage ID ", codepage, " set for the message via ",
+ LOG.log(POILogger.WARN, "HTML body binary: Invalid codepage ID ", codepage, " set for the message via ",
MAPIProperty.INTERNET_CPID, ", ignoring");
}
}
@@ -246,7 +246,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
throw new ChunkNotFoundException();
}
}
-
+
try {
MAPIRtfAttribute rtf = new MAPIRtfAttribute(
MAPIProperty.RTF_COMPRESSED, Types.BINARY.getId(), chunk.getValue()
@@ -279,8 +279,8 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Gets the display value of the "TO" line of the outlook message.
* If there are multiple recipients, they will be separated
- * by semicolons.
- * This is not the actual list of addresses/values that will be
+ * by semicolons.
+ * This is not the actual list of addresses/values that will be
* sent to if you click Reply in the email - those are stored
* in {@link RecipientChunks}.
* @throws ChunkNotFoundException If the to-chunk does not exist and
@@ -293,8 +293,8 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Gets the display value of the "CC" line of the outlook message.
* If there are multiple recipients, they will be separated
- * by semicolons.
- * This is not the actual list of addresses/values that will be
+ * by semicolons.
+ * This is not the actual list of addresses/values that will be
* sent to if you click Reply in the email - those are stored
* in {@link RecipientChunks}.
* @throws ChunkNotFoundException If the cc-chunk does not exist and
@@ -307,8 +307,8 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Gets the display value of the "BCC" line of the outlook message.
* If there are multiple recipients, they will be separated
- * by semicolons.
- * This is not the actual list of addresses/values that will be
+ * by semicolons.
+ * This is not the actual list of addresses/values that will be
* sent to if you click Reply in the email - those are stored
* in {@link RecipientChunks}.
* This will only be present in sent emails, not received ones!
@@ -321,7 +321,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Returns all the recipients' email address, separated by
- * semicolons. Checks all the likely chunks in search of
+ * semicolons. Checks all the likely chunks in search of
* the addresses.
*/
public String getRecipientEmailAddress() throws ChunkNotFoundException {
@@ -330,7 +330,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Returns an array of all the recipient's email address, normally
* in TO then CC then BCC order.
- * Checks all the likely chunks in search of the addresses.
+ * Checks all the likely chunks in search of the addresses.
*/
public String[] getRecipientEmailAddressList() throws ChunkNotFoundException {
if(recipientChunks == null || recipientChunks.length == 0) {
@@ -358,7 +358,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Returns all the recipients' names, separated by
- * semicolons. Checks all the likely chunks in search of
+ * semicolons. Checks all the likely chunks in search of
* the names.
* See also {@link #getDisplayTo()}, {@link #getDisplayCC()}
* and {@link #getDisplayBCC()}.
@@ -369,7 +369,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Returns an array of all the recipient's names, normally
* in TO then CC then BCC order.
- * Checks all the likely chunks in search of the names.
+ * Checks all the likely chunks in search of the names.
* See also {@link #getDisplayTo()}, {@link #getDisplayCC()}
* and {@link #getDisplayBCC()}.
*/
@@ -391,7 +391,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
return names;
}
-
+
/**
* Tries to identify the correct encoding for 7-bit (non-unicode)
* strings in the file.
@@ -400,7 +400,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
* strings, but don't always store the encoding anywhere
* helpful in the file.</p>
* <p>This method checks for codepage properties, and failing that
- * looks at the headers for the message, and uses these to
+ * looks at the headers for the message, and uses these to
* guess the correct encoding for your file.</p>
* <p>Bug #49441 has more on why this is needed</p>
*/
@@ -418,7 +418,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
String encoding = CodePageUtil.codepageToEncoding(codepage, true);
generalcodepage = encoding;
} catch (UnsupportedEncodingException e) {
- logger.log(POILogger.WARN, "Invalid codepage ID ", codepage, " set for the message via ",
+ LOG.log(POILogger.WARN, "Invalid codepage ID ", codepage, " set for the message via ",
MAPIProperty.MESSAGE_CODEPAGE, ", ignoring");
}
}
@@ -436,7 +436,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
generalcodepage = encoding;
}
} catch (UnsupportedEncodingException e) {
- logger.log(POILogger.WARN, "Invalid codepage ID ", codepage, "from locale ID", lcid, " set for the message via ",
+ LOG.log(POILogger.WARN, "Invalid codepage ID ", codepage, "from locale ID", lcid, " set for the message via ",
MAPIProperty.MESSAGE_LOCALE_ID, ", ignoring");
}
}
@@ -476,7 +476,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
bodycodepage = encoding;
}
} catch (UnsupportedEncodingException e) {
- logger.log(POILogger.WARN, "Invalid codepage ID ", codepage, " set for the message via ",
+ LOG.log(POILogger.WARN, "Invalid codepage ID ", codepage, " set for the message via ",
MAPIProperty.INTERNET_CPID, ", ignoring");
}
}
@@ -534,7 +534,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
}
}
}
-
+
/**
* Does this file contain any strings that
* are stored as 7 bit rather than unicode?
@@ -547,7 +547,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
}
}
}
-
+
if (nameIdChunks!=null) {
for(Chunk c : nameIdChunks.getChunks()) {
if(c instanceof StringChunk) {
@@ -557,7 +557,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
}
}
}
-
+
for(RecipientChunks rc : recipientChunks) {
for(Chunk c : rc.getAll()) {
if(c instanceof StringChunk) {
@@ -569,7 +569,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
}
return false;
}
-
+
/**
* Returns all the headers, one entry per line
*/
@@ -617,7 +617,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
} else if (mc.equalsIgnoreCase("IPM.Post")) {
return MESSAGE_CLASS.POST;
} else {
- logger.log(POILogger.WARN, "I don't recognize message class '", mc, "'. ",
+ LOG.log(POILogger.WARN, "I don't recognize message class '", mc, "'. ",
"Please open an issue on POI's bugzilla");
return MESSAGE_CLASS.UNKNOWN;
}
@@ -642,7 +642,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
}
}
}
-
+
if(returnNullOnMissingChunk)
return null;
throw new ChunkNotFoundException();
@@ -681,7 +681,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
- * Will you get a null on a missing chunk, or a
+ * Will you get a null on a missing chunk, or a
* {@link ChunkNotFoundException} (default is the
* exception).
*/
@@ -692,7 +692,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
/**
* Sets whether on asking for a missing chunk,
* you get back null or a {@link ChunkNotFoundException}
- * (default is the exception).
+ * (default is the exception).
*/
public void setReturnNullOnMissingChunk(boolean returnNullOnMissingChunk) {
this.returnNullOnMissingChunk = returnNullOnMissingChunk;
diff --git a/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java b/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
index 56aa9bb93c..8800437bbd 100644
--- a/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
+++ b/src/scratchpad/src/org/apache/poi/hsmf/datatypes/PropertiesChunk.java
@@ -68,7 +68,7 @@ public abstract class PropertiesChunk extends Chunk {
public static final int PROPERTIES_FLAG_WRITEABLE = 4;
/** For logging problems we spot with the file */
- private POILogger logger = POILogFactory.getLogger(PropertiesChunk.class);
+ private static final POILogger LOG = POILogFactory.getLogger(PropertiesChunk.class);
/**
* Holds properties, indexed by type. If a property is multi-valued, or
@@ -176,7 +176,7 @@ public abstract class PropertiesChunk extends Chunk {
if (chunk != null) {
cVal.setValue(chunk);
} else {
- logger.log(POILogger.WARN, "No chunk found matching Property " + cVal);
+ LOG.log(POILogger.WARN, "No chunk found matching Property " + cVal);
}
}
}
@@ -200,7 +200,7 @@ public abstract class PropertiesChunk extends Chunk {
prop = MAPIProperty.createCustom(id, type, "Unknown " + id);
}
if (type == null) {
- logger.log(POILogger.WARN, "Invalid type found, expected ",
+ LOG.log(POILogger.WARN, "Invalid type found, expected ",
prop.usualType, " but got ", typeID,
" for property ", prop);
going = false;
@@ -220,11 +220,11 @@ public abstract class PropertiesChunk extends Chunk {
// We don't know what this property normally is, but it
// has come
// through with a valid type, so use that
- logger.log(POILogger.INFO, "Property definition for ", prop,
+ LOG.log(POILogger.INFO, "Property definition for ", prop,
" is missing a type definition, found a value with type ", type);
} else {
// Oh dear, something has gone wrong...
- logger.log(POILogger.WARN, "Type mismatch, expected ",
+ LOG.log(POILogger.WARN, "Type mismatch, expected ",
prop.usualType, " but got ", type, " for property ", prop);
going = false;
break;
@@ -285,7 +285,7 @@ public abstract class PropertiesChunk extends Chunk {
}
if (properties.get(prop) != null) {
- logger.log(POILogger.WARN,
+ LOG.log(POILogger.WARN,
"Duplicate values found for " + prop);
}
properties.put(prop, propVal);
@@ -298,7 +298,7 @@ public abstract class PropertiesChunk extends Chunk {
/**
* Writes this chunk in the specified {@code DirectoryEntry}.
- *
+ *
* @param directory
* The directory.
* @throws IOException
@@ -316,11 +316,11 @@ public abstract class PropertiesChunk extends Chunk {
// write the property values
writeNodeData(directory, values);
}
-
+
/**
* Write the nodes for variable-length data. Those properties are returned by
* {@link #writeProperties(java.io.OutputStream)}.
- *
+ *
* @param directory
* The directory.
* @param values
@@ -338,7 +338,7 @@ public abstract class PropertiesChunk extends Chunk {
/**
* Writes the header of the properties.
- *
+ *
* @param out
* The {@code OutputStream}.
* @return The variable-length properties that need to be written in another
diff --git a/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java b/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
index 1cfb415b66..08b5c4ec22 100644
--- a/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
+++ b/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToFoConverter.java
@@ -60,8 +60,7 @@ public class ExcelToFoConverter extends AbstractExcelConverter
private static final float DPI = 72;
- private static final POILogger logger = POILogFactory
- .getLogger( ExcelToFoConverter.class );
+ private static final POILogger LOG = POILogFactory.getLogger( ExcelToFoConverter.class );
private static final float PAPER_A4_HEIGHT_INCHES = 29.4f / CM_PER_INCH;
@@ -233,7 +232,7 @@ public class ExcelToFoConverter extends AbstractExcelConverter
value = ErrorEval.getText( cell.getErrorCellValue() );
break;
default:
- logger.log(
+ LOG.log(
POILogger.WARN,
"Unexpected cell cachedFormulaResultType ("
+ cell.getCachedFormulaResultType() + ")" );
@@ -254,7 +253,7 @@ public class ExcelToFoConverter extends AbstractExcelConverter
value = ErrorEval.getText( cell.getErrorCellValue() );
break;
default:
- logger.log( POILogger.WARN,
+ LOG.log( POILogger.WARN,
"Unexpected cell type (" + cell.getCellType() + ")" );
return true;
}
diff --git a/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java b/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
index 1384cc67f0..ea6bf7665d 100644
--- a/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
+++ b/src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
@@ -58,8 +58,7 @@ import org.w3c.dom.Text;
*/
@Beta
public class ExcelToHtmlConverter extends AbstractExcelConverter {
- private static final POILogger logger = POILogFactory
- .getLogger( ExcelToHtmlConverter.class );
+ private static final POILogger LOG = POILogFactory.getLogger( ExcelToHtmlConverter.class );
/**
* Java main() interface to interact with {@link ExcelToHtmlConverter}
@@ -323,7 +322,7 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter {
value = ErrorEval.getText( cell.getErrorCellValue() );
break;
default:
- logger.log(
+ LOG.log(
POILogger.WARN,
"Unexpected cell cachedFormulaResultType ("
+ cell.getCachedFormulaResultType() + ")" );
@@ -344,7 +343,7 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter {
value = ErrorEval.getText( cell.getErrorCellValue() );
break;
default:
- logger.log( POILogger.WARN,
+ LOG.log( POILogger.WARN,
"Unexpected cell type (" + cell.getCellType() + ")" );
return true;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmapDib.java b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmapDib.java
index 85c2d4efe9..7af8322f01 100644
--- a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmapDib.java
+++ b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmapDib.java
@@ -52,7 +52,7 @@ import org.apache.poi.util.RecordFormatException;
*/
public class HwmfBitmapDib implements GenericRecord {
- private static final POILogger logger = POILogFactory.getLogger(HwmfBitmapDib.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HwmfBitmapDib.class);
private static final int BMP_HEADER_SIZE = 14;
private static final int MAX_RECORD_LENGTH = HwmfPicture.MAX_RECORD_LENGTH;
@@ -479,7 +479,7 @@ public class HwmfBitmapDib implements GenericRecord {
try {
bi = ImageIO.read(getBMPStream());
} catch (IOException|RuntimeException e) {
- logger.log(POILogger.ERROR, "invalid bitmap data - returning placeholder image");
+ LOG.log(POILogger.ERROR, "invalid bitmap data - returning placeholder image");
return getPlaceholder();
}
diff --git a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java
index 910c9ac88b..c806befd00 100644
--- a/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java
+++ b/src/scratchpad/src/org/apache/poi/hwmf/record/HwmfText.java
@@ -48,7 +48,7 @@ import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
public class HwmfText {
- private static final POILogger logger = POILogFactory.getLogger(HwmfText.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HwmfText.class);
private static final int MAX_RECORD_LENGTH = 1_000_000;
/**
@@ -430,13 +430,13 @@ public class HwmfText {
size += rawTextBytes.length;
if (size >= remainingRecordSize) {
- logger.log(POILogger.INFO, "META_EXTTEXTOUT doesn't contain character tracking info");
+ LOG.log(POILogger.INFO, "META_EXTTEXTOUT doesn't contain character tracking info");
return size;
}
int dxLen = Math.min(stringLength, (remainingRecordSize-size)/LittleEndianConsts.SHORT_SIZE);
if (dxLen < stringLength) {
- logger.log(POILogger.WARN, "META_EXTTEXTOUT tracking info doesn't cover all characters");
+ LOG.log(POILogger.WARN, "META_EXTTEXTOUT tracking info doesn't cover all characters");
}
for (int i=0; i<dxLen; i++) {
diff --git a/src/scratchpad/src/org/apache/poi/hwmf/usermodel/HwmfPicture.java b/src/scratchpad/src/org/apache/poi/hwmf/usermodel/HwmfPicture.java
index 3eccdb6800..76096de417 100644
--- a/src/scratchpad/src/org/apache/poi/hwmf/usermodel/HwmfPicture.java
+++ b/src/scratchpad/src/org/apache/poi/hwmf/usermodel/HwmfPicture.java
@@ -57,7 +57,7 @@ public class HwmfPicture implements Iterable<HwmfRecord>, GenericRecord {
/** Max. record length - processing longer records will throw an exception */
public static final int MAX_RECORD_LENGTH = 50_000_000;
- private static final POILogger logger = POILogFactory.getLogger(HwmfPicture.class);
+ private static final POILogger LOG = POILogFactory.getLogger(HwmfPicture.class);
final List<HwmfRecord> records = new ArrayList<>();
final HwmfPlaceableHeader placeableHeader;
@@ -85,7 +85,7 @@ public class HwmfPicture implements Iterable<HwmfRecord>, GenericRecord {
recordSize = (int)recordSizeLong;
recordFunction = leis.readShort();
} catch (Exception e) {
- logger.log(POILogger.ERROR, "unexpected eof - wmf file was truncated");
+ LOG.log(POILogger.ERROR, "unexpected eof - wmf file was truncated");
break;
}
// 4 bytes (recordSize) + 2 bytes (recordFunction)
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java b/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java
index a8fb4078a7..dd44d45d70 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/HWPFOldDocument.java
@@ -51,13 +51,12 @@ import org.apache.poi.util.StringUtil;
*/
public class HWPFOldDocument extends HWPFDocumentCore {
- private static final POILogger logger = POILogFactory
- .getLogger( HWPFOldDocument.class );
+ private static final POILogger LOG = POILogFactory.getLogger( HWPFOldDocument.class );
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 10_000_000;
- private final static Charset DEFAULT_CHARSET = StringUtil.WIN_1252;
+ private static final Charset DEFAULT_CHARSET = StringUtil.WIN_1252;
private OldTextPieceTable tpt;
@@ -115,7 +114,7 @@ public class HWPFOldDocument extends HWPFDocumentCore {
//if there was a problem with the guessed charset and the length of the
//textpiece, back off to win1252. This is effectively what we used to do.
tp = buildTextPiece(StringUtil.WIN_1252);
- logger.log(POILogger.WARN, "Error with "+guessedCharset +". Backing off to Windows-1252");
+ LOG.log(POILogger.WARN, "Error with "+guessedCharset +". Backing off to Windows-1252");
}
tpt.add(tp);
@@ -206,7 +205,7 @@ public class HWPFOldDocument extends HWPFDocumentCore {
return wmfCharset.getCharset();
}
}
- logger.log(POILogger.WARN, "Couldn't find a defined charset; backing off to cp1252");
+ LOG.log(POILogger.WARN, "Couldn't find a defined charset; backing off to cp1252");
//if all else fails
return DEFAULT_CHARSET;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
index 28a46b81dd..b6b56c8bca 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java
@@ -121,8 +121,7 @@ public abstract class AbstractWordConverter
private static final byte FIELD_SEPARATOR_MARK = 20;
- private static final POILogger logger = POILogFactory
- .getLogger( AbstractWordConverter.class );
+ private static final POILogger LOG = POILogFactory.getLogger( AbstractWordConverter.class );
private static final Pattern PATTERN_HYPERLINK_EXTERNAL = Pattern
.compile( "^[ \\t\\r\\n]*HYPERLINK \"(.*)\".*$" );
@@ -449,7 +448,7 @@ public abstract class AbstractWordConverter
{
if ( previous > range.getEndOffset() )
{
- logger.log( POILogger.WARN, "Latest structure in ", range,
+ LOG.log( POILogger.WARN, "Latest structure in ", range,
" ended at #", previous, " after range boundaries [",
range.getStartOffset(), "; ", range.getEndOffset(),
")" );
@@ -674,7 +673,7 @@ public abstract class AbstractWordConverter
debug.append( range.getCharacterRun( i ) );
debug.append( "\n" );
}
- logger.log( POILogger.WARN, debug );
+ LOG.log( POILogger.WARN, debug );
Range deadFieldValueSubrage = new Range( range.getCharacterRun(
separatorMark ).getStartOffset() + 1, range.getCharacterRun(
@@ -706,7 +705,7 @@ public abstract class AbstractWordConverter
}
catch ( Exception exc )
{
- logger.log( POILogger.WARN,
+ LOG.log( POILogger.WARN,
"Unable to process document summary information: ", exc,
exc );
}
@@ -747,7 +746,7 @@ public abstract class AbstractWordConverter
.getOfficeDrawingAt( characterRun.getStartOffset() );
if ( officeDrawing == null )
{
- logger.log( POILogger.WARN, "Characters #", characterRun,
+ LOG.log( POILogger.WARN, "Characters #", characterRun,
" references missing drawn object" );
return;
}
@@ -812,7 +811,7 @@ public abstract class AbstractWordConverter
{
if ( !field.hasSeparator() )
{
- logger.log( POILogger.WARN, parentRange, " contains ", field,
+ LOG.log( POILogger.WARN, parentRange, " contains ", field,
" with 'Embedded Object' but without separator mark" );
return;
}
@@ -898,7 +897,7 @@ public abstract class AbstractWordConverter
}
}
- logger.log( POILogger.WARN, parentRange, " contains ", field,
+ LOG.log( POILogger.WARN, parentRange, " contains ", field,
" with unsupported type or format" );
processCharacters( wordDocument, currentTableLevel,
field.secondSubrange( parentRange ), currentBlock );
@@ -1011,7 +1010,7 @@ public abstract class AbstractWordConverter
"_" + characterRun.getPicOffset() );
if ( entry == null )
{
- logger.log( POILogger.WARN, "Referenced OLE2 object '",
+ LOG.log( POILogger.WARN, "Referenced OLE2 object '",
Integer.valueOf( characterRun.getPicOffset() ),
"' not found in ObjectPool" );
return false;
@@ -1023,7 +1022,7 @@ public abstract class AbstractWordConverter
}
catch ( Exception exc )
{
- logger.log( POILogger.WARN,
+ LOG.log( POILogger.WARN,
"Unable to convert internal OLE2 object '",
Integer.valueOf( characterRun.getPicOffset() ), "': ", exc,
exc );
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java
index bfe64868f2..ab89c92e49 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordUtils.java
@@ -51,8 +51,7 @@ public class AbstractWordUtils
{
static final String EMPTY = "";
- private static final POILogger logger = POILogFactory
- .getLogger( AbstractWordUtils.class );
+ private static final POILogger LOG = POILogFactory.getLogger( AbstractWordUtils.class );
public static final float TWIPS_PER_INCH = 1440.0f;
public static final int TWIPS_PER_PT = 20;
@@ -418,7 +417,7 @@ public class AbstractWordUtils
case 2057:
return "en-uk";
default:
- logger.log( POILogger.WARN, "Uknown or unmapped language code: ", languageCode);
+ LOG.log( POILogger.WARN, "Uknown or unmapped language code: ", languageCode);
return EMPTY;
}
}
@@ -427,7 +426,7 @@ public class AbstractWordUtils
{
if ( format != 0 )
- logger.log( POILogger.INFO, "NYI: toListItemNumberLabel(): ", format );
+ LOG.log( POILogger.INFO, "NYI: toListItemNumberLabel(): ", format );
return String.valueOf( number );
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java
index 5dc984730a..fc822954e4 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java
@@ -64,8 +64,7 @@ import org.w3c.dom.Text;
public class WordToFoConverter extends AbstractWordConverter
{
- private static final POILogger logger = POILogFactory
- .getLogger( WordToFoConverter.class );
+ private static final POILogger LOG = POILogFactory.getLogger( WordToFoConverter.class );
/**
* Java main() interface to interact with {@link WordToFoConverter}
@@ -575,7 +574,7 @@ public class WordToFoConverter extends AbstractWordConverter
}
else
{
- logger.log(
+ LOG.log(
POILogger.WARN,
"Table without body starting on offset ",
table.getStartOffset(), " -- ",
@@ -588,7 +587,7 @@ public class WordToFoConverter extends AbstractWordConverter
// making sure ID used once
if ( usedIds.contains( id ) )
{
- logger.log( POILogger.WARN,
+ LOG.log( POILogger.WARN,
"Tried to create element with same ID '", id, "'. Skipped" );
return false;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
index d3d4f6e57b..5a96806007 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java
@@ -81,7 +81,7 @@ public class WordToHtmlConverter extends AbstractWordConverter
}
}
- private static final POILogger logger = POILogFactory.getLogger( WordToHtmlConverter.class );
+ private static final POILogger LOG = POILogFactory.getLogger( WordToHtmlConverter.class );
private final Deque<BlockProperies> blocksProperies = new LinkedList<>();
@@ -737,7 +737,7 @@ public class WordToHtmlConverter extends AbstractWordConverter
}
else
{
- logger.log( POILogger.WARN, "Table without body starting at [",
+ LOG.log( POILogger.WARN, "Table without body starting at [",
Integer.valueOf( table.getStartOffset() ), "; ",
Integer.valueOf( table.getEndOffset() ), ")" );
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToTextConverter.java b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToTextConverter.java
index 6d3d01c38b..8ee50e5c35 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToTextConverter.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToTextConverter.java
@@ -55,8 +55,7 @@ import org.w3c.dom.Element;
@Beta
public class WordToTextConverter extends AbstractWordConverter
{
- private static final POILogger logger = POILogFactory
- .getLogger( WordToTextConverter.class );
+ private static final POILogger LOG = POILogFactory.getLogger( WordToTextConverter.class );
public static String getText( DirectoryNode root ) throws Exception
{
@@ -352,7 +351,7 @@ public class WordToTextConverter extends AbstractWordConverter
catch ( Exception exc )
{
// no extractor in classpath
- logger.log( POILogger.WARN, "There is an OLE object entry '",
+ LOG.log( POILogger.WARN, "There is an OLE object entry '",
entry.getName(),
"', but there is no text extractor for this object type ",
"or text extractor factory is not available: ", "", exc );
@@ -371,7 +370,7 @@ public class WordToTextConverter extends AbstractWordConverter
}
catch ( Exception exc )
{
- logger.log( POILogger.ERROR,
+ LOG.log( POILogger.ERROR,
"Unable to extract text from OLE entry '", entry.getName(),
"': ", exc, exc );
return false;
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/BookmarksTables.java b/src/scratchpad/src/org/apache/poi/hwpf/model/BookmarksTables.java
index c5c1831172..b5c2f7f694 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/BookmarksTables.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/BookmarksTables.java
@@ -30,8 +30,7 @@ import org.apache.poi.util.POILogger;
@Internal
public class BookmarksTables
{
- private static final POILogger logger = POILogFactory
- .getLogger( BookmarksTables.class );
+ private static final POILogger LOG = POILogFactory.getLogger( BookmarksTables.class );
private PlexOfCps descriptorsFirst = new PlexOfCps( 4 );
@@ -54,7 +53,7 @@ public class BookmarksTables
GenericPropertyNode endNode = descriptorsLim.getProperty( i );
if ( startNode.getStart() == endNode.getStart() )
{
- logger.log( POILogger.DEBUG, "Removing bookmark #",
+ LOG.log( POILogger.DEBUG, "Removing bookmark #",
Integer.valueOf( i ), "..." );
remove( i );
i--;
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
index 8367aa84fd..9559f560a7 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/CHPBinTable.java
@@ -49,8 +49,7 @@ import org.apache.poi.util.POILogger;
@Internal
public class CHPBinTable
{
- private static final POILogger logger = POILogFactory
- .getLogger( CHPBinTable.class );
+ private static final POILogger LOG = POILogFactory.getLogger( CHPBinTable.class );
/** List of character properties.*/
protected List<CHPX> _textRuns = new ArrayList<>();
@@ -106,13 +105,13 @@ public class CHPBinTable
_textRuns.add( chpx );
}
}
- logger.log( POILogger.DEBUG, "CHPX FKPs loaded in ",
+ LOG.log( POILogger.DEBUG, "CHPX FKPs loaded in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms (",
Integer.valueOf( _textRuns.size() ), " elements)" );
if ( _textRuns.isEmpty() )
{
- logger.log( POILogger.WARN, "CHPX FKPs are empty" );
+ LOG.log( POILogger.WARN, "CHPX FKPs are empty" );
_textRuns.add( new CHPX( 0, 0, new SprmBuffer( 0 ) ) );
}
}
@@ -136,7 +135,7 @@ public class CHPBinTable
if ( igrpprl < 0 || igrpprl >= sprmBuffers.length )
{
- logger.log( POILogger.WARN, textPiece
+ LOG.log( POILogger.WARN, textPiece
+ "'s PRM references to unknown grpprl" );
continue;
}
@@ -163,7 +162,7 @@ public class CHPBinTable
_textRuns.add( chpx );
}
}
- logger.log( POILogger.DEBUG,
+ LOG.log( POILogger.DEBUG,
"Merged with CHPX from complex file table in ",
Long.valueOf( System.currentTimeMillis() - start ),
" ms (", Integer.valueOf( _textRuns.size() ),
@@ -174,7 +173,7 @@ public class CHPBinTable
List<CHPX> oldChpxSortedByStartPos = new ArrayList<>(_textRuns);
oldChpxSortedByStartPos.sort(PropertyNode.StartComparator);
- logger.log( POILogger.DEBUG, "CHPX sorted by start position in ",
+ LOG.log( POILogger.DEBUG, "CHPX sorted by start position in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms" );
start = System.currentTimeMillis();
@@ -196,7 +195,7 @@ public class CHPBinTable
}
};
- logger.log( POILogger.DEBUG, "CHPX's order map created in ",
+ LOG.log( POILogger.DEBUG, "CHPX's order map created in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms" );
start = System.currentTimeMillis();
@@ -214,7 +213,7 @@ public class CHPBinTable
Collections.sort( textRunsBoundariesList );
}
- logger.log( POILogger.DEBUG, "Texts CHPX boundaries collected in ",
+ LOG.log( POILogger.DEBUG, "Texts CHPX boundaries collected in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms" );
start = System.currentTimeMillis();
@@ -254,7 +253,7 @@ public class CHPBinTable
if ( chpxs.size() == 0 )
{
- logger.log( POILogger.WARN, "Text piece [",
+ LOG.log( POILogger.WARN, "Text piece [",
Integer.valueOf( startInclusive ), "; ",
Integer.valueOf(boundary),
") has no CHPX. Creating new one." );
@@ -291,7 +290,7 @@ public class CHPBinTable
}
this._textRuns = new ArrayList<>(newChpxs);
- logger.log( POILogger.DEBUG, "CHPX rebuilded in ",
+ LOG.log( POILogger.DEBUG, "CHPX rebuilded in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms (",
Integer.valueOf( _textRuns.size() ), " elements)" );
start = System.currentTimeMillis();
@@ -319,7 +318,7 @@ public class CHPBinTable
previous = current;
}
- logger.log( POILogger.DEBUG, "CHPX compacted in ",
+ LOG.log( POILogger.DEBUG, "CHPX compacted in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms (",
Integer.valueOf( _textRuns.size() ), " elements)" );
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java
index 5068460f5e..83ca143b05 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/FIBFieldHandler.java
@@ -145,7 +145,7 @@ public final class FIBFieldHandler
public static final int STTBLISTNAMES = 91;
public static final int STTBFUSSR = 92;
- private final static POILogger log = POILogFactory.getLogger(FIBFieldHandler.class);
+ private static final POILogger log = POILogFactory.getLogger(FIBFieldHandler.class);
private static final int FIELD_SIZE = LittleEndianConsts.INT_SIZE * 2;
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java
index 4fc8001c98..879441bf7b 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/FileInformationBlock.java
@@ -45,25 +45,23 @@ import org.apache.poi.util.POILogger;
* </ul>
*/
@Internal
-public final class FileInformationBlock
-{
+public final class FileInformationBlock {
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
- public static final POILogger logger = POILogFactory
- .getLogger( FileInformationBlock.class );
+ private static final POILogger LOG = POILogFactory.getLogger( FileInformationBlock.class );
- private FibBase _fibBase;
- private int _csw;
- private FibRgW97 _fibRgW;
- private int _cslw;
- private FibRgLw _fibRgLw;
+ private final FibBase _fibBase;
+ private final int _csw;
+ private final FibRgW97 _fibRgW;
+ private final int _cslw;
+ private final FibRgLw _fibRgLw;
private int _cbRgFcLcb;
private FIBFieldHandler _fieldHandler;
private int _cswNew;
- private int _nFibNew;
- private byte[] _fibRgCswNew;
+ private final int _nFibNew;
+ private final byte[] _fibRgCswNew;
/** Creates a new instance of FileInformationBlock */
public FileInformationBlock( byte[] mainDocument )
@@ -177,7 +175,7 @@ public final class FileInformationBlock
/* The Word spec has a much smaller list of "valid" values
* to what the large CommonCrawl corpus contains!
*/
- logger.log(POILogger.WARN, "Invalid file format version number: ", nfib, "(", nfibHex, ")");
+ LOG.log(POILogger.WARN, "Invalid file format version number: ", nfib, "(", nfibHex, ")");
}
}
@@ -188,7 +186,7 @@ public final class FileInformationBlock
if ( cbRgFcLcb == expectedCbRgFcLcb )
return;
- logger.log( POILogger.WARN, "Since FIB.nFib == ", strNFib,
+ LOG.log( POILogger.WARN, "Since FIB.nFib == ", strNFib,
" value of FIB.cbRgFcLcb MUST be ", strCbRgFcLcb + ", not 0x",
Integer.toHexString( cbRgFcLcb ) );
}
@@ -213,7 +211,7 @@ public final class FileInformationBlock
assertCswNew( "0x0112", 0x0005, "0x0005", _cswNew );
break;
default:
- logger.log(POILogger.WARN, "Invalid file format version number: ", getNFib());
+ LOG.log(POILogger.WARN, "Invalid file format version number: ", getNFib());
}
}
@@ -224,7 +222,7 @@ public final class FileInformationBlock
if ( cswNew == expectedCswNew )
return;
- logger.log( POILogger.WARN, "Since FIB.nFib == ", strNFib,
+ LOG.log( POILogger.WARN, "Since FIB.nFib == ", strNFib,
" value of FIB.cswNew MUST be ",
strExpectedCswNew + ", not 0x", Integer.toHexString( cswNew ) );
}
@@ -237,14 +235,14 @@ public final class FileInformationBlock
* UnhandledDataStructure and save them on save.
*/
HashSet<Integer> knownFieldSet = new HashSet<>();
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.STSHF ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.CLX ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.DOP ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.PLCFBTECHPX ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.PLCFBTEPAPX ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.PLCFSED ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.PLFLST ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.PLFLFO ) );
+ knownFieldSet.add(FIBFieldHandler.STSHF);
+ knownFieldSet.add(FIBFieldHandler.CLX);
+ knownFieldSet.add(FIBFieldHandler.DOP);
+ knownFieldSet.add(FIBFieldHandler.PLCFBTECHPX);
+ knownFieldSet.add(FIBFieldHandler.PLCFBTEPAPX);
+ knownFieldSet.add(FIBFieldHandler.PLCFSED);
+ knownFieldSet.add(FIBFieldHandler.PLFLST);
+ knownFieldSet.add(FIBFieldHandler.PLFLFO);
// field info
for ( FieldsDocumentPart part : FieldsDocumentPart.values() )
@@ -256,18 +254,15 @@ public final class FileInformationBlock
knownFieldSet.add( Integer.valueOf( FIBFieldHandler.STTBFBKMK ) );
// notes
- for ( NoteType noteType : NoteType.values() )
- {
- knownFieldSet.add( Integer.valueOf( noteType
- .getFibDescriptorsFieldIndex() ) );
- knownFieldSet.add( Integer.valueOf( noteType
- .getFibTextPositionsFieldIndex() ) );
+ for ( NoteType noteType : NoteType.values() ) {
+ knownFieldSet.add(noteType.getFibDescriptorsFieldIndex());
+ knownFieldSet.add(noteType.getFibTextPositionsFieldIndex());
}
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.STTBFFFN ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.STTBFRMARK ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.STTBSAVEDBY ) );
- knownFieldSet.add( Integer.valueOf( FIBFieldHandler.MODIFIED ) );
+ knownFieldSet.add( FIBFieldHandler.STTBFFFN );
+ knownFieldSet.add( FIBFieldHandler.STTBFRMARK );
+ knownFieldSet.add( FIBFieldHandler.STTBSAVEDBY );
+ knownFieldSet.add( FIBFieldHandler.MODIFIED );
_fieldHandler = new FIBFieldHandler( mainDocument, 154, _cbRgFcLcb,
tableStream, knownFieldSet, true );
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java
index 767520c96b..b5d28d1f45 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java
@@ -38,7 +38,7 @@ import org.apache.poi.util.POILogger;
@Internal
public final class FontTable
{
- private final static POILogger _logger = POILogFactory.getLogger(FontTable.class);
+ private static final POILogger LOG = POILogFactory.getLogger(FontTable.class);
private short _stringCount;// how many strings are included in the string table
private short _extraDataSz;// size in bytes of the extra data
@@ -93,7 +93,7 @@ public final class FontTable
{
if(chpFtc >= _stringCount)
{
- _logger.log(POILogger.INFO, "Mismatch in chpFtc with stringCount");
+ LOG.log(POILogger.INFO, "Mismatch in chpFtc with stringCount");
return null;
}
@@ -104,7 +104,7 @@ public final class FontTable
{
if(chpFtc >= _stringCount)
{
- _logger.log(POILogger.INFO, "Mismatch in chpFtc with stringCount");
+ LOG.log(POILogger.INFO, "Mismatch in chpFtc with stringCount");
return null;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java b/src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java
index e77ec7a9a9..36b069d80a 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/ListLevel.java
@@ -43,8 +43,7 @@ public final class ListLevel
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 10_485_760;
- private static final POILogger logger = POILogFactory
- .getLogger( ListLevel.class );
+ private static final POILogger LOG = POILogFactory.getLogger( ListLevel.class );
private byte[] _grpprlChpx;
private byte[] _grpprlPapx;
@@ -245,7 +244,7 @@ public final class ListLevel
{
if ( _xst.getCch() != 1 )
{
- logger.log( POILogger.WARN, "LVL at offset ",
+ LOG.log( POILogger.WARN, "LVL at offset ",
Integer.valueOf( startOffset ),
" has nfc == 0x17 (bullets), but cch != 1 (",
Integer.valueOf( _xst.getCch() ), ")" );
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java b/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java
index fae0aef18b..b105fc16e7 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/ListTables.java
@@ -33,7 +33,7 @@ import org.apache.poi.util.POILogger;
@Internal
public final class ListTables
{
- private final static POILogger log = POILogFactory.getLogger(ListTables.class);
+ private static final POILogger log = POILogFactory.getLogger(ListTables.class);
/**
* Both PlfLst and the following LVLs
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/OldFfn.java b/src/scratchpad/src/org/apache/poi/hwpf/model/OldFfn.java
index 6cf8f2c030..27e5de7b1b 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/OldFfn.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/OldFfn.java
@@ -32,9 +32,9 @@ import org.apache.poi.util.StringUtil;
@Internal
public final class OldFfn {
- private static final POILogger logger = POILogFactory.getLogger(OldFfn.class);
+ private static final POILogger LOG = POILogFactory.getLogger(OldFfn.class);
- private byte _chs;// character set identifier
+ private final byte _chs;// character set identifier
private final String fontName;
private final String altFontName;
@@ -59,7 +59,7 @@ public final class OldFfn {
short fontDescriptionLength = buf[offset];
offset += 1;
if (offset + fontDescriptionLength > fontTableEnd) {
- logger.log(POILogger.WARN, "Asked to read beyond font table end. Skipping font");
+ LOG.log(POILogger.WARN, "Asked to read beyond font table end. Skipping font");
return null;
}
@@ -69,7 +69,7 @@ public final class OldFfn {
Charset charset = null;
FontCharset wmfCharset = FontCharset.valueOf(chs & 0xff);
if (wmfCharset == null) {
- logger.log(POILogger.WARN, "Couldn't find font for type: ", (chs & 0xff));
+ LOG.log(POILogger.WARN, "Couldn't find font for type: ", (chs & 0xff));
} else {
charset = wmfCharset.getCharset();
}
@@ -88,7 +88,7 @@ public final class OldFfn {
}
}
if (fontNameLength == -1) {
- logger.log(POILogger.WARN, "Couldn't find the zero-byte delimited font name length");
+ LOG.log(POILogger.WARN, "Couldn't find the zero-byte delimited font name length");
return null;
}
String fontName = new String(buf, offset, fontNameLength, charset);
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/OldFontTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/OldFontTable.java
index 0bc44f3943..0e3ec37815 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/OldFontTable.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/OldFontTable.java
@@ -32,7 +32,7 @@ import org.apache.poi.util.POILogger;
*/
@Internal
public final class OldFontTable {
- private final static POILogger _logger = POILogFactory.getLogger(OldFontTable.class);
+ private static final POILogger LOG = POILogFactory.getLogger(OldFontTable.class);
// added extra facilitator members
// FFN structure containing strings of font names
@@ -69,7 +69,7 @@ public final class OldFontTable {
public String getMainFont(int chpFtc) {
if (chpFtc >= _fontNames.length) {
- _logger.log(POILogger.INFO, "Mismatch in chpFtc with stringCount");
+ LOG.log(POILogger.INFO, "Mismatch in chpFtc with stringCount");
return null;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
index 2c07b2e901..25dae0de7d 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PAPBinTable.java
@@ -43,8 +43,7 @@ import org.apache.poi.util.POILogger;
@Internal
public class PAPBinTable
{
- private static final POILogger logger = POILogFactory
- .getLogger( PAPBinTable.class );
+ private static final POILogger LOG = POILogFactory.getLogger( PAPBinTable.class );
protected final ArrayList<PAPX> _paragraphs = new ArrayList<>();
@@ -81,13 +80,13 @@ public class PAPBinTable
}
}
- logger.log( POILogger.DEBUG, "PAPX tables loaded in ",
+ LOG.log( POILogger.DEBUG, "PAPX tables loaded in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms (",
Integer.valueOf( _paragraphs.size() ), " elements)" );
if ( _paragraphs.isEmpty() )
{
- logger.log( POILogger.WARN, "PAPX FKPs are empty" );
+ LOG.log( POILogger.WARN, "PAPX FKPs are empty" );
_paragraphs.add( new PAPX( 0, 0, new SprmBuffer( 2 ) ) );
}
}
@@ -118,7 +117,7 @@ public class PAPBinTable
if ( igrpprl < 0 || igrpprl >= sprmBuffers.length )
{
- logger.log( POILogger.WARN, textPiece
+ LOG.log( POILogger.WARN, textPiece
+ "'s PRM references to unknown grpprl" );
continue;
}
@@ -147,7 +146,7 @@ public class PAPBinTable
}
}
- logger.log( POILogger.DEBUG,
+ LOG.log( POILogger.DEBUG,
"Merged (?) with PAPX from complex file table in ",
Long.valueOf( System.currentTimeMillis() - start ),
" ms (", Integer.valueOf( paragraphs.size() ),
@@ -158,7 +157,7 @@ public class PAPBinTable
List<PAPX> oldPapxSortedByEndPos = new ArrayList<>(paragraphs);
oldPapxSortedByEndPos.sort(PropertyNode.EndComparator);
- logger.log( POILogger.DEBUG, "PAPX sorted by end position in ",
+ LOG.log( POILogger.DEBUG, "PAPX sorted by end position in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms" );
start = System.currentTimeMillis();
@@ -180,7 +179,7 @@ public class PAPBinTable
}
};
- logger.log( POILogger.DEBUG, "PAPX's order map created in ",
+ LOG.log( POILogger.DEBUG, "PAPX's order map created in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms" );
start = System.currentTimeMillis();
@@ -224,7 +223,7 @@ public class PAPBinTable
if ( papxs.size() == 0 )
{
- logger.log( POILogger.WARN, "Paragraph [",
+ LOG.log( POILogger.WARN, "Paragraph [",
Integer.valueOf( startInclusive ), "; ",
Integer.valueOf( endExclusive ),
") has no PAPX. Creating new one." );
@@ -274,7 +273,7 @@ public class PAPBinTable
paragraphs.clear();
paragraphs.addAll( newPapxs );
- logger.log( POILogger.DEBUG, "PAPX rebuilded from document text in ",
+ LOG.log( POILogger.DEBUG, "PAPX rebuilded from document text in ",
Long.valueOf( System.currentTimeMillis() - start ), " ms (",
Integer.valueOf( paragraphs.size() ), " elements)" );
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
index 214654a064..bf904e4738 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PicturesTable.java
@@ -52,11 +52,9 @@ import org.apache.poi.util.POILogger;
* @author Dmitry Romanov
*/
@Internal
-public final class PicturesTable
-{
- private static final POILogger logger = POILogFactory
- .getLogger( PicturesTable.class );
-
+public final class PicturesTable {
+ private static final POILogger LOG = POILogFactory.getLogger( PicturesTable.class );
+
static final int TYPE_IMAGE = 0x08;
static final int TYPE_IMAGE_WORD2000 = 0x00;
static final int TYPE_IMAGE_PASTED_FROM_CLIPBOARD = 0xA;
@@ -200,7 +198,7 @@ public final class PicturesTable
}
catch ( Exception exc )
{
- logger.log(
+ LOG.log(
POILogger.WARN,
"Unable to load picture from BLIB record at offset #",
Integer.valueOf( bse.getOffset() ), exc );
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PlfLfo.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PlfLfo.java
index fb82dbb68e..dbe32463e6 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/PlfLfo.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PlfLfo.java
@@ -39,7 +39,7 @@ import org.apache.poi.util.POILogger;
*/
public class PlfLfo
{
- private final static POILogger log = POILogFactory.getLogger( PlfLfo.class );
+ private static final POILogger log = POILogFactory.getLogger( PlfLfo.class );
/**
* An unsigned integer that specifies the count of elements in both the
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java b/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java
index 4a7e174b0e..4746799d44 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java
@@ -40,7 +40,7 @@ public abstract class PropertyNode<T extends PropertyNode<T>> implements Compara
public static final Comparator<PropertyNode<?>> StartComparator = Comparator.comparingInt(PropertyNode::getStart);
- private static final POILogger _logger = POILogFactory.getLogger(PropertyNode.class);
+ private static final POILogger LOG = POILogFactory.getLogger(PropertyNode.class);
protected Object _buf;
@@ -72,12 +72,12 @@ public abstract class PropertyNode<T extends PropertyNode<T>> implements Compara
_buf = buf;
if (_cpStart < 0) {
- _logger.log(POILogger.WARN, "A property claimed to start before zero, at ", _cpStart, "! Resetting it to zero, and hoping for the best");
+ LOG.log(POILogger.WARN, "A property claimed to start before zero, at ", _cpStart, "! Resetting it to zero, and hoping for the best");
_cpStart = 0;
}
if (_cpEnd < _cpStart) {
- _logger.log(POILogger.WARN, "A property claimed to end (", _cpEnd,
+ LOG.log(POILogger.WARN, "A property claimed to end (", _cpEnd,
") before start! Resetting end to start, and hoping for the best");
_cpEnd = _cpStart;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
index eb2292a6e0..4656ec8de1 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/SectionTable.java
@@ -37,7 +37,7 @@ public class SectionTable
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
- private final static POILogger _logger = POILogFactory.getLogger(SectionTable.class);
+ private static final POILogger LOG = POILogFactory.getLogger(SectionTable.class);
private static final int SED_SIZE = 12;
protected List<SEPX> _sections = new ArrayList<>();
@@ -100,7 +100,7 @@ public class SectionTable
}
}
if(! matchAt && matchHalf) {
- _logger.log(POILogger.WARN, "Your document seemed to be mostly unicode, but the section definition was in bytes! Trying anyway, but things may well go wrong!");
+ LOG.log(POILogger.WARN, "Your document seemed to be mostly unicode, but the section definition was in bytes! Trying anyway, but things may well go wrong!");
for(int i=0; i<_sections.size(); i++) {
SEPX s = _sections.get(i);
GenericPropertyNode node = sedPlex.getProperty(i);
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java b/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java
index d96d66da33..7dcc6e5f4a 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/StyleDescription.java
@@ -39,14 +39,14 @@ import org.apache.poi.util.StringUtil;
@Internal
public final class StyleDescription {
- private static final POILogger logger = POILogFactory.getLogger(StyleDescription.class);
+ private static final POILogger LOG = POILogFactory.getLogger(StyleDescription.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000;
- private final static int PARAGRAPH_STYLE = 1;
- private final static int CHARACTER_STYLE = 2;
- // private final static int TABLE_STYLE = 3;
- // private final static int NUMBERING_STYLE = 4;
+ private static final int PARAGRAPH_STYLE = 1;
+ private static final int CHARACTER_STYLE = 2;
+ // private static final int TABLE_STYLE = 3;
+ // private static final int NUMBERING_STYLE = 4;
private int _baseLength;
private StdfBase _stdfBase;
@@ -74,7 +74,7 @@ public final class StyleDescription {
} else if (baseLength == 0x000A) {
readStdfPost2000 = false;
} else {
- logger.log(POILogger.WARN, "Style definition has non-standard size of ", baseLength);
+ LOG.log(POILogger.WARN, "Style definition has non-standard size of ", baseLength);
}
_stdfBase = new StdfBase(std, offset);
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java b/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
index 6bb1f3b53a..ac37396657 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/StyleSheet.java
@@ -49,12 +49,12 @@ public final class StyleSheet {
// private static final int TAP_TYPE = 5;
@Deprecated
- private final static ParagraphProperties NIL_PAP = new ParagraphProperties();
+ private static final ParagraphProperties NIL_PAP = new ParagraphProperties();
@Deprecated
- private final static CharacterProperties NIL_CHP = new CharacterProperties();
+ private static final CharacterProperties NIL_CHP = new CharacterProperties();
- private final static byte[] NIL_CHPX = new byte[]{};
- private final static byte[] NIL_PAPX = new byte[]{0, 0};
+ private static final byte[] NIL_CHPX = new byte[]{};
+ private static final byte[] NIL_PAPX = new byte[]{0, 0};
/**
* Size of the STSHI structure
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java b/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
index 2da35b30ba..e40be66f31 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/TextPieceTable.java
@@ -40,8 +40,7 @@ import org.apache.poi.util.POILogger;
*/
@Internal
public class TextPieceTable implements CharIndexTranslator {
- private static final POILogger logger = POILogFactory
- .getLogger(TextPieceTable.class);
+ private static final POILogger LOG = POILogFactory.getLogger(TextPieceTable.class);
//arbitrarily selected; may need to increase
private static final int MAX_RECORD_LENGTH = 100_000_000;
@@ -287,7 +286,7 @@ public class TextPieceTable implements CharIndexTranslator {
int toAppendLength = toAppend.length();
if (toAppendLength != textPiece.getEnd() - textPiece.getStart()) {
- logger.log(
+ LOG.log(
POILogger.WARN,
"Text piece has boundaries [",
textPiece.getStart(),
@@ -301,7 +300,7 @@ public class TextPieceTable implements CharIndexTranslator {
+ toAppendLength, toAppend);
}
- logger.log(POILogger.DEBUG, "Document text were rebuilded in ",
+ LOG.log(POILogger.DEBUG, "Document text were rebuilded in ",
System.currentTimeMillis() - start, " ms (",
docText.length(), " chars)");
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/model/types/FFDataBaseAbstractType.java b/src/scratchpad/src/org/apache/poi/hwpf/model/types/FFDataBaseAbstractType.java
index ff15f3e28f..33557615f6 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/model/types/FFDataBaseAbstractType.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/model/types/FFDataBaseAbstractType.java
@@ -51,11 +51,11 @@ public abstract class FFDataBaseAbstractType
protected short field_2_bits;
/**/private static final BitField iType = new BitField(0x0003);
/** Specifies that the form field is a textbox. */
- /* */public final static byte ITYPE_TEXT = 0;
+ /* */public static final byte ITYPE_TEXT = 0;
/** Specifies that the form field is a checkbox. */
- /* */public final static byte ITYPE_CHCK = 1;
+ /* */public static final byte ITYPE_CHCK = 1;
/** Specifies that the form field is a dropdown list box. */
- /* */public final static byte ITYPE_DROP = 2;
+ /* */public static final byte ITYPE_DROP = 2;
/**/private static final BitField iRes = new BitField(0x007C);
/**/private static final BitField fOwnHelp = new BitField(0x0080);
/**/private static final BitField fOwnStat = new BitField(0x0100);
@@ -63,17 +63,17 @@ public abstract class FFDataBaseAbstractType
/**/private static final BitField iSize = new BitField(0x0400);
/**/private static final BitField iTypeTxt = new BitField(0x3800);
/** Specifies that the textbox value is regular text. */
- /* */public final static byte ITYPETXT_REG = 0;
+ /* */public static final byte ITYPETXT_REG = 0;
/** Specifies that the textbox value is a number. */
- /* */public final static byte ITYPETXT_NUM = 0;
+ /* */public static final byte ITYPETXT_NUM = 0;
/** Specifies that the textbox value is a date or time. */
- /* */public final static byte ITYPETXT_DATE = 0;
+ /* */public static final byte ITYPETXT_DATE = 0;
/** Specifies that the textbox value is the current date. */
- /* */public final static byte ITYPETXT_CURDATE = 0;
+ /* */public static final byte ITYPETXT_CURDATE = 0;
/** Specifies that the textbox value is the current time. */
- /* */public final static byte ITYPETXT_CURTIME = 0;
+ /* */public static final byte ITYPETXT_CURTIME = 0;
/** Specifies that the textbox value is calculated from an expression. The expression is given by FFData.xstzTextDef. */
- /* */protected final static byte ITYPETXT_CALC = 0;
+ /* */protected static final byte ITYPETXT_CALC = 0;
/**/private static final BitField fRecalc = new BitField(0x4000);
/**/private static final BitField fHasListBox = new BitField(0x8000);
protected int field_3_cch;
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java
index 74c6e035c7..27ad6e8041 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/CharacterSprmUncompressor.java
@@ -34,8 +34,7 @@ import org.apache.poi.util.POILogger;
@Internal
public final class CharacterSprmUncompressor extends SprmUncompressor
{
- private static final POILogger logger = POILogFactory
- .getLogger( CharacterSprmUncompressor.class );
+ private static final POILogger LOG = POILogFactory.getLogger( CharacterSprmUncompressor.class );
public CharacterSprmUncompressor()
{
@@ -78,7 +77,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
}
catch ( Exception exc )
{
- logger.log( POILogger.ERROR, "Unable to apply all style ",
+ LOG.log( POILogger.ERROR, "Unable to apply all style ",
style, " CHP SPRMs to CHP: ", exc, exc );
}
}
@@ -92,7 +91,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
}
catch ( Exception exc )
{
- logger.log( POILogger.ERROR,
+ LOG.log( POILogger.ERROR,
"Unable to process all direct CHP SPRMs: ", exc, exc );
}
return newProperties;
@@ -112,7 +111,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
{
if ( warnAboutNonChpSprms )
{
- logger.log( POILogger.WARN,
+ LOG.log( POILogger.WARN,
"Non-CHP SPRM returned by SprmIterator: ", sprm );
}
continue;
@@ -141,7 +140,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
}
catch ( Exception exc )
{
- logger.log( POILogger.ERROR,
+ LOG.log( POILogger.ERROR,
"Unable to extract istd from direct CHP SPRM: ", exc, exc );
}
return style;
@@ -175,9 +174,9 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
// sprmCPicLocation -- 0x6A03
/*
* [MS-DOC]
- *
+ *
* Page 104 of 622
- *
+ *
* A signed 32-bit integer that specifies either the position in the
* Data Stream of a picture or binary data or the name of an OLE
* object storage.
@@ -566,9 +565,9 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
/*
* Microsoft Office Word 97-2007 Binary File Format (.doc)
* Specification
- *
+ *
* Page 78 of 210
- *
+ *
* sprmCPropRMark (opcode 0xCA57) is interpreted by moving the first
* parameter byte to chp.fPropRMark, the next two bytes to
* chp.ibstPropRMark, and the remaining four bytes to
@@ -601,7 +600,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
// sprmCFtcBi
break;
case 0x5f:
- // sprmCLidBi
+ // sprmCLidBi
break;
case 0x60:
// sprmCIcoBi
@@ -614,9 +613,9 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
/*
* Microsoft Office Word 97-2007 Binary File Format (.doc)
* Specification
- *
+ *
* Page 78 of 210
- *
+ *
* sprmCDispFldRMark (opcode 0xCA62) is interpreted by moving the
* first parameter byte to chp.fDispFldRMark, the next two bytes to
* chp.ibstDispFldRMark, the next four bytes to
@@ -645,7 +644,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
// sprmCShd80
/*
* "A Shd80 structure that specifies the background shading for the text. By default, text is not shaded."
- *
+ *
* Word (.doc) Binary File Format. Copyright (c) 2011 Microsoft
* Corporation. Release: Tuesday, March 15, 2011
*/
@@ -698,7 +697,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
// sprmCFNoProof -- 0x875
/*
* "A ToggleOperand value that specifies whether the text is excluded from the proofing analysis. By default, text is not excluded from the proofing analysis."
- *
+ *
* Word (.doc) Binary File Format. Copyright (c) 2012 Microsoft
* Corporation. Released: October 8, 2012
*/
@@ -706,7 +705,7 @@ public final class CharacterSprmUncompressor extends SprmUncompressor
oldCHP.isFNoProof()));
break;
default:
- logger.log( POILogger.DEBUG, "Unknown CHP sprm ignored: ", sprm );
+ LOG.log( POILogger.DEBUG, "Unknown CHP sprm ignored: ", sprm );
break;
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
index 12e84c3799..fc3915d600 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/ParagraphSprmUncompressor.java
@@ -40,11 +40,9 @@ import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
@Internal
-public final class ParagraphSprmUncompressor
- extends SprmUncompressor
-{
- private static final POILogger logger = POILogFactory
- .getLogger( ParagraphSprmUncompressor.class );
+public final class ParagraphSprmUncompressor extends SprmUncompressor {
+
+ private static final POILogger LOG = POILogFactory.getLogger( ParagraphSprmUncompressor.class );
public ParagraphSprmUncompressor()
{
@@ -71,7 +69,7 @@ public final class ParagraphSprmUncompressor
}
catch ( Exception exc )
{
- logger.log(
+ LOG.log(
POILogger.ERROR,
"Unable to apply SPRM operation '", sprm.getOperation(), "': ", exc );
}
@@ -413,7 +411,7 @@ public final class ParagraphSprmUncompressor
newPAP.setRsid( sprm.getOperand() );
break;
default:
- logger.log( POILogger.DEBUG, "Unknown PAP sprm ignored: ", sprm );
+ LOG.log( POILogger.DEBUG, "Unknown PAP sprm ignored: ", sprm );
break;
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java
index 98c8886f94..fe2480fdc4 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmCompressor.java
@@ -29,7 +29,7 @@ import org.apache.poi.util.LittleEndianConsts;
@Internal
public final class SectionSprmCompressor
{
- private final static SectionProperties DEFAULT_SEP = new SectionProperties();
+ private static final SectionProperties DEFAULT_SEP = new SectionProperties();
public SectionSprmCompressor()
{
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java
index ce48874af0..a51f7c779f 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/SectionSprmUncompressor.java
@@ -28,9 +28,9 @@ import org.apache.poi.util.POILogger;
@Internal
-public final class SectionSprmUncompressor extends SprmUncompressor
-{
- private static final POILogger logger = POILogFactory.getLogger(SectionSprmUncompressor.class);
+public final class SectionSprmUncompressor extends SprmUncompressor {
+
+ private static final POILogger LOG = POILogFactory.getLogger(SectionSprmUncompressor.class);
public SectionSprmUncompressor()
{
@@ -241,7 +241,7 @@ public final class SectionSprmUncompressor extends SprmUncompressor
newSEP.setNfcEdnRef(sprm.getOperand());
break;
default:
- logger.log(POILogger.INFO, "Unsupported Sprm operation: ", operation, " (", HexDump.byteToHex(operation), ")");
+ LOG.log(POILogger.INFO, "Unsupported Sprm operation: ", operation, " (", HexDump.byteToHex(operation), ")");
break;
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmOperation.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmOperation.java
index 3fc26d0712..705de1f1c9 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmOperation.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/SprmOperation.java
@@ -41,8 +41,8 @@ public final class SprmOperation
private static final BitField BITFIELD_TYPE = BitFieldFactory
.getInstance( 0x1c00 );
- final static private short SPRM_LONG_PARAGRAPH = (short) 0xc615;
- final static private short SPRM_LONG_TABLE = (short) 0xd608;
+ static final private short SPRM_LONG_PARAGRAPH = (short) 0xc615;
+ static final private short SPRM_LONG_TABLE = (short) 0xd608;
public static final int TYPE_PAP = 1;
public static final int TYPE_CHP = 2;
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java b/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
index 4bad5bb8cd..0332ae37ae 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/sprm/TableSprmUncompressor.java
@@ -26,10 +26,9 @@ import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
@Internal
-public final class TableSprmUncompressor
- extends SprmUncompressor
-{
- private static final POILogger logger = POILogFactory.getLogger( TableSprmUncompressor.class );
+public final class TableSprmUncompressor extends SprmUncompressor {
+
+ private static final POILogger LOG = POILogFactory.getLogger( TableSprmUncompressor.class );
public TableSprmUncompressor()
{
@@ -49,7 +48,7 @@ public final class TableSprmUncompressor
}
else
{
- logger.log( POILogger.WARN,
+ LOG.log( POILogger.WARN,
"Some table rows didn't specify number of columns in SPRMs" );
tableProperties = new TableProperties( (short) 1 );
}
@@ -70,7 +69,7 @@ public final class TableSprmUncompressor
}
catch ( ArrayIndexOutOfBoundsException ex )
{
- logger.log( POILogger.ERROR, "Unable to apply ", sprm,
+ LOG.log( POILogger.ERROR, "Unable to apply ", sprm,
": ", ex, ex );
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
index 352d7d42e8..73517238a0 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/Range.java
@@ -53,7 +53,7 @@ import org.apache.poi.util.POILogger;
*/
public class Range {
- private static final POILogger logger = POILogFactory.getLogger( Range.class );
+ private static final POILogger LOG = POILogFactory.getLogger( Range.class );
/**
* @deprecated POI 3.8 beta 5
@@ -824,7 +824,7 @@ public class Range {
initAll();
if ( tableEndInclusive >= this._parEnd )
{
- logger.log( POILogger.WARN, "The table's bounds ", "[",
+ LOG.log( POILogger.WARN, "The table's bounds ", "[",
this._parStart, "; ", tableEndInclusive, ")",
" fall outside of this Range paragraphs numbers [",
this._parStart, "; ", this._parEnd, ")" );
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java
index 005b360735..30e1d26a21 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java
@@ -27,16 +27,15 @@ import org.apache.poi.util.POILogger;
public final class TableRow extends Range
{
- private static final POILogger logger = POILogFactory
- .getLogger( TableRow.class );
+ private static final POILogger LOG = POILogFactory.getLogger( TableRow.class );
- private final static short SPRM_DXAGAPHALF = (short) 0x9602;
- private final static short SPRM_DYAROWHEIGHT = (short) 0x9407;
- private final static short SPRM_FCANTSPLIT = 0x3403;
- private final static short SPRM_FTABLEHEADER = 0x3404;
- private final static short SPRM_TJC = 0x5400;
+ private static final short SPRM_DXAGAPHALF = (short) 0x9602;
+ private static final short SPRM_DYAROWHEIGHT = (short) 0x9407;
+ private static final short SPRM_FCANTSPLIT = 0x3403;
+ private static final short SPRM_FTABLEHEADER = 0x3404;
+ private static final short SPRM_TJC = 0x5400;
- private final static char TABLE_CELL_MARK = '\u0007';
+ private static final char TABLE_CELL_MARK = '\u0007';
private TableCell[] _cells;
private boolean _cellsFound;
@@ -188,7 +187,7 @@ public final class TableRow extends Range
if ( cells.size() != expectedCellsCount )
{
- logger.log( POILogger.WARN,
+ LOG.log( POILogger.WARN,
"Number of found table cells (", cells.size(),
") for table row [", getStartOffset(), "c; ",
getEndOffset(), "c] not equals to stored property value ",
diff --git a/src/scratchpad/src/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java b/src/scratchpad/src/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java
index 195629bb04..3df94849c7 100644
--- a/src/scratchpad/src/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java
+++ b/src/scratchpad/src/org/apache/poi/hwpf/util/LittleEndianCP950Reader.java
@@ -43,14 +43,14 @@ public class LittleEndianCP950Reader extends Reader {
//https://en.wikipedia.org/wiki/Code_page_950
//see private use area
- private final static char range1Low = '\u8140';
- private final static char range1High = '\u8DFE';
- private final static char range2Low = '\u8E40';
- private final static char range2High = '\uA0FE';
- private final static char range3Low = '\uC6A1';
- private final static char range3High = '\uC8FE';
- private final static char range4Low = '\uFA40';
- private final static char range4High = '\uFEFE';
+ private static final char range1Low = '\u8140';
+ private static final char range1High = '\u8DFE';
+ private static final char range2Low = '\u8E40';
+ private static final char range2High = '\uA0FE';
+ private static final char range3Low = '\uC6A1';
+ private static final char range3High = '\uC8FE';
+ private static final char range4Low = '\uFA40';
+ private static final char range4High = '\uFEFE';
private final byte[] data;
private final int startOffset;
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestDataSamples.java b/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestDataSamples.java
index ea5a499111..b4efb828d3 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestDataSamples.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/HWPFTestDataSamples.java
@@ -30,8 +30,7 @@ import org.apache.poi.util.POILogger;
public class HWPFTestDataSamples {
- private static final POILogger logger = POILogFactory
- .getLogger( HWPFTestDataSamples.class );
+ private static final POILogger LOG = POILogFactory.getLogger( HWPFTestDataSamples.class );
public static HWPFDocument openSampleFile(String sampleFileName) {
try {
@@ -66,7 +65,7 @@ public class HWPFTestDataSamples {
final long endUnzip = System.currentTimeMillis();
byte[] byteArray = baos.toByteArray();
- logger.log(POILogger.DEBUG, "Unzipped in ",
+ LOG.log(POILogger.DEBUG, "Unzipped in ",
Long.valueOf(endUnzip - start), " ms -- ",
Long.valueOf(byteArray.length), " byte(s)");
@@ -74,7 +73,7 @@ public class HWPFTestDataSamples {
HWPFDocument doc = new HWPFDocument(bais);
final long endParse = System.currentTimeMillis();
- logger.log(POILogger.DEBUG, "Parsed in ",
+ LOG.log(POILogger.DEBUG, "Parsed in ",
Long.valueOf(endParse - start), " ms");
return doc;
diff --git a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java
index f1d1cb578f..c30d80169f 100644
--- a/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java
+++ b/src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBugs.java
@@ -63,9 +63,6 @@ import org.w3c.dom.Document;
* against HWPF
*/
class TestBugs {
-
- private static final POILogger logger = POILogFactory.getLogger(TestBugs.class);
-
private static void assertEqualsIgnoreNewline(String expected, String actual) {
String newExpected = expected.replaceAll("\r\n", "\n")
.replaceAll("\r", "\n").trim();
diff --git a/src/testcases/org/apache/poi/hssf/record/TestPLVRecord.java b/src/testcases/org/apache/poi/hssf/record/TestPLVRecord.java
index 3f27f64108..55fc393bde 100644
--- a/src/testcases/org/apache/poi/hssf/record/TestPLVRecord.java
+++ b/src/testcases/org/apache/poi/hssf/record/TestPLVRecord.java
@@ -37,9 +37,9 @@ import org.junit.jupiter.api.Test;
*/
final class TestPLVRecord {
- private final static String DV_DEFINITION = "$A$1:$A$5";
- private final static String XLS_FILENAME = "53972.xls";
- private final static String SHEET_NAME = "S2";
+ private static final String DV_DEFINITION = "$A$1:$A$5";
+ private static final String XLS_FILENAME = "53972.xls";
+ private static final String SHEET_NAME = "S2";
@Test
void testPLVRecord() throws Exception {
diff --git a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java
index 1ebca4a34d..6e1698cadd 100644
--- a/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java
+++ b/src/testcases/org/apache/poi/hssf/usermodel/TestHSSFDataFormat.java
@@ -39,7 +39,6 @@ import org.junit.jupiter.api.Test;
* Tests for {@link HSSFDataFormat}
*/
final class TestHSSFDataFormat extends BaseTestDataFormat {
- private static final POILogger _logger = POILogFactory.getLogger(TestHSSFDataFormat.class);
public TestHSSFDataFormat() {
super(HSSFITestDataProvider.instance);
diff --git a/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java b/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
index 981a94fe69..68e634f1cd 100644
--- a/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
+++ b/src/testcases/org/apache/poi/ss/formula/eval/TestMultiSheetEval.java
@@ -53,7 +53,7 @@ final class TestMultiSheetEval {
/**
* Name of the test spreadsheet (found in the standard test data folder)
*/
- public final static String FILENAME = "FormulaSheetRange.xls";
+ public static final String FILENAME = "FormulaSheetRange.xls";
/**
* Row (zero-based) in the test spreadsheet where the function examples start.
*/
diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
index 1a046f7082..2ec30c4396 100644
--- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
+++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestBugzillaIssues.java
@@ -52,7 +52,7 @@ import org.junit.jupiter.api.Test;
* A base class for bugzilla issues that can be described in terms of common ss interfaces.
*/
public abstract class BaseTestBugzillaIssues {
- private static final POILogger logger = POILogFactory.getLogger(BaseTestBugzillaIssues.class);
+ private static final POILogger LOG = POILogFactory.getLogger(BaseTestBugzillaIssues.class);
private static final String TEST_32 = "Some text with 32 characters to ";
private static final String TEST_255 = "Some very long text that is exactly 255 characters, which are allowed here, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla bla, bla.....";
@@ -1387,7 +1387,7 @@ public abstract class BaseTestBugzillaIssues {
// Create a workbook
try (Workbook wb = _testDataProvider.createWorkbook(nrows+1)) {
final Sheet sh = wb.createSheet();
- logger.log(POILogger.DEBUG, wb.getClass().getName(), " column autosizing timing...");
+ LOG.log(POILogger.DEBUG, wb.getClass().getName(), " column autosizing timing...");
final long t0 = time();
_testDataProvider.trackAllColumnsForAutosizing(sh);
@@ -1400,28 +1400,28 @@ public abstract class BaseTestBugzillaIssues {
}
final double populateSheetTime = delta(t0);
final double populateSheetTimePerCell_ns = (1000000 * populateSheetTime / (nrows * ncols));
- if (logger.check(POILogger.DEBUG)) {
- logger.log(POILogger.DEBUG, "Populate sheet time: ", populateSheetTime, " ms (", populateSheetTimePerCell_ns, " ns/cell)");
+ if (LOG.check(POILogger.DEBUG)) {
+ LOG.log(POILogger.DEBUG, "Populate sheet time: ", populateSheetTime, " ms (", populateSheetTimePerCell_ns, " ns/cell)");
- logger.log(POILogger.DEBUG, "Autosizing...");
+ LOG.log(POILogger.DEBUG, "Autosizing...");
}
final long t1 = time();
for (int c = 0; c < ncols; c++) {
final long t2 = time();
sh.autoSizeColumn(c);
- logger.log(POILogger.DEBUG, "Column ", c, " took ", delta(t2), " ms");
+ LOG.log(POILogger.DEBUG, "Column ", c, " took ", delta(t2), " ms");
}
final double autoSizeColumnsTime = delta(t1);
final double autoSizeColumnsTimePerColumn = autoSizeColumnsTime / ncols;
final double bestFitWidthTimePerCell_ns = 1000000 * autoSizeColumnsTime / (ncols * nrows);
- if (logger.check(POILogger.DEBUG)) {
- logger.log(POILogger.DEBUG, "Auto sizing columns took a total of ", autoSizeColumnsTime, " ms (", autoSizeColumnsTimePerColumn, " ms per column)");
- logger.log(POILogger.DEBUG, "Best fit width time per cell: ", bestFitWidthTimePerCell_ns, " ns");
+ if (LOG.check(POILogger.DEBUG)) {
+ LOG.log(POILogger.DEBUG, "Auto sizing columns took a total of ", autoSizeColumnsTime, " ms (", autoSizeColumnsTimePerColumn, " ms per column)");
+ LOG.log(POILogger.DEBUG, "Best fit width time per cell: ", bestFitWidthTimePerCell_ns, " ns");
}
final double totalTime_s = (populateSheetTime + autoSizeColumnsTime) / 1000;
- logger.log(POILogger.DEBUG, "Total time: ", totalTime_s, " s");
+ LOG.log(POILogger.DEBUG, "Total time: ", totalTime_s, " s");
}
//if (bestFitWidthTimePerCell_ns > 50000) {