aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org/apache/poi
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2017-09-16 08:22:59 +0000
committerDominik Stadler <centic@apache.org>2017-09-16 08:22:59 +0000
commit32370cfd1cf44caabb638356f32eba60ea2a79a8 (patch)
treed17d59b5ae589bcfc2efa17b95d9159f33e47b48 /src/ooxml/java/org/apache/poi
parent128c17e83ed7487f320fb20122be1603a1c9fd29 (diff)
downloadpoi-32370cfd1cf44caabb638356f32eba60ea2a79a8.tar.gz
poi-32370cfd1cf44caabb638356f32eba60ea2a79a8.zip
Remove unnecessary initialization of members
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808510 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org/apache/poi')
-rw-r--r--src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java2
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java2
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/PackagePropertiesMarshaller.java2
-rw-r--r--src/ooxml/java/org/apache/poi/openxml4j/util/ZipSecureFile.java4
-rw-r--r--src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java16
-rw-r--r--src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java6
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFDocument.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMaster.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFShape.java54
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CharacterSection.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/GeometrySection.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/ArcTo.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/Ellipse.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/EllipticalArcTo.java18
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/InfiniteLine.java12
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/LineTo.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/NURBSTo.java18
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/PolyLineTo.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelCubBezTo.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelEllipticalArcTo.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelMoveTo.java8
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelQuadBezTo.java12
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineKnot.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineStart.java16
-rw-r--r--src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeDebuggerRenderer.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java6
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/binary/XSSFBCommentsTable.java6
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSheetHandler.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/binary/XSSFBStylesTable.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java6
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java4
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConnector.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFShapeGroup.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/extractor/XWPFWordExtractor.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java8
54 files changed, 188 insertions, 188 deletions
diff --git a/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java b/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
index 41435ec4a6..a777887e96 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
@@ -93,7 +93,7 @@ public class POIXMLDocumentPart {
* Counter that provides the amount of incoming relations from other parts
* to this part.
*/
- private int relationCounter = 0;
+ private int relationCounter;
int incrementRelationCounter() {
relationCounter++;
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 1389fb7426..15031fbcf6 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
@@ -116,7 +116,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
/**
* Flag if a modification is done to the document.
*/
- protected boolean isDirty = false;
+ protected boolean isDirty;
/**
* File path of this package.
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 7a8f400723..613c6f0208 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
@@ -80,7 +80,7 @@ public class PackagePropertiesMarshaller implements PartMarshaller {
PackagePropertiesPart propsPart;
// The document
- Document xmlDoc = null;
+ Document xmlDoc;
/**
* Marshall package core properties to an XML document. Always return
diff --git a/src/ooxml/java/org/apache/poi/openxml4j/util/ZipSecureFile.java b/src/ooxml/java/org/apache/poi/openxml4j/util/ZipSecureFile.java
index f5d2737c86..971ba36690 100644
--- a/src/ooxml/java/org/apache/poi/openxml4j/util/ZipSecureFile.java
+++ b/src/ooxml/java/org/apache/poi/openxml4j/util/ZipSecureFile.java
@@ -197,8 +197,8 @@ public class ZipSecureFile extends ZipFile {
}
public static class ThresholdInputStream extends PushbackInputStream {
- long counter = 0;
- long markPos = 0;
+ long counter;
+ long markPos;
ThresholdInputStream cis;
public ThresholdInputStream(InputStream is, ThresholdInputStream cis) {
diff --git a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
index fa87be191a..187272a90e 100644
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
@@ -83,12 +83,12 @@ public class SignatureConfig {
* the optional signature policy service used for XAdES-EPES.
*/
private SignaturePolicyService signaturePolicyService;
- private URIDereferencer uriDereferencer = null;
+ private URIDereferencer uriDereferencer;
private String canonicalizationMethod = CanonicalizationMethod.INCLUSIVE;
private boolean includeEntireCertificateChain = true;
- private boolean includeIssuerSerial = false;
- private boolean includeKeyValue = false;
+ private boolean includeIssuerSerial;
+ private boolean includeKeyValue;
/**
* the time-stamp service used for XAdES-T and XAdES-X.
@@ -98,11 +98,11 @@ public class SignatureConfig {
* timestamp service provider URL
*/
private String tspUrl;
- private boolean tspOldProtocol = false;
+ private boolean tspOldProtocol;
/**
* if not defined, it's the same as the main digest
*/
- private HashAlgorithm tspDigestAlgo = null;
+ private HashAlgorithm tspDigestAlgo;
private String tspUser;
private String tspPass;
private TimeStampServiceValidator tspValidator;
@@ -121,8 +121,8 @@ public class SignatureConfig {
/**
* if not defined, it's the same as the main digest
*/
- private HashAlgorithm xadesDigestAlgo = null;
- private String xadesRole = null;
+ private HashAlgorithm xadesDigestAlgo;
+ private String xadesRole;
private String xadesSignatureId = "idSignedProperties";
private boolean xadesSignaturePolicyImplied = true;
private String xadesCanonicalizationMethod = CanonicalizationMethod.EXCLUSIVE;
@@ -150,7 +150,7 @@ public class SignatureConfig {
* with certain namespaces, so this EventListener is used to interfere
* with the marshalling process.
*/
- EventListener signatureMarshalListener = null;
+ EventListener signatureMarshalListener;
/**
* Map of namespace uris to prefix
diff --git a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
index 9edb1c3bbf..766f8e6863 100644
--- a/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
+++ b/src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
@@ -171,7 +171,7 @@ import org.xml.sax.SAXException;
public class SignatureInfo implements SignatureConfigurable {
private static final POILogger LOG = POILogFactory.getLogger(SignatureInfo.class);
- private static boolean isInitialized = false;
+ private static boolean isInitialized;
private SignatureConfig signatureConfig;
@@ -376,8 +376,8 @@ public class SignatureInfo implements SignatureConfigurable {
OPCPackage pkg = signatureConfig.getOpcPackage();
Iterator<PackageRelationship> sigOrigRels =
pkg.getRelationshipsByType(PackageRelationshipTypes.DIGITAL_SIGNATURE_ORIGIN).iterator();
- Iterator<PackageRelationship> sigRels = null;
- PackagePart sigPart = null;
+ Iterator<PackageRelationship> sigRels;
+ PackagePart sigPart;
public boolean hasNext() {
while (sigRels == null || !sigRels.hasNext()) {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFDocument.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFDocument.java
index ba460cc13c..1fe9515e3d 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFDocument.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFDocument.java
@@ -40,10 +40,10 @@ public class XDGFDocument {
Map<Long, XDGFStyleSheet> _styleSheets = new HashMap<Long, XDGFStyleSheet>();
// defaults
- long _defaultFillStyle = 0;
- long _defaultGuideStyle = 0;
- long _defaultLineStyle = 0;
- long _defaultTextStyle = 0;
+ long _defaultFillStyle;
+ long _defaultGuideStyle;
+ long _defaultLineStyle;
+ long _defaultTextStyle;
public XDGFDocument(VisioDocumentType document) {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMaster.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMaster.java
index 68c2c86267..b1edbcb277 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMaster.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMaster.java
@@ -29,7 +29,7 @@ public class XDGFMaster {
private MasterType _master;
protected XDGFMasterContents _content;
- protected XDGFSheet _pageSheet = null;
+ protected XDGFSheet _pageSheet;
public XDGFMaster(MasterType master, XDGFMasterContents content,
XDGFDocument document) {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java
index 3bdbd2e1b5..388d50a25b 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java
@@ -34,7 +34,7 @@ public class XDGFPage {
private PageType _page;
protected XDGFPageContents _content;
protected XDGFPages _pages;
- protected XDGFSheet _pageSheet = null;
+ protected XDGFSheet _pageSheet;
public XDGFPage(PageType page, XDGFPageContents content,
XDGFDocument document, XDGFPages pages) {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFShape.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFShape.java
index 42deac4c26..7cb2be6298 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFShape.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFShape.java
@@ -49,58 +49,58 @@ public class XDGFShape extends XDGFSheet {
XDGFBaseContents _parentPage;
XDGFShape _parent; // only non-null if a subshape
- XDGFMaster _master = null;
- XDGFShape _masterShape = null;
+ XDGFMaster _master;
+ XDGFShape _masterShape;
- XDGFText _text = null;
+ XDGFText _text;
// subshapes if they exist
- List<XDGFShape> _shapes = null;
+ List<XDGFShape> _shapes;
// properties specific to shapes
// center of rotation relative to origin of parent
- Double _pinX = null;
- Double _pinY = null;
+ Double _pinX;
+ Double _pinY;
- Double _width = null;
- Double _height = null;
+ Double _width;
+ Double _height;
// center of rotation relative to self
- Double _locPinX = null;
- Double _locPinY = null;
+ Double _locPinX;
+ Double _locPinY;
// start x coordinate, relative to parent
// -> one dimensional shapes only
- Double _beginX = null;
- Double _beginY = null;
+ Double _beginX;
+ Double _beginY;
// end x coordinate, relative to parent
// -> one dimensional shapes only
- Double _endX = null;
- Double _endY = null;
+ Double _endX;
+ Double _endY;
- Double _angle = null;
- Double _rotationXAngle = null;
- Double _rotationYAngle = null;
- Double _rotationZAngle = null;
+ Double _angle;
+ Double _rotationXAngle;
+ Double _rotationYAngle;
+ Double _rotationZAngle;
// end x coordinate, relative to parent
- Boolean _flipX = null;
- Boolean _flipY = null;
+ Boolean _flipX;
+ Boolean _flipY;
// center of text relative to this shape
- Double _txtPinX = null;
- Double _txtPinY = null;
+ Double _txtPinX;
+ Double _txtPinY;
// center of text relative to text block
- Double _txtLocPinX = null;
- Double _txtLocPinY = null;
+ Double _txtLocPinX;
+ Double _txtLocPinY;
- Double _txtAngle = null;
+ Double _txtAngle;
- Double _txtWidth = null;
- Double _txtHeight = null;
+ Double _txtWidth;
+ Double _txtHeight;
public XDGFShape(ShapeSheetType shapeSheet, XDGFBaseContents parentPage,
XDGFDocument document) {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java
index 1cc807fdfb..ab2c1d5111 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java
@@ -52,7 +52,7 @@ public abstract class XDGFSheet {
protected SortedMap<Long, GeometrySection> _geometry = new TreeMap<Long, GeometrySection>();
// special: character section
- protected CharacterSection _character = null;
+ protected CharacterSection _character;
public XDGFSheet(SheetType sheet, XDGFDocument document) {
try {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CharacterSection.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CharacterSection.java
index 7c1aa3f0c5..97d62c5c2a 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CharacterSection.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CharacterSection.java
@@ -30,8 +30,8 @@ import com.microsoft.schemas.office.visio.x2012.main.SectionType;
public class CharacterSection extends XDGFSection {
- Double _fontSize = null;
- Color _fontColor = null;
+ Double _fontSize;
+ Color _fontColor;
Map<String, XDGFCell> _characterCells = new HashMap<String, XDGFCell>();
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java
index d51e9070df..2d6f251bb4 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java
@@ -56,8 +56,8 @@ public class CombinedIterable<T> implements Iterable<T> {
Long lastI = Long.MIN_VALUE;
- Entry<Long, T> currentBase = null;
- Entry<Long, T> currentMaster = null;
+ Entry<Long, T> currentBase;
+ Entry<Long, T> currentMaster;
// grab the iterator for both
Iterator<Entry<Long, T>> baseI = _baseItems.entrySet().iterator();
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/GeometrySection.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/GeometrySection.java
index bc7cdf60b4..6f47ad5933 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/GeometrySection.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/GeometrySection.java
@@ -40,7 +40,7 @@ import com.microsoft.schemas.office.visio.x2012.main.SectionType;
public class GeometrySection extends XDGFSection {
- GeometrySection _master = null;
+ GeometrySection _master;
// rows
SortedMap<Long, GeometryRow> _rows = new TreeMap<Long, GeometryRow>();
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/ArcTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/ArcTo.java
index fdcce80560..be2a291c14 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/ArcTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/ArcTo.java
@@ -31,18 +31,18 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class ArcTo implements GeometryRow {
- ArcTo _master = null;
+ ArcTo _master;
// The x-coordinate of the ending vertex of an arc.
- Double x = null;
+ Double x;
// The y-coordinate of the ending vertex of an arc.
- Double y = null;
+ Double y;
// The distance from the arc's midpoint to the midpoint of its chord.
- Double a = null;
+ Double a;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/Ellipse.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/Ellipse.java
index 01eecdd003..ba4d3ff67c 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/Ellipse.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/Ellipse.java
@@ -30,24 +30,24 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class Ellipse implements GeometryRow {
- Ellipse _master = null;
+ Ellipse _master;
// x coordinate of center point
- Double x = null;
+ Double x;
// y coordinate of center point
- Double y = null;
+ Double y;
// x coordinate of first point on ellipse
- Double a = null;
+ Double a;
// y coordinate of first point on ellipse
- Double b = null;
+ Double b;
// x coordinate of second point on ellipse
- Double c = null;
+ Double c;
// y coordinate of second point on ellipse
- Double d = null;
+ Double d;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/EllipticalArcTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/EllipticalArcTo.java
index 02fc5aef40..17db67c1fc 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/EllipticalArcTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/EllipticalArcTo.java
@@ -30,36 +30,36 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class EllipticalArcTo implements GeometryRow {
- EllipticalArcTo _master = null;
+ EllipticalArcTo _master;
// The x-coordinate of the ending vertex on an arc.
- Double x = null;
+ Double x;
// The y-coordinate of the ending vertex on an arc.
- Double y = null;
+ Double y;
// The x-coordinate of the arc's control point; a point on the arc. The
// control point is best located about halfway between the beginning and
// ending vertices of the arc. Otherwise, the arc may grow to an extreme
// size in order to pass through the control point, with unpredictable
// results.
- Double a = null;
+ Double a;
// The y-coordinate of an arc's control point.
- Double b = null;
+ Double b;
// The angle of an arc's major axis relative to the x-axis of its parent
// shape.
- Double c = null;
+ Double c;
// The ratio of an arc's major axis to its minor axis. Despite the usual
// meaning of these words, the "major" axis does not have to be greater than
// the "minor" axis, so this ratio does not have to be greater than 1.
// Setting this cell to a value less than or equal to 0 or greater than 1000
// can lead to unpredictable results.
- Double d = null;
+ Double d;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
@@ -129,7 +129,7 @@ public class EllipticalArcTo implements GeometryRow {
_master = (EllipticalArcTo) row;
}
- public static int draw = 0;
+ public static int draw;
@Override
public void addToPath(java.awt.geom.Path2D.Double path, XDGFShape parent) {
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/InfiniteLine.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/InfiniteLine.java
index 6965c1b89f..0fc79c231e 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/InfiniteLine.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/InfiniteLine.java
@@ -31,25 +31,25 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
*/
public class InfiniteLine implements GeometryRow {
- InfiniteLine _master = null;
+ InfiniteLine _master;
// An x-coordinate of a point on the infinite line; paired with y-coordinate
// represented by the Y cell.
- Double x = null;
+ Double x;
// A y-coordinate of a point on the infinite line; paired with x-coordinate
// represented by the X cell.
- Double y = null;
+ Double y;
// An x-coordinate of a point on the infinite line; paired with y-coordinate
// represented by the B cell.
- Double a = null;
+ Double a;
// A y-coordinate of a point on an infinite line; paired with x-coordinate
// represented by the A cell.
- Double b = null;
+ Double b;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/LineTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/LineTo.java
index 93857f09bd..9c24988b38 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/LineTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/LineTo.java
@@ -26,12 +26,12 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class LineTo implements GeometryRow {
- LineTo _master = null;
+ LineTo _master;
- Double x = null;
- Double y = null;
+ Double x;
+ Double y;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java
index 6dca12b2be..297b213e06 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java
@@ -31,12 +31,12 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
*/
public class MoveTo implements GeometryRow {
- MoveTo _master = null;
+ MoveTo _master;
- Double x = null;
- Double y = null;
+ Double x;
+ Double y;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/NURBSTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/NURBSTo.java
index 353d694f9b..f945802651 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/NURBSTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/NURBSTo.java
@@ -33,30 +33,30 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class NURBSTo implements GeometryRow {
- NURBSTo _master = null;
+ NURBSTo _master;
// The x-coordinate of the last control point of a NURBS.
- Double x = null;
+ Double x;
// The y-coordinate of the last control point of a NURBS.
- Double y = null;
+ Double y;
// The second to the last knot of the NURBS.
- Double a = null;
+ Double a;
// The last weight of the NURBS.
- Double b = null;
+ Double b;
// The first knot of the NURBS.
- Double c = null;
+ Double c;
// The first weight of the NURBS.
- Double d = null;
+ Double d;
// A NURBS formula.
- String e = null;
+ String e;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/PolyLineTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/PolyLineTo.java
index c5f1ba011a..4b6d37ae5d 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/PolyLineTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/PolyLineTo.java
@@ -27,18 +27,18 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class PolyLineTo implements GeometryRow {
- PolyLineTo _master = null;
+ PolyLineTo _master;
// The x-coordinate of the ending vertex of a polyline.
- Double x = null;
+ Double x;
// The y-coordinate of the ending vertex of a polyline.
- Double y = null;
+ Double y;
// The polyline formula
- String a = null;
+ String a;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelCubBezTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelCubBezTo.java
index 3a419bb506..3988de313d 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelCubBezTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelCubBezTo.java
@@ -26,35 +26,35 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class RelCubBezTo implements GeometryRow {
- RelCubBezTo _master = null;
+ RelCubBezTo _master;
// The x-coordinate of the ending vertex of a cubic Bezier curve relative to
// the width of the shape.
- Double x = null;
+ Double x;
// The y-coordinate of the ending vertex of a cubic Bezier curve relative to
// the height of the shape.
- Double y = null;
+ Double y;
// The x-coordinate of the curve's beginning control point relative to the
// shape's width; a point on the arc. The control point is best located
// between the beginning and ending vertices of the arc.
- Double a = null;
+ Double a;
// The y-coordinate of a curve's beginning control point relative to the
// shape's height.
- Double b = null;
+ Double b;
// The x-coordinate of the curve's ending control point relative to the
// shape's width; a point on the arc. The control point is best located
// between the beginning control point and ending vertices of the arc.
- Double c = null;
+ Double c;
// The y-coordinate of a curve's ending control point relative to the
// shape's height.
- Double d = null;
+ Double d;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelEllipticalArcTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelEllipticalArcTo.java
index 9b58406cdc..d8fe5c69c3 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelEllipticalArcTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelEllipticalArcTo.java
@@ -26,32 +26,32 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class RelEllipticalArcTo implements GeometryRow {
- RelEllipticalArcTo _master = null;
+ RelEllipticalArcTo _master;
// The x-coordinate of the ending vertex on an arc relative to the width of
// the shape.
- Double x = null;
+ Double x;
// The y-coordinate of the ending vertex on an arc relative to the height of
// the shape.
- Double y = null;
+ Double y;
// The x-coordinate of the arc's control point relative to the shape's
// width; a point on the arc.
- Double a = null;
+ Double a;
// The y-coordinate of an arc's control point relative to the shape's width.
- Double b = null;
+ Double b;
// The angle of an arc's major axis relative to the x-axis of its parent.
- Double c = null;
+ Double c;
// The ratio of an arc's major axis to its minor axis. Despite the usual
// meaning of these words, the "major" axis does not have to be greater than
// the "minor" axis, so this ratio does not have to be greater than 1.
- Double d = null;
+ Double d;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java
index 1886f20590..dc55211295 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java
@@ -30,12 +30,12 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
*/
public class RelLineTo implements GeometryRow {
- RelLineTo _master = null;
+ RelLineTo _master;
- Double x = null;
- Double y = null;
+ Double x;
+ Double y;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelMoveTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelMoveTo.java
index 0b6f51c19c..0a2f9bf9d6 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelMoveTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelMoveTo.java
@@ -26,12 +26,12 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
public class RelMoveTo implements GeometryRow {
- RelMoveTo _master = null;
+ RelMoveTo _master;
- Double x = null;
- Double y = null;
+ Double x;
+ Double y;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelQuadBezTo.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelQuadBezTo.java
index ecb4a3a434..ae07025484 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelQuadBezTo.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelQuadBezTo.java
@@ -31,26 +31,26 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
*/
public class RelQuadBezTo implements GeometryRow {
- RelQuadBezTo _master = null;
+ RelQuadBezTo _master;
// The x-coordinate of the ending vertex of a quadratic Bezier curve
// relative to the width of the shape.
- Double x = null;
+ Double x;
// The y-coordinate of the ending vertex of a quadratic Bezier curve
// relative to the height of the shape.
- Double y = null;
+ Double y;
// The x-coordinate of the curve's control point relative to the shape's
// width; a point on the arc. The control point is best located about
// halfway between the beginning and ending vertices of the arc.
- Double a = null;
+ Double a;
// The y-coordinate of a curve's control point relative to the shape's
// height.
- Double b = null;
+ Double b;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineKnot.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineKnot.java
index f75490b073..640b10ea48 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineKnot.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineKnot.java
@@ -30,18 +30,18 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
*/
public class SplineKnot implements GeometryRow {
- SplineKnot _master = null;
+ SplineKnot _master;
// The x-coordinate of a control point.
- Double x = null;
+ Double x;
// The y-coordinate of a control point.
- Double y = null;
+ Double y;
// One of the spline's knots (other than the last one or the first two).
- Double a = null;
+ Double a;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineStart.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineStart.java
index 224a36c036..a427de6f1f 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineStart.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineStart.java
@@ -29,27 +29,27 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
*/
public class SplineStart implements GeometryRow {
- SplineStart _master = null;
+ SplineStart _master;
// The x-coordinate of a spline's second control point.
- Double x = null;
+ Double x;
// The y-coordinate of a spline's second control point.
- Double y = null;
+ Double y;
// The second knot of the spline.
- Double a = null;
+ Double a;
// The first knot of a spline.
- Double b = null;
+ Double b;
// The last knot of a spline.
- Double c = null;
+ Double c;
// The degree of a spline (an integer from 1 to 25).
- Integer d = null;
+ Integer d;
- Boolean deleted = null;
+ Boolean deleted;
// TODO: support formulas
diff --git a/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeDebuggerRenderer.java b/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeDebuggerRenderer.java
index d4a010ba26..062f987ab3 100644
--- a/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeDebuggerRenderer.java
+++ b/src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeDebuggerRenderer.java
@@ -25,7 +25,7 @@ import org.apache.poi.xdgf.usermodel.XDGFShape;
public class ShapeDebuggerRenderer extends ShapeRenderer {
- ShapeVisitorAcceptor _debugAcceptor = null;
+ ShapeVisitorAcceptor _debugAcceptor;
public ShapeDebuggerRenderer() {
super();
diff --git a/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java b/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
index d3ff89613f..6e96f0e2b5 100644
--- a/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
+++ b/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
@@ -49,8 +49,8 @@ public class XSLFPowerPointExtractor extends POIXMLTextExtractor {
private XMLSlideShow slideshow;
private boolean slidesByDefault = true;
- private boolean notesByDefault = false;
- private boolean masterByDefault = false;
+ private boolean notesByDefault;
+ private boolean masterByDefault;
public XSLFPowerPointExtractor(XMLSlideShow slideshow) {
super(slideshow);
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
index 95abdebf2b..bfff18d83c 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
@@ -43,10 +43,10 @@ import org.apache.poi.util.Units;
*/
@Beta
public final class XSLFPictureData extends POIXMLDocumentPart implements PictureData {
- private Long checksum = null;
+ private Long checksum;
// original image dimensions (for formats supported by BufferedImage)
- private Dimension origSize = null;
+ private Dimension origSize;
private int index = -1;
/**
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java
index b159dcaec1..589f84e918 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java
@@ -69,14 +69,14 @@ import org.openxmlformats.schemas.drawingml.x2006.main.STTextVerticalType;
* Represents a cell of a table in a .pptx presentation
*/
public class XSLFTableCell extends XSLFTextShape implements TableCell<XSLFShape,XSLFTextParagraph> {
- private CTTableCellProperties _tcPr = null;
+ private CTTableCellProperties _tcPr;
private final XSLFTable table;
- private int row = 0, col = 0;
+ private int row, col;
/**
* Volatile/temporary anchor - e.g. for rendering
*/
- private Rectangle2D anchor = null;
+ private Rectangle2D anchor;
/*package*/ XSLFTableCell(CTTableCell cell, XSLFTable table){
super(cell, table.getSheet());
diff --git a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBCommentsTable.java b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBCommentsTable.java
index 6504a6df16..fa81c44b38 100644
--- a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBCommentsTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBCommentsTable.java
@@ -42,9 +42,9 @@ public class XSSFBCommentsTable extends XSSFBParser {
//these are all used only during parsing, and they are mutable!
private int authorId = -1;
- private CellAddress cellAddress = null;
- private XSSFBCellRange cellRange = null;
- private String comment = null;
+ private CellAddress cellAddress;
+ private XSSFBCellRange cellRange;
+ private String comment;
private StringBuilder authorBuffer = new StringBuilder();
diff --git a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSheetHandler.java b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSheetHandler.java
index 819281f650..639300df1e 100644
--- a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSheetHandler.java
+++ b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSheetHandler.java
@@ -47,9 +47,9 @@ public class XSSFBSheetHandler extends XSSFBParser {
private int lastEndedRow = -1;
private int lastStartedRow = -1;
- private int currentRow = 0;
+ private int currentRow;
private byte[] rkBuffer = new byte[8];
- private XSSFBCellRange hyperlinkCellRange = null;
+ private XSSFBCellRange hyperlinkCellRange;
private StringBuilder xlWideStringBuffer = new StringBuilder();
private final XSSFBCellHeader cellBuffer = new XSSFBCellHeader();
diff --git a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBStylesTable.java b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBStylesTable.java
index 583c9fcecf..6394074ba8 100644
--- a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBStylesTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBStylesTable.java
@@ -40,8 +40,8 @@ public class XSSFBStylesTable extends XSSFBParser {
private final SortedMap<Short, String> numberFormats = new TreeMap<Short,String>();
private final List<Short> styleIds = new ArrayList<Short>();
- private boolean inCellXFS = false;
- private boolean inFmts = false;
+ private boolean inCellXFS;
+ private boolean inFmts;
public XSSFBStylesTable(InputStream is) throws IOException {
super(is);
parse();
diff --git a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java
index 6653ee655d..aa1f2b2148 100644
--- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java
+++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java
@@ -183,7 +183,7 @@ public class XSSFBReader extends XSSFReader {
static {
RECORDS.set(XSSFBRecordType.BrtAbsPath15.getId());
}
- private String path = null;
+ private String path;
public PathExtractor(InputStream is) {
super(is, RECORDS);
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java
index 4e2a5c27b9..a55686f797 100644
--- a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java
+++ b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java
@@ -51,7 +51,7 @@ public class XSSFBEventBasedExcelExtractor extends XSSFEventBasedExcelExtractor
XSSFRelation.XLSB_BINARY_WORKBOOK
};
- private boolean handleHyperlinksInCells = false;
+ private boolean handleHyperlinksInCells;
public XSSFBEventBasedExcelExtractor(String path) throws XmlException, OpenXML4JException, IOException {
super(path);
diff --git a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java
index dd14c6cd08..b80df39606 100644
--- a/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java
+++ b/src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java
@@ -65,9 +65,9 @@ public class XSSFEventBasedExcelExtractor extends POIXMLTextExtractor
private Locale locale;
private boolean includeTextBoxes = true;
private boolean includeSheetNames = true;
- private boolean includeCellComments = false;
+ private boolean includeCellComments;
private boolean includeHeadersFooters = true;
- private boolean formulasNotResults = false;
+ private boolean formulasNotResults;
private boolean concatenatePhoneticRuns = true;
public XSSFEventBasedExcelExtractor(String path) throws XmlException, OpenXML4JException, IOException {
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java b/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java
index 03a29a3674..06b02c9bcc 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java
@@ -59,7 +59,7 @@ import org.apache.poi.util.Internal;
// untrackedColumns stores columns have been explicitly untracked so they aren't implicitly re-tracked by trackAllColumns
// Using a HashSet instead of a TreeSet because we don't care about order.
private final Set<Integer> untrackedColumns = new HashSet<Integer>();
- private boolean trackAllColumns = false;
+ private boolean trackAllColumns;
/**
* Tuple to store the column widths considering and not considering merged cells
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
index 5eebd7eb80..1ab5c8a231 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
@@ -42,8 +42,8 @@ public class SXSSFRow implements Row, Comparable<SXSSFRow>
private final SortedMap<Integer, SXSSFCell> _cells = new TreeMap<Integer, SXSSFCell>();
private short _style = -1; // index of cell style in style table
private short _height = -1; // row height in twips (1/20 point)
- private boolean _zHeight = false; // row zero-height (this is somehow different than being hidden)
- private int _outlineLevel = 0; // Outlining level of the row, when outlining is on
+ private boolean _zHeight; // row zero-height (this is somehow different than being hidden)
+ private int _outlineLevel; // Outlining level of the row, when outlining is on
// use Boolean to have a tri-state for on/off/undefined
private Boolean _hidden = UNDEFINED;
private Boolean _collapsed = UNDEFINED;
@@ -490,7 +490,7 @@ public class SXSSFRow implements Row, Comparable<SXSSFRow>
public class CellIterator implements Iterator<Cell>
{
final int maxColumn = getLastCellNum(); //last column PLUS ONE
- int pos = 0;
+ int pos;
@Override
public boolean hasNext()
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
index 6fce529456..78a8a4916e 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
@@ -70,9 +70,9 @@ public class SXSSFSheet implements Sheet
private final SheetDataWriter _writer;
private int _randomAccessWindowSize = SXSSFWorkbook.DEFAULT_WINDOW_SIZE;
private final AutoSizeColumnTracker _autoSizeColumnTracker;
- private int outlineLevelRow = 0;
+ private int outlineLevelRow;
private int lastFlushedRowNumber = -1;
- private boolean allFlushed = false;
+ private boolean allFlushed;
public SXSSFSheet(SXSSFWorkbook workbook, XSSFSheet xSheet) throws IOException {
_workbook = workbook;
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java
index 9c5e6ffb10..e6400c4476 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java
@@ -56,7 +56,7 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork
// lazily populated. This should only be accessed through getTableCache
// keys are lower-case to make this a quasi-case-insensitive map
- private Map<String, XSSFTable> _tableCache = null;
+ private Map<String, XSSFTable> _tableCache;
protected BaseXSSFEvaluationWorkbook(XSSFWorkbook book) {
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConnector.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConnector.java
index f0d9d12af5..78d4e402e4 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConnector.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConnector.java
@@ -42,7 +42,7 @@ import org.apache.poi.util.Internal;
*/
public final class XSSFConnector extends XSSFShape {
- private static CTConnector prototype = null;
+ private static CTConnector prototype;
private CTConnector ctShape;
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
index 7078f3c09d..b67c7eb449 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
@@ -83,7 +83,7 @@ public final class XSSFDrawing extends POIXMLDocumentPart implements Drawing<XSS
* Root element of the SpreadsheetML Drawing part
*/
private CTDrawing drawing;
- private long numOfGraphicFrames = 0L;
+ private long numOfGraphicFrames;
protected static final String NAMESPACE_A = XSSFRelation.NS_DRAWINGML;
protected static final String NAMESPACE_C = XSSFRelation.NS_CHART;
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
index fff0005518..a2e95c3ea7 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
@@ -43,7 +43,7 @@ import org.w3c.dom.NodeList;
*/
public final class XSSFGraphicFrame extends XSSFShape {
- private static CTGraphicalObjectFrame prototype = null;
+ private static CTGraphicalObjectFrame prototype;
private CTGraphicalObjectFrame graphicFrame;
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java
index a928956be5..e54e25fd5f 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java
@@ -57,7 +57,7 @@ public class XSSFObjectData extends XSSFSimpleShape implements ObjectData {
/**
* A default instance of CTShape used for creating new shapes.
*/
- private static CTShape prototype = null;
+ private static CTShape prototype;
private CTOleObject oleObject;
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 2d8bffb15a..85eb35a6e9 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
@@ -60,7 +60,7 @@ public final class XSSFPicture extends XSSFShape implements Picture {
/**
* A default instance of CTShape used for creating new shapes.
*/
- private static CTPicture prototype = null;
+ private static CTPicture prototype;
/**
* This object specifies a picture object and all its properties
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFShapeGroup.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFShapeGroup.java
index 60e090456e..31d5964c86 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFShapeGroup.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFShapeGroup.java
@@ -42,7 +42,7 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape;
* specified just as they normally would.
*/
public final class XSSFShapeGroup extends XSSFShape implements ShapeContainer<XSSFShape> {
- private static CTGroupShape prototype = null;
+ private static CTGroupShape prototype;
private CTGroupShape ctGroup;
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java
index a3e78dac32..08e35f30e5 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java
@@ -46,7 +46,7 @@ public class XSSFSimpleShape extends XSSFShape implements Iterable<XSSFTextParag
/**
* A default instance of CTShape used for creating new shapes.
*/
- private static CTShape prototype = null;
+ private static CTShape prototype;
/**
* Xml bean that stores properties of this shape
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java
index 62267f2c79..b9d0841d3f 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java
@@ -124,7 +124,7 @@ public abstract class XSSFHeaderFooter implements HeaderFooter {
private HeaderFooterHelper helper;
private CTHeaderFooter headerFooter;
- private boolean stripFields = false;
+ private boolean stripFields;
/**
* Create an instance of XSSFHeaderFooter from the supplied XML bean
diff --git a/src/ooxml/java/org/apache/poi/xwpf/extractor/XWPFWordExtractor.java b/src/ooxml/java/org/apache/poi/xwpf/extractor/XWPFWordExtractor.java
index f02982949a..aaf4453623 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/extractor/XWPFWordExtractor.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/extractor/XWPFWordExtractor.java
@@ -53,7 +53,7 @@ public class XWPFWordExtractor extends POIXMLTextExtractor {
};
private XWPFDocument document;
- private boolean fetchHyperlinks = false;
+ private boolean fetchHyperlinks;
private boolean concatenatePhoneticRuns = true;
public XWPFWordExtractor(OPCPackage container) throws XmlException, OpenXML4JException, IOException {
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java
index f0f2d316a0..4cd688c205 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java
@@ -25,7 +25,7 @@ package org.apache.poi.xwpf.usermodel;
* 3rd CharacterPosition
*/
public class PositionInParagraph {
- private int posRun = 0, posText = 0, posChar = 0;
+ private int posRun, posText, posChar;
public PositionInParagraph() {
}
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
index d72462ddee..e20611c60f 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
@@ -64,12 +64,12 @@ public class XWPFTableCell implements IBody, ICell {
}
private final CTTc ctTc;
- protected List<XWPFParagraph> paragraphs = null;
- protected List<XWPFTable> tables = null;
- protected List<IBodyElement> bodyElements = null;
+ protected List<XWPFParagraph> paragraphs;
+ protected List<XWPFTable> tables;
+ protected List<IBodyElement> bodyElements;
protected IBody part;
- private XWPFTableRow tableRow = null;
+ private XWPFTableRow tableRow;
/**
* If a table cell does not include at least one block-level element, then this document shall be considered corrupt