diff options
author | Dominik Stadler <centic@apache.org> | 2017-09-16 08:27:23 +0000 |
---|---|---|
committer | Dominik Stadler <centic@apache.org> | 2017-09-16 08:27:23 +0000 |
commit | 0cfa1ede4cbc9c00d2f5d3946ae9f57a6dd74d48 (patch) | |
tree | b7f6385f47dbeda7309986def1a4450c64499eb0 /src/java/org/apache/poi/ddf | |
parent | 3e70d75cfb84a6eb6ddb06d1028e636cf03914d1 (diff) | |
download | poi-0cfa1ede4cbc9c00d2f5d3946ae9f57a6dd74d48.tar.gz poi-0cfa1ede4cbc9c00d2f5d3946ae9f57a6dd74d48.zip |
Remove unnecessary type arguments (Java 8)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808516 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/ddf')
8 files changed, 14 insertions, 14 deletions
diff --git a/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java b/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java index fa6851c5a0..6009b00522 100644 --- a/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java +++ b/src/java/org/apache/poi/ddf/AbstractEscherOptRecord.java @@ -30,7 +30,7 @@ import org.apache.poi.util.LittleEndian; */ public abstract class AbstractEscherOptRecord extends EscherRecord { - private List<EscherProperty> properties = new ArrayList<EscherProperty>(); + private List<EscherProperty> properties = new ArrayList<>(); /** * Add a property to this record. @@ -176,7 +176,7 @@ public abstract class AbstractEscherOptRecord extends EscherRecord @Override protected Object[][] getAttributeMap() { - List<Object> attrList = new ArrayList<Object>(properties.size()*2+2); + List<Object> attrList = new ArrayList<>(properties.size() * 2 + 2); attrList.add("properties"); attrList.add(properties.size()); for ( EscherProperty property : properties ) { diff --git a/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java b/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java index 4342708bff..954163cb60 100644 --- a/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java +++ b/src/java/org/apache/poi/ddf/DefaultEscherRecordFactory.java @@ -108,7 +108,7 @@ public class DefaultEscherRecordFactory implements EscherRecordFactory { * @return The map containing the id/constructor pairs. */ protected static Map<Short, Constructor<? extends EscherRecord>> recordsToMap(Class<?>[] recClasses) { - Map<Short, Constructor<? extends EscherRecord>> result = new HashMap<Short, Constructor<? extends EscherRecord>>(); + Map<Short, Constructor<? extends EscherRecord>> result = new HashMap<>(); final Class<?>[] EMPTY_CLASS_ARRAY = new Class[0]; for (Class<?> recClass : recClasses) { diff --git a/src/java/org/apache/poi/ddf/EscherContainerRecord.java b/src/java/org/apache/poi/ddf/EscherContainerRecord.java index 82ae37481c..d7889015d5 100644 --- a/src/java/org/apache/poi/ddf/EscherContainerRecord.java +++ b/src/java/org/apache/poi/ddf/EscherContainerRecord.java @@ -68,7 +68,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl */ private int _remainingLength; - private final List<EscherRecord> _childRecords = new ArrayList<EscherRecord>(); + private final List<EscherRecord> _childRecords = new ArrayList<>(); @Override public int fillFields(byte[] data, int pOffset, EscherRecordFactory recordFactory) { @@ -148,7 +148,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl */ @Override public List<EscherRecord> getChildRecords() { - return new ArrayList<EscherRecord>(_childRecords); + return new ArrayList<>(_childRecords); } /** @@ -190,7 +190,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl * @return EscherContainer children */ public List<EscherContainerRecord> getChildContainers() { - List<EscherContainerRecord> containers = new ArrayList<EscherContainerRecord>(); + List<EscherContainerRecord> containers = new ArrayList<>(); for (EscherRecord r : this) { if(r instanceof EscherContainerRecord) { containers.add((EscherContainerRecord) r); @@ -284,7 +284,7 @@ public final class EscherContainerRecord extends EscherRecord implements Iterabl @Override protected Object[][] getAttributeMap() { - List<Object> chList = new ArrayList<Object>(_childRecords.size()*2+2); + List<Object> chList = new ArrayList<>(_childRecords.size() * 2 + 2); chList.add("children"); chList.add(_childRecords.size()); int count = 0; diff --git a/src/java/org/apache/poi/ddf/EscherDggRecord.java b/src/java/org/apache/poi/ddf/EscherDggRecord.java index 7ab5ea9d43..46e1aa8fcf 100644 --- a/src/java/org/apache/poi/ddf/EscherDggRecord.java +++ b/src/java/org/apache/poi/ddf/EscherDggRecord.java @@ -39,7 +39,7 @@ public final class EscherDggRecord extends EscherRecord { // private int field_2_numIdClusters; private int field_3_numShapesSaved; private int field_4_drawingsSaved; - private final List<FileIdCluster> field_5_fileIdClusters = new ArrayList<FileIdCluster>(); + private final List<FileIdCluster> field_5_fileIdClusters = new ArrayList<>(); private int maxDgId; public static class FileIdCluster { @@ -329,7 +329,7 @@ public final class EscherDggRecord extends EscherRecord { @Override protected Object[][] getAttributeMap() { - List<Object> fldIds = new ArrayList<Object>(); + List<Object> fldIds = new ArrayList<>(); fldIds.add("FileId Clusters"); fldIds.add(field_5_fileIdClusters.size()); for (FileIdCluster fic : field_5_fileIdClusters) { diff --git a/src/java/org/apache/poi/ddf/EscherProperties.java b/src/java/org/apache/poi/ddf/EscherProperties.java index 955db365fa..acff6241c2 100644 --- a/src/java/org/apache/poi/ddf/EscherProperties.java +++ b/src/java/org/apache/poi/ddf/EscherProperties.java @@ -334,7 +334,7 @@ public final class EscherProperties { private static final Map<Short, EscherPropertyMetaData> properties = initProps(); private static Map<Short, EscherPropertyMetaData> initProps() { - Map<Short, EscherPropertyMetaData> m = new HashMap<Short, EscherPropertyMetaData>(); + Map<Short, EscherPropertyMetaData> m = new HashMap<>(); addProp(m, TRANSFORM__ROTATION, "transform.rotation"); addProp(m, PROTECTION__LOCKROTATION, "protection.lockrotation"); addProp(m, PROTECTION__LOCKASPECTRATIO, "protection.lockaspectratio"); diff --git a/src/java/org/apache/poi/ddf/EscherPropertyFactory.java b/src/java/org/apache/poi/ddf/EscherPropertyFactory.java index 642c3056d1..3b05034caf 100644 --- a/src/java/org/apache/poi/ddf/EscherPropertyFactory.java +++ b/src/java/org/apache/poi/ddf/EscherPropertyFactory.java @@ -35,7 +35,7 @@ public final class EscherPropertyFactory { * @return The new properties */ public List<EscherProperty> createProperties(byte[] data, int offset, short numProperties) { - List<EscherProperty> results = new ArrayList<EscherProperty>(); + List<EscherProperty> results = new ArrayList<>(); int pos = offset; diff --git a/src/java/org/apache/poi/ddf/EscherTextboxRecord.java b/src/java/org/apache/poi/ddf/EscherTextboxRecord.java index f869d4a9e7..07527cb960 100644 --- a/src/java/org/apache/poi/ddf/EscherTextboxRecord.java +++ b/src/java/org/apache/poi/ddf/EscherTextboxRecord.java @@ -135,7 +135,7 @@ public final class EscherTextboxRecord extends EscherRecord implements Cloneable @Override protected Object[][] getAttributeMap() { int numCh = getChildRecords().size(); - List<Object> chLst = new ArrayList<Object>(numCh*2+2); + List<Object> chLst = new ArrayList<>(numCh * 2 + 2); chLst.add("children"); chLst.add(numCh); for (EscherRecord er : getChildRecords()) { diff --git a/src/java/org/apache/poi/ddf/UnknownEscherRecord.java b/src/java/org/apache/poi/ddf/UnknownEscherRecord.java index 55689e2a42..f722f87b65 100644 --- a/src/java/org/apache/poi/ddf/UnknownEscherRecord.java +++ b/src/java/org/apache/poi/ddf/UnknownEscherRecord.java @@ -35,7 +35,7 @@ public final class UnknownEscherRecord extends EscherRecord implements Cloneable private List<EscherRecord> _childRecords; public UnknownEscherRecord() { - _childRecords = new ArrayList<EscherRecord>(); + _childRecords = new ArrayList<>(); } @Override @@ -139,7 +139,7 @@ public final class UnknownEscherRecord extends EscherRecord implements Cloneable @Override protected Object[][] getAttributeMap() { int numCh = getChildRecords().size(); - List<Object> chLst = new ArrayList<Object>(numCh*2+2); + List<Object> chLst = new ArrayList<>(numCh * 2 + 2); chLst.add("children"); chLst.add(numCh); for (EscherRecord er : _childRecords) { |