aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2016-01-01 00:45:05 +0000
committerAndreas Beeker <kiwiwings@apache.org>2016-01-01 00:45:05 +0000
commitb3ce115ea57e6663490dc178436297e1844a1b4f (patch)
tree32a5098b50c34991d6620a510ccedf16520b0b1a
parent720db41739a4b9564e33e9912b40636f59ddaf52 (diff)
downloadpoi-b3ce115ea57e6663490dc178436297e1844a1b4f.tar.gz
poi-b3ce115ea57e6663490dc178436297e1844a1b4f.zip
remove unnecessary @SuppressWarnings("deprecation") warnings (because of old xml schemas)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722480 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/ooxml/java/org/apache/poi/POIXMLProperties.java5
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTable.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java3
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColorScaleFormatting.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFIconMultiStateFormatting.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java10
-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.java20
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java3
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java5
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java6
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/XSSFRowShifter.java5
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/AbstractXWPFSDT.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFComment.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java2
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java1
48 files changed, 8 insertions, 98 deletions
diff --git a/src/ooxml/java/org/apache/poi/POIXMLProperties.java b/src/ooxml/java/org/apache/poi/POIXMLProperties.java
index 48ce99fce1..3be94d29d4 100644
--- a/src/ooxml/java/org/apache/poi/POIXMLProperties.java
+++ b/src/ooxml/java/org/apache/poi/POIXMLProperties.java
@@ -469,8 +469,7 @@ public class POIXMLProperties {
*
* @return next property id starting with 2
*/
- @SuppressWarnings("deprecation")
- protected int nextPid(){
+ protected int nextPid() {
int propid = 1;
for(CTProperty p : props.getProperties().getPropertyArray()){
if(p.getPid() > propid) propid = p.getPid();
@@ -484,7 +483,6 @@ public class POIXMLProperties {
* @param name the name to check
* @return whether a property with the given name exists in the custom properties
*/
- @SuppressWarnings("deprecation")
public boolean contains(String name) {
for(CTProperty p : props.getProperties().getPropertyArray()){
if(p.getName().equals(name)) return true;
@@ -501,7 +499,6 @@ public class POIXMLProperties {
*
* @param name the name of the property to fetch
*/
- @SuppressWarnings("deprecation")
public CTProperty getProperty(String name) {
for(CTProperty p : props.getProperties().getPropertyArray()){
if(p.getName().equals(name)) {
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 cad527032f..ddcbfff2c9 100644
--- a/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
+++ b/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
@@ -119,7 +119,6 @@ public class XSLFPowerPointExtractor extends POIXMLTextExtractor {
* @param notesText Should we retrieve text from notes?
* @param masterText Should we retrieve text from master slides?
*/
- @SuppressWarnings("deprecation")
public String getText(boolean slideText, boolean notesText, boolean masterText) {
StringBuffer text = new StringBuffer();
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTable.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTable.java
index 2cc7724c79..037ae65d92 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTable.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTable.java
@@ -27,7 +27,6 @@ public class DrawingTable {
this.table = table;
}
- @SuppressWarnings("deprecation")
public DrawingTableRow[] getRows() {
CTTableRow[] ctTableRows = table.getTrArray();
DrawingTableRow[] o = new DrawingTableRow[ctTableRows.length];
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java
index 0858d2be8e..70aa159a93 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTableRow.java
@@ -27,7 +27,6 @@ public class DrawingTableRow {
this.row = row;
}
- @SuppressWarnings("deprecation")
public DrawingTableCell[] getCells() {
CTTableCell[] ctTableCells = row.getTcArray();
DrawingTableCell[] o = new DrawingTableCell[ctTableCells.length];
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java
index 88171f38eb..c3f7778b81 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/DrawingTextBody.java
@@ -27,7 +27,6 @@ public class DrawingTextBody {
this.textBody = textBody;
}
- @SuppressWarnings("deprecation")
public DrawingParagraph[] getParagraphs() {
CTTextParagraph[] paragraphs = textBody.getPArray();
DrawingParagraph[] o = new DrawingParagraph[paragraphs.length];
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java
index 1cc257c51d..34b5bed19a 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XMLSlideShow.java
@@ -206,7 +206,6 @@ implements SlideShow<XSLFShape,XSLFTextParagraph> {
* @param layout
* @return created slide
*/
- @SuppressWarnings("deprecation")
public XSLFSlide createSlide(XSLFSlideLayout layout) {
int slideNumber = 256, cnt = 1;
CTSlideIdList slideList;
@@ -369,7 +368,6 @@ implements SlideShow<XSLFShape,XSLFTextParagraph> {
*
* @param newIndex 0-based index of the slide
*/
- @SuppressWarnings("deprecation")
public void setSlideOrder(XSLFSlide slide, int newIndex){
int oldIndex = _slides.indexOf(slide);
if(oldIndex == -1) throw new IllegalArgumentException("Slide not found");
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java
index 1fe05a48cf..dcbc78076e 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommentAuthors.java
@@ -63,7 +63,6 @@ public class XSLFCommentAuthors extends POIXMLDocumentPart {
return _authors;
}
- @SuppressWarnings("deprecation")
public CTCommentAuthor getAuthorById(long id) {
// TODO Have a map
for (CTCommentAuthor author : _authors.getCmAuthorArray()) {
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java
index 34d4e0031a..15a62a833d 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFCommonSlideData.java
@@ -46,7 +46,6 @@ public class XSLFCommonSlideData {
this.data = data;
}
- @SuppressWarnings("deprecation")
public List<DrawingTextBody> getDrawingText() {
CTGroupShape gs = data.getSpTree();
@@ -100,7 +99,6 @@ public class XSLFCommonSlideData {
return paragraphs;
}
- @SuppressWarnings("deprecation")
private void processShape(CTGroupShape gs, List<DrawingTextBody> out) {
for (CTShape shape : gs.getSpArray()) {
CTTextBody ctTextBody = shape.getTxBody();
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java
index 1f23523938..f75ffa8ed4 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFFreeformShape.java
@@ -119,7 +119,6 @@ public class XSLFFreeformShape extends XSLFAutoShape
}
@Override
- @SuppressWarnings("deprecation")
public GeneralPath getPath() {
GeneralPath path = new GeneralPath();
Rectangle2D bounds = getAnchor();
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java
index 8c69bbfa99..a91e451f89 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSlideShow.java
@@ -66,7 +66,6 @@ public class XSLFSlideShow extends POIXMLDocument {
*/
private List<PackagePart> embedds;
- @SuppressWarnings("deprecation")
public XSLFSlideShow(OPCPackage container) throws OpenXML4JException, IOException, XmlException {
super(container);
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java
index 04e9742aa3..491583f5aa 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableRow.java
@@ -38,7 +38,6 @@ public class XSLFTableRow implements Iterable<XSLFTableCell> {
private List<XSLFTableCell> _cells;
private XSLFTable _table;
- @SuppressWarnings("deprecation")
/*package*/ XSLFTableRow(CTTableRow row, XSLFTable table){
_row = row;
_table = table;
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java
index 02532dbf1c..fce35efb59 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java
@@ -41,7 +41,6 @@ public class XSLFTableStyles extends POIXMLDocumentPart implements Iterable<XSLF
super();
}
- @SuppressWarnings("deprecation")
public XSLFTableStyles(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
super(part, rel);
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java
index 3172c162cd..5abb098375 100644
--- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java
+++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java
@@ -819,7 +819,6 @@ public class XSLFTextParagraph implements TextParagraph<XSLFShape,XSLFTextParagr
return false;
}
- @SuppressWarnings("deprecation")
void copy(XSLFTextParagraph other){
if (other == this) return;
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 39a852eb79..9ff2238578 100644
--- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
+++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFSheetXMLHandler.java
@@ -160,7 +160,6 @@ public class XSSFSheetXMLHandler extends DefaultHandler {
this(styles, strings, sheetContentsHandler, new DataFormatter(), formulasNotResults);
}
- @SuppressWarnings("deprecation")
private void init() {
if (commentsTable != null) {
commentCellRefs = new LinkedList<CellAddress>();
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java b/src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java
index 13133f4fb1..31e9825126 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/CalculationChain.java
@@ -82,7 +82,6 @@ public class CalculationChain extends POIXMLDocumentPart {
* @param sheetId the sheet Id of a sheet the formula belongs to.
* @param ref A1 style reference to the cell containing the formula.
*/
- @SuppressWarnings("deprecation") // getXYZArray() array accessors are deprecated
public void removeItem(int sheetId, String ref){
//sheet Id of a sheet the cell belongs to
int id = -1;
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java b/src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
index 5743ac2fc6..56bc44c72a 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/CommentsTable.java
@@ -122,7 +122,6 @@ public class CommentsTable extends POIXMLDocumentPart {
}
public int findAuthor(String author) {
- @SuppressWarnings("deprecation")
String[] authorArray = comments.getAuthors().getAuthorArray();
for (int i = 0 ; i < authorArray.length; i++) {
if (authorArray[i].equals(author)) {
@@ -203,7 +202,6 @@ public class CommentsTable extends POIXMLDocumentPart {
* Calls that use the commentRefs cache will perform in O(1)
* time rather than O(n) lookup time for List<CTComment> comments.
*/
- @SuppressWarnings("deprecation") //YK: getXYZArray) array accessors are deprecated in xmlbeans with JDK 1.5 support
private void prepareCTCommentCache() {
// Create the cache if needed
if(commentRefs == null) {
@@ -265,7 +263,6 @@ public class CommentsTable extends POIXMLDocumentPart {
final String stringRef = cellRef.formatAsString();
CTCommentList lst = comments.getCommentList();
if(lst != null) {
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
CTComment[] commentArray = lst.getCommentArray();
for (int i = 0; i < commentArray.length; i++) {
CTComment comment = commentArray[i];
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java b/src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java
index 42fce11597..18b63025c8 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/ExternalLinksTable.java
@@ -116,7 +116,6 @@ public class ExternalLinksTable extends POIXMLDocumentPart {
link.getExternalBook().setId(newRel.getId());
}
- @SuppressWarnings("deprecation")
public List<String> getSheetNames() {
CTExternalSheetName[] sheetNames =
link.getExternalBook().getSheetNames().getSheetNameArray();
@@ -127,7 +126,6 @@ public class ExternalLinksTable extends POIXMLDocumentPart {
return names;
}
- @SuppressWarnings("deprecation")
public List<Name> getDefinedNames() {
CTExternalDefinedName[] extNames =
link.getExternalBook().getDefinedNames().getDefinedNameArray();
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java b/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
index c8032e6021..874ef98051 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/MapInfo.java
@@ -67,7 +67,6 @@ public class MapInfo extends POIXMLDocumentPart {
readFrom(part.getInputStream());
}
- @SuppressWarnings("deprecation")
public void readFrom(InputStream is) throws IOException {
try {
MapInfoDocument doc = MapInfoDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
@@ -106,7 +105,6 @@ public class MapInfo extends POIXMLDocumentPart {
* @param schemaId the schema ID
* @return CTSchema by it's ID
*/
- @SuppressWarnings("deprecation")
public CTSchema getCTSchemaById(String schemaId){
CTSchema xmlSchema = null;
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java b/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
index 96a8ce89f2..17b61a1c01 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
@@ -114,7 +114,6 @@ public class SharedStringsTable extends POIXMLDocumentPart {
* @param is The input stream containing the XML document.
* @throws IOException if an error occurs while reading.
*/
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void readFrom(InputStream is) throws IOException {
try {
int cnt = 0;
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java b/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
index 953bad409c..77b96d85e7 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/SingleXmlCells.java
@@ -96,7 +96,6 @@ public class SingleXmlCells extends POIXMLDocumentPart {
*
* @return all the SimpleXmlCell contained in this SingleXmlCells element
*/
- @SuppressWarnings("deprecation")
public List<XSSFSingleXmlCell> getAllSimpleXmlCell(){
List<XSSFSingleXmlCell> list = new Vector<XSSFSingleXmlCell>();
diff --git a/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java b/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
index ca9be39b9d..9b98e1e5ee 100644
--- a/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
@@ -187,7 +187,6 @@ public class StylesTable extends POIXMLDocumentPart {
* @param is The input stream containing the XML document.
* @throws IOException if an error occurs while reading.
*/
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
protected void readFrom(InputStream is) throws IOException {
try {
doc = StyleSheetDocument.Factory.parse(is, DEFAULT_XML_OPTIONS);
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
index 3dcb00d3ab..94db41ceec 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFChart.java
@@ -299,14 +299,12 @@ public final class XSSFChart extends POIXMLDocumentPart implements Chart, ChartA
parseValueAxis();
}
- @SuppressWarnings("deprecation")
private void parseCategoryAxis() {
for (CTCatAx catAx : chart.getPlotArea().getCatAxArray()) {
axis.add(new XSSFCategoryAxis(this, catAx));
}
}
- @SuppressWarnings("deprecation")
private void parseValueAxis() {
for (CTValAx valAx : chart.getPlotArea().getValAxArray()) {
axis.add(new XSSFValueAxis(this, valAx));
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColorScaleFormatting.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColorScaleFormatting.java
index f32feeac3a..eb15001b0a 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColorScaleFormatting.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFColorScaleFormatting.java
@@ -50,7 +50,6 @@ public class XSSFColorScaleFormatting implements ColorScaleFormatting {
}
}
- @SuppressWarnings("deprecation")
public XSSFColor[] getColors() {
CTColor[] ctcols = _scale.getColorArray();
XSSFColor[] c = new XSSFColor[ctcols.length];
@@ -67,7 +66,6 @@ public class XSSFColorScaleFormatting implements ColorScaleFormatting {
_scale.setColorArray(ctcols);
}
- @SuppressWarnings("deprecation")
public XSSFConditionalFormattingThreshold[] getThresholds() {
CTCfvo[] cfvos = _scale.getCfvoArray();
XSSFConditionalFormattingThreshold[] t =
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFIconMultiStateFormatting.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFIconMultiStateFormatting.java
index 81883bb069..c2e26911af 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFIconMultiStateFormatting.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFIconMultiStateFormatting.java
@@ -62,7 +62,6 @@ public class XSSFIconMultiStateFormatting implements IconMultiStateFormatting {
_iconset.setReverse(reversed);
}
- @SuppressWarnings("deprecation")
public XSSFConditionalFormattingThreshold[] getThresholds() {
CTCfvo[] cfvos = _iconset.getCfvoArray();
XSSFConditionalFormattingThreshold[] t =
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
index cd132c8310..bda2ccf695 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPivotTable.java
@@ -265,7 +265,6 @@ public class XSSFPivotTable extends POIXMLDocumentPart {
}
@Beta
- @SuppressWarnings("deprecation")
public List<Integer> getRowLabelColumns() {
if (pivotTableDefinition.getRowFields() != null) {
List<Integer> columnIndexes = new ArrayList<Integer>();
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java
index 70ad236557..a427082873 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRichTextString.java
@@ -253,7 +253,6 @@ public class XSSFRichTextString implements RichTextString {
* it just text in the default style?
*/
public boolean hasFormatting() {
- @SuppressWarnings("deprecation")
CTRElt[] rs = st.getRArray();
if (rs == null || rs.length == 0) {
return false;
@@ -310,7 +309,6 @@ public class XSSFRichTextString implements RichTextString {
/**
* Returns the plain string representation.
*/
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public String getString() {
if(st.sizeOfRArray() == 0) {
return utfDecode(st.getT());
@@ -409,7 +407,6 @@ public class XSSFRichTextString implements RichTextString {
return st;
}
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
protected void setStylesTableReference(StylesTable tbl){
styles = tbl;
if(st.sizeOfRArray() > 0) {
@@ -558,7 +555,6 @@ public class XSSFRichTextString implements RichTextString {
while(sub.size() > 1) sub.remove(sub.lastKey());
}
- @SuppressWarnings("deprecation")
TreeMap<Integer, CTRPrElt> getFormatMap(CTRst entry){
int length = 0;
TreeMap<Integer, CTRPrElt> formats = new TreeMap<Integer, CTRPrElt>();
@@ -577,11 +573,11 @@ public class XSSFRichTextString implements RichTextString {
throw new IllegalArgumentException("Text length was " + text.length() +
" but the last format index was " + formats.lastKey());
}
- CTRst st = CTRst.Factory.newInstance();
+ CTRst stf = CTRst.Factory.newInstance();
int runStartIdx = 0;
for (Iterator<Integer> it = formats.keySet().iterator(); it.hasNext();) {
int runEndIdx = it.next();
- CTRElt run = st.addNewR();
+ CTRElt run = stf.addNewR();
String fragment = text.substring(runStartIdx, runEndIdx);
run.setT(fragment);
preserveSpaces(run.xgetT());
@@ -589,7 +585,7 @@ public class XSSFRichTextString implements RichTextString {
if(fmt != null) run.setRPr(fmt);
runStartIdx = runEndIdx;
}
- return st;
+ return stf;
}
private ThemesTable getThemesTable() {
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 14680572e3..5c8b385b76 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRow.java
@@ -66,7 +66,6 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
* @param row the xml bean containing all cell definitions for this row.
* @param sheet the parent sheet.
*/
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
protected XSSFRow(CTRow row, XSSFSheet sheet) {
_row = row;
_sheet = sheet;
@@ -474,7 +473,6 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
*
* @see org.apache.poi.xssf.usermodel.XSSFSheet#write(java.io.OutputStream) ()
*/
- @SuppressWarnings("deprecation")
protected void onDocumentWrite(){
// check if cells in the CTRow are ordered
boolean isOrdered = true;
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 d1a652bb97..940be262d0 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheet.java
@@ -231,7 +231,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
hyperlinks = new ArrayList<XSSFHyperlink>();
}
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
private void initRows(CTWorksheet worksheetParam) {
_rows = new TreeMap<Integer, XSSFRow>();
tables = new TreeMap<String, XSSFTable>();
@@ -247,7 +246,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* Read hyperlink relations, link them with CTHyperlink beans in this worksheet
* and initialize the internal array of XSSFHyperlink objects
*/
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
private void initHyperlinks() {
hyperlinks = new ArrayList<XSSFHyperlink>();
@@ -744,7 +742,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return Collections.unmodifiableList(hyperlinks);
}
- @SuppressWarnings("deprecation")
private int[] getBreaks(CTPageBreak ctPageBreak) {
CTBreak[] brkArray = ctPageBreak.getBrkArray();
int[] breaks = new int[brkArray.length];
@@ -754,7 +751,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return breaks;
}
- @SuppressWarnings("deprecation")
private void removeBreak(int index, CTPageBreak ctPageBreak) {
int index1 = index + 1;
CTBreak[] brkArray = ctPageBreak.getBrkArray();
@@ -1173,7 +1169,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
*
* @return the list of merged regions
*/
- @SuppressWarnings("deprecation")
@Override
public List<CellRangeAddress> getMergedRegions() {
List<CellRangeAddress> addresses = new ArrayList<CellRangeAddress>();
@@ -1512,7 +1507,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
/**
* Do not leave the width attribute undefined (see #52186).
*/
- @SuppressWarnings("deprecation")
private void setColWidthAttribute(CTCols ctCols) {
for (CTCol col : ctCols.getColArray()) {
if (!col.isSetWidth()) {
@@ -1550,8 +1544,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return (short) outlineLevel;
}
-
- @SuppressWarnings("deprecation")
private short getMaxOutlineLevelCols() {
CTCols ctCols = worksheet.getColsArray(0);
int outlineLevel = 0;
@@ -1761,7 +1753,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
*
* @param indices A set of the regions to unmerge
*/
- @SuppressWarnings("deprecation")
public void removeMergedRegions(Collection<Integer> indices) {
if (!worksheet.isSetMergeCells()) return;
@@ -1959,7 +1950,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
}
- @SuppressWarnings("deprecation")
private void setColumn(int targetColumnIx, Integer style,
Integer level, Boolean hidden, Boolean collapsed) {
CTCols cols = worksheet.getColsArray(0);
@@ -2055,7 +2045,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* the col info index of the start of the outline group
* @return the column index of the last column in the outline group
*/
- @SuppressWarnings("deprecation")
private int setGroupHidden(int pIdx, int level, boolean hidden) {
CTCols cols = worksheet.getColsArray(0);
int idx = pIdx;
@@ -2084,7 +2073,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return col.getMax() == other_col.getMin() - 1;
}
- @SuppressWarnings("deprecation")
private int findStartOfColumnOutlineGroup(int pIdx) {
// Find the start of the group.
CTCols cols = worksheet.getColsArray(0);
@@ -2106,7 +2094,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return idx;
}
- @SuppressWarnings("deprecation")
private int findEndOfColumnOutlineGroup(int colInfoIndex) {
CTCols cols = worksheet.getColsArray(0);
// Find the end of the group.
@@ -2129,7 +2116,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return idx;
}
- @SuppressWarnings("deprecation")
private void expandColumn(int columnIndex) {
CTCols cols = worksheet.getColsArray(0);
CTCol col = columnHelper.getColumn(columnIndex, false);
@@ -2184,7 +2170,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
Boolean.FALSE, Boolean.FALSE);
}
- @SuppressWarnings("deprecation")
private boolean isColumnGroupHiddenByParent(int idx) {
CTCols cols = worksheet.getColsArray(0);
// Look out outline details of end
@@ -2218,7 +2203,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return startHidden;
}
- @SuppressWarnings("deprecation")
private int findColInfoIdx(int columnValue, int fromColInfoIdx) {
CTCols cols = worksheet.getColsArray(0);
@@ -2258,7 +2242,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* @param idx
* @return a boolean represented if the column is collapsed
*/
- @SuppressWarnings("deprecation")
private boolean isColumnGroupCollapsed(int idx) {
CTCols cols = worksheet.getColsArray(0);
CTCol[] colArray = cols.getColArray();
@@ -2800,7 +2783,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* @param resetOriginalRowHeight whether to set the original row's height to the default
*/
@Override
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void shiftRows(int startRow, int endRow, final int n, boolean copyRowHeight, boolean resetOriginalRowHeight) {
XSSFVMLDrawing vml = getVMLDrawing(false);
@@ -3066,7 +3048,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* @param value <code>true</code> if this sheet is selected
*/
@Override
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void setSelected(boolean value) {
CTSheetViews views = getSheetTypeSheetViews();
for (CTSheetView view : views.getSheetViewArray()) {
@@ -3674,7 +3655,6 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return dataValidationHelper;
}
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public List<XSSFDataValidation> getDataValidations() {
List<XSSFDataValidation> xssfValidations = new ArrayList<XSSFDataValidation>();
CTDataValidations dataValidations = this.worksheet.getDataValidations();
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java
index d4d7401ec4..82eddd46d8 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSheetConditionalFormatting.java
@@ -182,7 +182,6 @@ public class XSSFSheetConditionalFormatting implements SheetConditionalFormattin
return rule;
}
- @SuppressWarnings("deprecation")
public int addConditionalFormatting(CellRangeAddress[] regions, ConditionalFormattingRule[] cfRules) {
if (regions == null) {
throw new IllegalArgumentException("regions must not be null");
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
index 8419de6e46..e71a336456 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFTable.java
@@ -129,7 +129,6 @@ public class XSSFTable extends POIXMLDocumentPart {
*
* @return the xpath of the table's root element
*/
- @SuppressWarnings("deprecation")
public String getCommonXpath() {
if (commonXPath == null) {
String[] commonTokens = {};
@@ -167,7 +166,6 @@ public class XSSFTable extends POIXMLDocumentPart {
}
- @SuppressWarnings("deprecation")
public List<XSSFXmlColumnPr> getXmlColumnPrs() {
if (xmlColumnPr==null) {
@@ -275,7 +273,6 @@ public class XSSFTable extends POIXMLDocumentPart {
* Headers <em>must</em> be in sync, otherwise Excel will display a
* "Found unreadable content" message on startup.
*/
- @SuppressWarnings("deprecation")
public void updateHeaders(){
XSSFSheet sheet = (XSSFSheet)getParent();
CellReference ref = getStartCellReference();
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 95bbff9e12..ae4fb23ed4 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
@@ -330,7 +330,6 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
}
@Override
- @SuppressWarnings("deprecation") // getXYZArray() array accessors are deprecated
protected void onDocumentRead() throws IOException {
try {
WorkbookDocument doc = WorkbookDocument.Factory.parse(getPackagePart().getInputStream(), DEFAULT_XML_OPTIONS);
@@ -1330,7 +1329,6 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
* 'Selected' sheet(s) is a distinct concept.
*/
@Override
- @SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void setActiveSheet(int index) {
validateSheetIndex(index);
@@ -1569,7 +1567,6 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
* @param pos the position that we want to insert the sheet into (0 based)
*/
@Override
- @SuppressWarnings("deprecation")
public void setSheetOrder(String sheetname, int pos) {
int idx = getSheetIndex(sheetname);
sheets.add(pos, sheets.remove(idx));
@@ -1632,7 +1629,6 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
}
}
- @SuppressWarnings("deprecation")
private void reprocessNamedRanges() {
namedRanges = new ArrayList<XSSFName>();
if(workbook.isSetDefinedNames()) {
@@ -1710,7 +1706,6 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook {
* @param excludeSheetIdx the sheet to exclude from the check or -1 to include all sheets in the check.
* @return true if the sheet contains the name, false otherwise.
*/
- @SuppressWarnings("deprecation") // getXYZArray() array accessors are deprecated
private boolean containsSheet(String name, int excludeSheetIdx) {
CTSheet[] ctSheetArray = workbook.getSheets().getSheetArray();
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
index 285ff014a9..1e51e5e3f7 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java
@@ -46,7 +46,6 @@ public class ColumnHelper {
cleanColumns();
}
- @SuppressWarnings("deprecation")
public void cleanColumns() {
TreeSet<CTCol> trackedCols = new TreeSet<CTCol>(CTColComparator.BY_MIN_MAX);
CTCols newCols = CTCols.Factory.newInstance();
@@ -154,7 +153,6 @@ public class ColumnHelper {
return new long[] { col.getMin(), col.getMax() };
}
- @SuppressWarnings("deprecation")
public static void sortColumns(CTCols newCols) {
CTCol[] colArray = newCols.getColArray();
Arrays.sort(colArray, CTColComparator.BY_MIN_MAX);
@@ -187,7 +185,6 @@ public class ColumnHelper {
// Fetching the array is quicker than working on the new style
// list, assuming we need to read many of them (which we often do),
// and assuming we're not making many changes (which we're not)
- @SuppressWarnings("deprecation")
CTCol[] colArray = cols.getColArray();
for (CTCol col : colArray) {
@@ -241,7 +238,6 @@ public class ColumnHelper {
return columnExists1Based(cols, index+1);
}
- @SuppressWarnings("deprecation")
private boolean columnExists1Based(CTCols cols, long index1) {
for (CTCol col : cols.getColArray()) {
if (col.getMin() == index1) {
@@ -313,7 +309,6 @@ public class ColumnHelper {
return -1;
}
- @SuppressWarnings("deprecation")
private boolean columnExists(CTCols cols, long min, long max) {
for (CTCol col : cols.getColArray()) {
if (col.getMin() == min && col.getMax() == max) {
@@ -323,7 +318,6 @@ public class ColumnHelper {
return false;
}
- @SuppressWarnings("deprecation")
public int getIndexOfColumn(CTCols cols, CTCol searchCol) {
int i = 0;
for (CTCol col : cols.getColArray()) {
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 aa8c9cbef7..80462ac4c8 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
@@ -126,6 +126,7 @@ public final class XSSFRowShifter {
/**
* Updated named ranges
*/
+ @SuppressWarnings("resource")
public void updateNamedRanges(FormulaShifter shifter) {
XSSFWorkbook wb = sheet.getWorkbook();
XSSFEvaluationWorkbook fpb = XSSFEvaluationWorkbook.create(wb);
@@ -145,6 +146,7 @@ public final class XSSFRowShifter {
/**
* Update formulas.
*/
+ @SuppressWarnings("resource")
public void updateFormulas(FormulaShifter shifter) {
//update formulas on the parent sheet
updateSheetFormulas(sheet, shifter);
@@ -211,6 +213,7 @@ public final class XSSFRowShifter {
* @return the shifted formula if the formula was changed,
* <code>null</code> if the formula wasn't modified
*/
+ @SuppressWarnings("resource")
private static String shiftFormula(XSSFRow row, String formula, FormulaShifter shifter) {
XSSFSheet sheet = row.getSheet();
XSSFWorkbook wb = sheet.getWorkbook();
@@ -231,7 +234,7 @@ public final class XSSFRowShifter {
}
}
- @SuppressWarnings("deprecation")
+ @SuppressWarnings("resource")
public void updateConditionalFormatting(FormulaShifter shifter) {
XSSFWorkbook wb = sheet.getWorkbook();
int sheetIndex = wb.getSheetIndex(sheet);
diff --git a/src/ooxml/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java b/src/ooxml/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java
index bf2b5e8f41..7b83560505 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/model/XWPFCommentsDecorator.java
@@ -33,7 +33,6 @@ public class XWPFCommentsDecorator extends XWPFParagraphDecorator {
this(nextDecorator.paragraph, nextDecorator);
}
- @SuppressWarnings("deprecation")
public XWPFCommentsDecorator(XWPFParagraph paragraph, XWPFParagraphDecorator nextDecorator) {
super(paragraph, nextDecorator);
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/AbstractXWPFSDT.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/AbstractXWPFSDT.java
index 0e275460a0..2cf42f1862 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/AbstractXWPFSDT.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/AbstractXWPFSDT.java
@@ -32,7 +32,6 @@ public abstract class AbstractXWPFSDT implements ISDTContents {
private final String tag;
private final IBody part;
- @SuppressWarnings("deprecation")
public AbstractXWPFSDT(CTSdtPr pr, IBody part) {
CTString[] aliases = pr.getAliasArray();
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFComment.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFComment.java
index 627971b344..5f7fa5d8df 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFComment.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFComment.java
@@ -29,7 +29,6 @@ public class XWPFComment {
protected String author;
protected StringBuffer text;
- @SuppressWarnings("deprecation")
public XWPFComment(CTComment comment, XWPFDocument document) {
text = new StringBuffer();
id = comment.getId().toString();
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
index b22af706ca..cdbada28ea 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFDocument.java
@@ -252,7 +252,6 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
}
}
- @SuppressWarnings("deprecation")
private void initFootnotes() throws XmlException, IOException {
for (POIXMLDocumentPart p : getRelations()) {
String relation = p.getPackageRelationship().getRelationshipType();
@@ -1212,7 +1211,6 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
* @param table
*/
@Override
- @SuppressWarnings("deprecation")
public void insertTable(int pos, XWPFTable table) {
bodyElements.add(pos, table);
int i = 0;
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java
index 2d0c8d6dd8..741bd4486c 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnote.java
@@ -124,7 +124,6 @@ public class XWPFFootnote implements Iterable<XWPFParagraph>, IBody {
* @param table
* @see org.apache.poi.xwpf.usermodel.IBody#insertTable(int pos, XWPFTable table)
*/
- @SuppressWarnings("deprecation")
public void insertTable(int pos, XWPFTable table) {
bodyElements.add(pos, table);
int i = 0;
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 c97ccd4507..1ecdc3d701 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFFootnotes.java
@@ -66,7 +66,6 @@ public class XWPFFootnotes extends POIXMLDocumentPart {
* Read document
*/
@Override
- @SuppressWarnings("deprecation")
protected void onDocumentRead() throws IOException {
FootnotesDocument notesDoc;
try {
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java
index b5d3a6ad18..f5460dbd9c 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFHeaderFooter.java
@@ -441,7 +441,6 @@ public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBo
* @param pos
* @param table
*/
- @SuppressWarnings("deprecation")
public void insertTable(int pos, XWPFTable table) {
bodyElements.add(pos, table);
int i = 0;
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java
index ab802ffbcf..bf9cafaec5 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFLatentStyles.java
@@ -42,7 +42,6 @@ public class XWPFLatentStyles {
/**
* checks whether specific LatentStyleID is a latentStyle
*/
- @SuppressWarnings("deprecation")
protected boolean isLatentStyle(String latentStyleID) {
for (CTLsdException lsd : latentStyles.getLsdExceptionArray()) {
if (lsd.getName().equals(latentStyleID)) {
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
index 7059df9e27..7b27e3aeb4 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFNumbering.java
@@ -69,7 +69,6 @@ public class XWPFNumbering extends POIXMLDocumentPart {
* read numbering form an existing package
*/
@Override
- @SuppressWarnings("deprecation")
protected void onDocumentRead() throws IOException {
NumberingDocument numberingDoc = null;
InputStream is;
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java
index 8e52c32a97..4f29318865 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java
@@ -1376,7 +1376,6 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
int beginRunPos = 0, candCharPos = 0;
boolean newList = false;
- @SuppressWarnings("deprecation")
CTR[] rArray = paragraph.getRArray();
for (int runPos = startRun; runPos < rArray.length; runPos++) {
int beginTextPos = 0, beginCharPos = 0, textPos = 0, charPos = 0;
@@ -1437,7 +1436,6 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para
*
* @param segment
*/
- @SuppressWarnings("deprecation")
public String getText(TextSegement segment) {
int runBegin = segment.getBeginRun();
int textBegin = segment.getBeginText();
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
index 99f63609e9..d0ee35a74c 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRun.java
@@ -94,7 +94,6 @@ public class XWPFRun implements ISDTContents, IRunElement, CharacterRun {
* @param r the CTR bean which holds the run attributes
* @param p the parent paragraph
*/
- @SuppressWarnings("deprecation")
public XWPFRun(CTR r, IRunBody p) {
this.run = r;
this.parent = p;
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java
index d9632926b2..afe0c0f45d 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFStyles.java
@@ -129,7 +129,6 @@ public class XWPFStyles extends POIXMLDocumentPart {
*
* @param styles
*/
- @SuppressWarnings("deprecation")
public void setStyles(CTStyles styles) {
ctStyles = styles;
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
index 1f4fd2b384..7c9bb397f9 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTable.java
@@ -92,7 +92,6 @@ public class XWPFTable implements IBodyElement, ISDTContents {
}
}
- @SuppressWarnings("deprecation")
public XWPFTable(CTTbl table, IBody part) {
this.part = part;
this.ctTbl = table;
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 adc04c26e7..13cc7f3b76 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
@@ -396,7 +396,6 @@ public class XWPFTableCell implements IBody, ICell {
*
* @see org.apache.poi.xwpf.usermodel.IBody#insertTable(int, org.apache.poi.xwpf.usermodel.XWPFTable)
*/
- @SuppressWarnings("deprecation")
public void insertTable(int pos, XWPFTable table) {
bodyElements.add(pos, table);
int i = 0;
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java
index 5a947efc7a..2ec97ec298 100644
--- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java
+++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableRow.java
@@ -156,7 +156,6 @@ public class XWPFTableRow {
*
* @return a list of {@link XWPFTableCell}
*/
- @SuppressWarnings("deprecation")
public List<XWPFTableCell> getTableCells() {
if (tableCells == null) {
List<XWPFTableCell> cells = new ArrayList<XWPFTableCell>();