diff options
author | PJ Fanning <fanningpj@apache.org> | 2018-06-08 23:15:46 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2018-06-08 23:15:46 +0000 |
commit | cf86510355b681cbb62432f9a3fb3ed5841793fb (patch) | |
tree | 1092e540850d9216c925b847fad0ec2e8b775ff3 | |
parent | 299808fba3c6f332637c7f431739a8378d353ce2 (diff) | |
download | poi-cf86510355b681cbb62432f9a3fb3ed5841793fb.tar.gz poi-cf86510355b681cbb62432f9a3fb3ed5841793fb.zip |
fix some deprecation warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1833218 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java | 6 | ||||
-rw-r--r-- | src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java b/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java index 04ca65fb21..06c9eec129 100644 --- a/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java +++ b/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java @@ -569,7 +569,7 @@ public class POIXMLProperties { */ protected int nextPid() { int propid = 1; - for(CTProperty p : props.getProperties().getPropertyArray()){ + for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getPid() > propid) propid = p.getPid(); } return propid + 1; @@ -582,7 +582,7 @@ public class POIXMLProperties { * @return whether a property with the given name exists in the custom properties */ public boolean contains(String name) { - for(CTProperty p : props.getProperties().getPropertyArray()){ + for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getName().equals(name)) return true; } return false; @@ -600,7 +600,7 @@ public class POIXMLProperties { * @return the custom property with this name, or null if none exists */ public CTProperty getProperty(String name) { - for(CTProperty p : props.getProperties().getPropertyArray()){ + for(CTProperty p : props.getProperties().getPropertyList()) { if(p.getName().equals(name)) { return p; } diff --git a/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java b/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java index 47c37e84b4..80e875b14b 100644 --- a/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java +++ b/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java @@ -84,7 +84,7 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor { text.append(thing); text.append(" = "); text.append(value); - text.append("\n"); + text.append('\n'); } /** @@ -178,7 +178,7 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor { org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperties props = document.getProperties().getCustomProperties().getUnderlyingProperties(); - for (CTProperty property : props.getPropertyArray()) { + for (CTProperty property : props.getPropertyList()) { String val = "(not implemented!)"; if (property.isSetLpwstr()) { |