Author: fanningpj
Date: Fri Jun  8 23:15:46 2018
New Revision: 1833218

URL: http://svn.apache.org/viewvc?rev=1833218&view=rev
Log:
fix some deprecation warnings

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java
    
poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java?rev=1833218&r1=1833217&r2=1833218&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java 
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/ooxml/POIXMLProperties.java Fri Jun 
 8 23:15:46 2018
@@ -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;
                 }

Modified: 
poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java?rev=1833218&r1=1833217&r2=1833218&view=diff
==============================================================================
--- 
poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java
 (original)
+++ 
poi/trunk/src/ooxml/java/org/apache/poi/ooxml/extractor/POIXMLPropertiesTextExtractor.java
 Fri Jun  8 23:15:46 2018
@@ -84,7 +84,7 @@ public class POIXMLPropertiesTextExtract
         text.append(thing);
         text.append(" = ");
         text.append(value);
-        text.append("\n");
+        text.append('\n');
     }
 
     /**
@@ -178,7 +178,7 @@ public class POIXMLPropertiesTextExtract
         
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()) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to