Sonar Fixes - The diamond operator ("<>") should be used

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876064 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2020-04-02 22:37:45 +00:00
parent 24c4f94962
commit 3f7d718a67
60 changed files with 683 additions and 675 deletions

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -83,7 +84,7 @@ public class CTAdjustHandleList {
*/
public List<Object> getAhXYOrAhPolar() {
if (ahXYOrAhPolar == null) {
ahXYOrAhPolar = new ArrayList<Object>();
ahXYOrAhPolar = new ArrayList<>();
}
return this.ahXYOrAhPolar;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -90,7 +91,7 @@ public class CTColorMRU {
*/
public List<Object> getEGColorChoice() {
if (egColorChoice == null) {
egColorChoice = new ArrayList<Object>();
egColorChoice = new ArrayList<>();
}
return this.egColorChoice;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
@ -75,7 +76,7 @@ public class CTConnectionSiteList {
*/
public List<CTConnectionSite> getCxn() {
if (cxn == null) {
cxn = new ArrayList<CTConnectionSite>();
cxn = new ArrayList<>();
}
return this.cxn;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
@ -75,7 +76,7 @@ public class CTGeomGuideList {
*/
public List<CTGeomGuide> getGd() {
if (gd == null) {
gd = new ArrayList<CTGeomGuide>();
gd = new ArrayList<>();
}
return this.gd;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -145,7 +146,7 @@ public class CTHslColor {
*/
public List<JAXBElement<?>> getEGColorTransform() {
if (egColorTransform == null) {
egColorTransform = new ArrayList<JAXBElement<?>>();
egColorTransform = new ArrayList<>();
}
return this.egColorTransform;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
@ -75,7 +76,7 @@ public class CTOfficeArtExtensionList {
*/
public List<CTOfficeArtExtension> getExt() {
if (ext == null) {
ext = new ArrayList<CTOfficeArtExtension>();
ext = new ArrayList<>();
}
return this.ext;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -111,7 +112,7 @@ public class CTPath2D {
*/
public List<Object> getCloseOrMoveToOrLnTo() {
if (closeOrMoveToOrLnTo == null) {
closeOrMoveToOrLnTo = new ArrayList<Object>();
closeOrMoveToOrLnTo = new ArrayList<>();
}
return this.closeOrMoveToOrLnTo;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -77,7 +78,7 @@ public class CTPath2DCubicBezierTo {
*/
public List<CTAdjPoint2D> getPt() {
if (pt == null) {
pt = new ArrayList<CTAdjPoint2D>();
pt = new ArrayList<>();
}
return this.pt;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
@ -75,7 +76,7 @@ public class CTPath2DList {
*/
public List<CTPath2D> getPath() {
if (path == null) {
path = new ArrayList<CTPath2D>();
path = new ArrayList<>();
}
return this.path;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -77,7 +78,7 @@ public class CTPath2DQuadBezierTo {
*/
public List<CTAdjPoint2D> getPt() {
if (pt == null) {
pt = new ArrayList<CTAdjPoint2D>();
pt = new ArrayList<>();
}
return this.pt;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -139,7 +140,7 @@ public class CTPresetColor {
*/
public List<JAXBElement<?>> getEGColorTransform() {
if (egColorTransform == null) {
egColorTransform = new ArrayList<JAXBElement<?>>();
egColorTransform = new ArrayList<>();
}
return this.egColorTransform;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -142,7 +143,7 @@ public class CTSRgbColor {
*/
public List<JAXBElement<?>> getEGColorTransform() {
if (egColorTransform == null) {
egColorTransform = new ArrayList<JAXBElement<?>>();
egColorTransform = new ArrayList<>();
}
return this.egColorTransform;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -145,7 +146,7 @@ public class CTScRgbColor {
*/
public List<JAXBElement<?>> getEGColorTransform() {
if (egColorTransform == null) {
egColorTransform = new ArrayList<JAXBElement<?>>();
egColorTransform = new ArrayList<>();
}
return this.egColorTransform;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -139,7 +140,7 @@ public class CTSchemeColor {
*/
public List<JAXBElement<?>> getEGColorTransform() {
if (egColorTransform == null) {
egColorTransform = new ArrayList<JAXBElement<?>>();
egColorTransform = new ArrayList<>();
}
return this.egColorTransform;
}

View File

@ -19,6 +19,7 @@ package org.apache.poi.sl.draw.binding;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -147,7 +148,7 @@ public class CTSystemColor {
*/
public List<JAXBElement<?>> getEGColorTransform() {
if (egColorTransform == null) {
egColorTransform = new ArrayList<JAXBElement<?>>();
egColorTransform = new ArrayList<>();
}
return this.egColorTransform;
}

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@ public enum BlackWhiteMode {
this.underlying = mode;
}
private final static HashMap<STBlackWhiteMode.Enum, BlackWhiteMode> reverse = new HashMap<STBlackWhiteMode.Enum, BlackWhiteMode>();
private final static HashMap<STBlackWhiteMode.Enum, BlackWhiteMode> reverse = new HashMap<>();
static {
for (BlackWhiteMode value : values()) {
reverse.put(value.underlying, value);

View File

@ -34,7 +34,7 @@ public enum CompoundLine {
this.underlying = line;
}
private final static HashMap<STCompoundLine.Enum, CompoundLine> reverse = new HashMap<STCompoundLine.Enum, CompoundLine>();
private final static HashMap<STCompoundLine.Enum, CompoundLine> reverse = new HashMap<>();
static {
for (CompoundLine value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum LineCap {
this.underlying = line;
}
private final static HashMap<STLineCap.Enum, LineCap> reverse = new HashMap<STLineCap.Enum, LineCap>();
private final static HashMap<STLineCap.Enum, LineCap> reverse = new HashMap<>();
static {
for (LineCap value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum LineEndLength {
this.underlying = lineEnd;
}
private final static HashMap<STLineEndLength.Enum, LineEndLength> reverse = new HashMap<STLineEndLength.Enum, LineEndLength>();
private final static HashMap<STLineEndLength.Enum, LineEndLength> reverse = new HashMap<>();
static {
for (LineEndLength value : values()) {
reverse.put(value.underlying, value);

View File

@ -35,7 +35,7 @@ public enum LineEndType {
this.underlying = lineEnd;
}
private final static HashMap<STLineEndType.Enum, LineEndType> reverse = new HashMap<STLineEndType.Enum, LineEndType>();
private final static HashMap<STLineEndType.Enum, LineEndType> reverse = new HashMap<>();
static {
for (LineEndType value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum LineEndWidth {
this.underlying = lineEnd;
}
private final static HashMap<STLineEndWidth.Enum, LineEndWidth> reverse = new HashMap<STLineEndWidth.Enum, LineEndWidth>();
private final static HashMap<STLineEndWidth.Enum, LineEndWidth> reverse = new HashMap<>();
static {
for (LineEndWidth value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum PathShadeType {
this.underlying = pathShadeType;
}
private final static HashMap<STPathShadeType.Enum, PathShadeType> reverse = new HashMap<STPathShadeType.Enum, PathShadeType>();
private final static HashMap<STPathShadeType.Enum, PathShadeType> reverse = new HashMap<>();
static {
for (PathShadeType value : values()) {
reverse.put(value.underlying, value);

View File

@ -31,7 +31,7 @@ public enum PenAlignment {
this.underlying = alignment;
}
private final static HashMap<STPenAlignment.Enum, PenAlignment> reverse = new HashMap<STPenAlignment.Enum, PenAlignment>();
private final static HashMap<STPenAlignment.Enum, PenAlignment> reverse = new HashMap<>();
static {
for (PenAlignment value : values()) {
reverse.put(value.underlying, value);

View File

@ -167,7 +167,7 @@ public enum PresetColor {
this.underlying = color;
}
private final static HashMap<STPresetColorVal.Enum, PresetColor> reverse = new HashMap<STPresetColorVal.Enum, PresetColor>();
private final static HashMap<STPresetColorVal.Enum, PresetColor> reverse = new HashMap<>();
static {
for (PresetColor value : values()) {
reverse.put(value.underlying, value);

View File

@ -217,7 +217,7 @@ public enum PresetGeometry {
this.underlying = shape;
}
private final static HashMap<STShapeType.Enum, PresetGeometry> reverse = new HashMap<STShapeType.Enum, PresetGeometry>();
private final static HashMap<STShapeType.Enum, PresetGeometry> reverse = new HashMap<>();
static {
for (PresetGeometry value : values()) {
reverse.put(value.underlying, value);

View File

@ -40,7 +40,7 @@ public enum PresetLineDash {
this.underlying = dash;
}
private final static HashMap<STPresetLineDashVal.Enum, PresetLineDash> reverse = new HashMap<STPresetLineDashVal.Enum, PresetLineDash>();
private final static HashMap<STPresetLineDashVal.Enum, PresetLineDash> reverse = new HashMap<>();
static {
for (PresetLineDash value : values()) {
reverse.put(value.underlying, value);

View File

@ -83,7 +83,7 @@ public enum PresetPattern {
this.underlying = pattern;
}
private final static HashMap<STPresetPatternVal.Enum, PresetPattern> reverse = new HashMap<STPresetPatternVal.Enum, PresetPattern>();
private final static HashMap<STPresetPatternVal.Enum, PresetPattern> reverse = new HashMap<>();
static {
for (PresetPattern value : values()) {
reverse.put(value.underlying, value);

View File

@ -38,7 +38,7 @@ public enum RectangleAlignment {
this.underlying = alignment;
}
private final static HashMap<STRectAlignment.Enum, RectangleAlignment> reverse = new HashMap<STRectAlignment.Enum, RectangleAlignment>();
private final static HashMap<STRectAlignment.Enum, RectangleAlignment> reverse = new HashMap<>();
static {
for (RectangleAlignment value : values()) {
reverse.put(value.underlying, value);

View File

@ -46,7 +46,7 @@ public enum SchemeColor {
this.underlying = color;
}
private final static HashMap<STSchemeColorVal.Enum, SchemeColor> reverse = new HashMap<STSchemeColorVal.Enum, SchemeColor>();
private final static HashMap<STSchemeColorVal.Enum, SchemeColor> reverse = new HashMap<>();
static {
for (SchemeColor value : values()) {
reverse.put(value.underlying, value);

View File

@ -59,7 +59,7 @@ public enum SystemColor {
this.underlying = color;
}
private final static HashMap<STSystemColorVal.Enum, SystemColor> reverse = new HashMap<STSystemColorVal.Enum, SystemColor>();
private final static HashMap<STSystemColorVal.Enum, SystemColor> reverse = new HashMap<>();
static {
for (SystemColor value : values()) {
reverse.put(value.underlying, value);

View File

@ -33,7 +33,7 @@ public enum TileFlipMode {
this.underlying = mode;
}
private final static HashMap<STTileFlipMode.Enum, TileFlipMode> reverse = new HashMap<STTileFlipMode.Enum, TileFlipMode>();
private final static HashMap<STTileFlipMode.Enum, TileFlipMode> reverse = new HashMap<>();
static {
for (TileFlipMode value : values()) {
reverse.put(value.underlying, value);

View File

@ -31,7 +31,7 @@ public enum AxisCrossBetween {
this.underlying = crossBetween;
}
private final static HashMap<STCrossBetween.Enum, AxisCrossBetween> reverse = new HashMap<STCrossBetween.Enum, AxisCrossBetween>();
private final static HashMap<STCrossBetween.Enum, AxisCrossBetween> reverse = new HashMap<>();
static {
for (AxisCrossBetween value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum AxisCrosses {
this.underlying = crosses;
}
private final static HashMap<STCrosses.Enum, AxisCrosses> reverse = new HashMap<STCrosses.Enum, AxisCrosses>();
private final static HashMap<STCrosses.Enum, AxisCrosses> reverse = new HashMap<>();
static {
for (AxisCrosses value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum AxisLabelAlignment {
this.underlying = alignment;
}
private final static HashMap<STLblAlgn.Enum, AxisLabelAlignment> reverse = new HashMap<STLblAlgn.Enum, AxisLabelAlignment>();
private final static HashMap<STLblAlgn.Enum, AxisLabelAlignment> reverse = new HashMap<>();
static {
for (AxisLabelAlignment value : values()) {
reverse.put(value.underlying, value);

View File

@ -31,7 +31,7 @@ public enum AxisOrientation {
this.underlying = orientation;
}
private final static HashMap<STOrientation.Enum, AxisOrientation> reverse = new HashMap<STOrientation.Enum, AxisOrientation>();
private final static HashMap<STOrientation.Enum, AxisOrientation> reverse = new HashMap<>();
static {
for (AxisOrientation value : values()) {
reverse.put(value.underlying, value);

View File

@ -33,7 +33,7 @@ public enum AxisPosition {
this.underlying = position;
}
private final static HashMap<STAxPos.Enum, AxisPosition> reverse = new HashMap<STAxPos.Enum, AxisPosition>();
private final static HashMap<STAxPos.Enum, AxisPosition> reverse = new HashMap<>();
static {
for (AxisPosition value : values()) {
reverse.put(value.underlying, value);

View File

@ -33,7 +33,7 @@ public enum AxisTickLabelPosition {
this.underlying = position;
}
private final static HashMap<STTickLblPos.Enum, AxisTickLabelPosition> reverse = new HashMap<STTickLblPos.Enum, AxisTickLabelPosition>();
private final static HashMap<STTickLblPos.Enum, AxisTickLabelPosition> reverse = new HashMap<>();
static {
for (AxisTickLabelPosition value : values()) {
reverse.put(value.underlying, value);

View File

@ -33,7 +33,7 @@ public enum AxisTickMark {
this.underlying = tickMark;
}
private final static HashMap<STTickMark.Enum, AxisTickMark> reverse = new HashMap<STTickMark.Enum, AxisTickMark>();
private final static HashMap<STTickMark.Enum, AxisTickMark> reverse = new HashMap<>();
static {
for (AxisTickMark value : values()) {
reverse.put(value.underlying, value);

View File

@ -31,7 +31,7 @@ public enum BarDirection {
this.underlying = direction;
}
private final static HashMap<STBarDir.Enum, BarDirection> reverse = new HashMap<STBarDir.Enum, BarDirection>();
private final static HashMap<STBarDir.Enum, BarDirection> reverse = new HashMap<>();
static {
for (BarDirection value : values()) {
reverse.put(value.underlying, value);

View File

@ -33,7 +33,7 @@ public enum BarGrouping {
this.underlying = grouping;
}
private final static HashMap<STBarGrouping.Enum, BarGrouping> reverse = new HashMap<STBarGrouping.Enum, BarGrouping>();
private final static HashMap<STBarGrouping.Enum, BarGrouping> reverse = new HashMap<>();
static {
for (BarGrouping value : values()) {
reverse.put(value.underlying, value);

View File

@ -31,7 +31,7 @@ public enum LayoutMode {
this.underlying = layoutMode;
}
private final static HashMap<STLayoutMode.Enum, LayoutMode> reverse = new HashMap<STLayoutMode.Enum, LayoutMode>();
private final static HashMap<STLayoutMode.Enum, LayoutMode> reverse = new HashMap<>();
static {
for (LayoutMode value : values()) {
reverse.put(value.underlying, value);

View File

@ -31,7 +31,7 @@ public enum LayoutTarget {
this.underlying = layoutTarget;
}
private final static HashMap<STLayoutTarget.Enum, LayoutTarget> reverse = new HashMap<STLayoutTarget.Enum, LayoutTarget>();
private final static HashMap<STLayoutTarget.Enum, LayoutTarget> reverse = new HashMap<>();
static {
for (LayoutTarget value : values()) {
reverse.put(value.underlying, value);

View File

@ -34,7 +34,7 @@ public enum LegendPosition {
this.underlying = position;
}
private final static HashMap<STLegendPos.Enum, LegendPosition> reverse = new HashMap<STLegendPos.Enum, LegendPosition>();
private final static HashMap<STLegendPos.Enum, LegendPosition> reverse = new HashMap<>();
static {
for (LegendPosition value : values()) {
reverse.put(value.underlying, value);

View File

@ -40,7 +40,7 @@ public enum MarkerStyle {
this.underlying = style;
}
private final static HashMap<STMarkerStyle.Enum, MarkerStyle> reverse = new HashMap<STMarkerStyle.Enum, MarkerStyle>();
private final static HashMap<STMarkerStyle.Enum, MarkerStyle> reverse = new HashMap<>();
static {
for (MarkerStyle value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum RadarStyle {
this.underlying = style;
}
private final static HashMap<STRadarStyle.Enum, RadarStyle> reverse = new HashMap<STRadarStyle.Enum, RadarStyle>();
private final static HashMap<STRadarStyle.Enum, RadarStyle> reverse = new HashMap<>();
static {
for (RadarStyle value : values()) {
reverse.put(value.underlying, value);

View File

@ -35,7 +35,7 @@ public enum ScatterStyle {
this.underlying = style;
}
private final static HashMap<STScatterStyle.Enum, ScatterStyle> reverse = new HashMap<STScatterStyle.Enum, ScatterStyle>();
private final static HashMap<STScatterStyle.Enum, ScatterStyle> reverse = new HashMap<>();
static {
for (ScatterStyle value : values()) {
reverse.put(value.underlying, value);

View File

@ -34,7 +34,7 @@ public enum AnchorType {
this.underlying = caps;
}
private final static HashMap<STTextAnchoringType.Enum, AnchorType> reverse = new HashMap<STTextAnchoringType.Enum, AnchorType>();
private final static HashMap<STTextAnchoringType.Enum, AnchorType> reverse = new HashMap<>();
static {
for (AnchorType value : values()) {
reverse.put(value.underlying, value);

View File

@ -70,7 +70,7 @@ public enum AutonumberScheme {
this.underlying = scheme;
}
private final static HashMap<STTextAutonumberScheme.Enum, AutonumberScheme> reverse = new HashMap<STTextAutonumberScheme.Enum, AutonumberScheme>();
private final static HashMap<STTextAutonumberScheme.Enum, AutonumberScheme> reverse = new HashMap<>();
static {
for (AutonumberScheme value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum CapsType {
this.underlying = caps;
}
private final static HashMap<STTextCapsType.Enum, CapsType> reverse = new HashMap<STTextCapsType.Enum, CapsType>();
private final static HashMap<STTextCapsType.Enum, CapsType> reverse = new HashMap<>();
static {
for (CapsType value : values()) {
reverse.put(value.underlying, value);

View File

@ -34,7 +34,7 @@ public enum FontAlignment {
this.underlying = align;
}
private final static HashMap<STTextFontAlignType.Enum, FontAlignment> reverse = new HashMap<STTextFontAlignType.Enum, FontAlignment>();
private final static HashMap<STTextFontAlignType.Enum, FontAlignment> reverse = new HashMap<>();
static {
for (FontAlignment value : values()) {
reverse.put(value.underlying, value);

View File

@ -32,7 +32,7 @@ public enum StrikeType {
this.underlying = strike;
}
private final static HashMap<STTextStrikeType.Enum, StrikeType> reverse = new HashMap<STTextStrikeType.Enum, StrikeType>();
private final static HashMap<STTextStrikeType.Enum, StrikeType> reverse = new HashMap<>();
static {
for (StrikeType value : values()) {
reverse.put(value.underlying, value);

View File

@ -33,7 +33,7 @@ public enum TabAlignment {
this.underlying = align;
}
private final static HashMap<STTextTabAlignType.Enum, TabAlignment> reverse = new HashMap<STTextTabAlignType.Enum, TabAlignment>();
private final static HashMap<STTextTabAlignType.Enum, TabAlignment> reverse = new HashMap<>();
static {
for (TabAlignment value : values()) {
reverse.put(value.underlying, value);

View File

@ -36,7 +36,7 @@ public enum TextAlignment {
this.underlying = align;
}
private final static HashMap<STTextAlignType.Enum, TextAlignment> reverse = new HashMap<STTextAlignType.Enum, TextAlignment>();
private final static HashMap<STTextAlignType.Enum, TextAlignment> reverse = new HashMap<>();
static {
for (TextAlignment value : values()) {
reverse.put(value.underlying, value);

View File

@ -47,7 +47,7 @@ public enum UnderlineType {
this.underlying = underline;
}
private final static HashMap<STTextUnderlineType.Enum, UnderlineType> reverse = new HashMap<STTextUnderlineType.Enum, UnderlineType>();
private final static HashMap<STTextUnderlineType.Enum, UnderlineType> reverse = new HashMap<>();
static {
for (UnderlineType value : values()) {
reverse.put(value.underlying, value);

View File

@ -47,11 +47,7 @@ public class XSSFLineChartData implements LineChartData {
/**
* List of all data series.
*/
private List<Series> series;
public XSSFLineChartData() {
series = new ArrayList<Series>();
}
private final List<Series> series = new ArrayList<>();
static class Series extends AbstractXSSFChartSeries implements LineChartSeries {
private int id;

View File

@ -49,11 +49,7 @@ public class XSSFScatterChartData implements ScatterChartData {
/**
* List of all data series.
*/
private List<Series> series;
public XSSFScatterChartData() {
series = new ArrayList<Series>();
}
private final List<Series> series = new ArrayList<>();
/**
* Package private ScatterChartSerie implementation.

View File

@ -40,7 +40,7 @@ public class FootnoteEndnoteIdManager {
*/
public BigInteger nextId() {
List<BigInteger> ids = new ArrayList<BigInteger>();
List<BigInteger> ids = new ArrayList<>();
for (XWPFAbstractFootnoteEndnote note : document.getFootnotes()) {
ids.add(note.getId());
}

View File

@ -174,7 +174,7 @@ public class XWPFEndnotes extends XWPFAbstractFootnotesEndnotes {
* @return List, possibly empty, of end notes.
*/
public List<XWPFEndnote> getEndnotesList() {
List<XWPFEndnote> resultList = new ArrayList<XWPFEndnote>();
List<XWPFEndnote> resultList = new ArrayList<>();
for (XWPFAbstractFootnoteEndnote note : listFootnote) {
resultList.add((XWPFEndnote)note);
}

View File

@ -164,7 +164,7 @@ public class XWPFFootnotes extends XWPFAbstractFootnotesEndnotes {
* @return List, possibly empty, of footnotes.
*/
public List<XWPFFootnote> getFootnotesList() {
List<XWPFFootnote> resultList = new ArrayList<XWPFFootnote>();
List<XWPFFootnote> resultList = new ArrayList<>();
for (XWPFAbstractFootnoteEndnote note : listFootnote) {
resultList.add((XWPFFootnote)note);
}