fix some deprecation warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1833218 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-06-08 23:15:46 +00:00
parent 3245d7c809
commit e908117b0b
2 changed files with 5 additions and 5 deletions

View File

@ -569,7 +569,7 @@ public class POIXMLProperties {
*/ */
protected int nextPid() { protected int nextPid() {
int propid = 1; int propid = 1;
for(CTProperty p : props.getProperties().getPropertyArray()){ for(CTProperty p : props.getProperties().getPropertyList()) {
if(p.getPid() > propid) propid = p.getPid(); if(p.getPid() > propid) propid = p.getPid();
} }
return propid + 1; return propid + 1;
@ -582,7 +582,7 @@ public class POIXMLProperties {
* @return whether a property with the given name exists in the custom properties * @return whether a property with the given name exists in the custom properties
*/ */
public boolean contains(String name) { public boolean contains(String name) {
for(CTProperty p : props.getProperties().getPropertyArray()){ for(CTProperty p : props.getProperties().getPropertyList()) {
if(p.getName().equals(name)) return true; if(p.getName().equals(name)) return true;
} }
return false; return false;
@ -600,7 +600,7 @@ public class POIXMLProperties {
* @return the custom property with this name, or null if none exists * @return the custom property with this name, or null if none exists
*/ */
public CTProperty getProperty(String name) { public CTProperty getProperty(String name) {
for(CTProperty p : props.getProperties().getPropertyArray()){ for(CTProperty p : props.getProperties().getPropertyList()) {
if(p.getName().equals(name)) { if(p.getName().equals(name)) {
return p; return p;
} }

View File

@ -84,7 +84,7 @@ public class POIXMLPropertiesTextExtractor extends POIXMLTextExtractor {
text.append(thing); text.append(thing);
text.append(" = "); text.append(" = ");
text.append(value); 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 org.openxmlformats.schemas.officeDocument.x2006.customProperties.CTProperties
props = document.getProperties().getCustomProperties().getUnderlyingProperties(); props = document.getProperties().getCustomProperties().getUnderlyingProperties();
for (CTProperty property : props.getPropertyArray()) { for (CTProperty property : props.getPropertyList()) {
String val = "(not implemented!)"; String val = "(not implemented!)";
if (property.isSetLpwstr()) { if (property.isSetLpwstr()) {