aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org
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 /src/ooxml/java/org
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
Diffstat (limited to 'src/ooxml/java/org')
-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
75 files changed, 213 insertions, 216 deletions
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
*