aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org/apache/poi/xwpf/usermodel
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2020-04-02 22:37:45 +0000
committerAndreas Beeker <kiwiwings@apache.org>2020-04-02 22:37:45 +0000
commit3f7d718a67d7f2830b186557d200ecba00d8ac34 (patch)
tree52100ec7b6e4a7906a9302404661bd76badbb4aa /src/ooxml/java/org/apache/poi/xwpf/usermodel
parent24c4f94962bba1f5fa884148b78ac71422d81f99 (diff)
downloadpoi-3f7d718a67d7f2830b186557d200ecba00d8ac34.tar.gz
poi-3f7d718a67d7f2830b186557d200ecba00d8ac34.zip
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
Diffstat (limited to 'src/ooxml/java/org/apache/poi/xwpf/usermodel')
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/FootnoteEndnoteIdManager.java10
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/FootnoteEndnoteIdManager.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/FootnoteEndnoteIdManager.java
index 2dc78b1d94..1f3d60d93a 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/FootnoteEndnoteIdManager.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/FootnoteEndnoteIdManager.java
@@ -27,7 +27,7 @@ import java.util.List;
*/
public class FootnoteEndnoteIdManager {
- private XWPFDocument document;
+ private XWPFDocument document;
public FootnoteEndnoteIdManager(XWPFDocument document) {
this.document = document;
@@ -39,8 +39,8 @@ public class FootnoteEndnoteIdManager {
* @return ID number to use.
*/
public BigInteger nextId() {
-
- List<BigInteger> ids = new ArrayList<BigInteger>();
+
+ List<BigInteger> ids = new ArrayList<>();
for (XWPFAbstractFootnoteEndnote note : document.getFootnotes()) {
ids.add(note.getId());
}
@@ -52,8 +52,8 @@ public class FootnoteEndnoteIdManager {
while (ids.contains(newId)) {
cand++;
newId = BigInteger.valueOf(cand);
- }
-
+ }
+
return newId;
}
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java
index 0b408af7ee..1df57f6d56 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFEndnotes.java
@@ -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);
}
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
index d3ccfbc624..8f7c591c5a 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
@@ -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);
}