You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/07/07 02:19:02 UTC

svn commit: r1751742 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFComment.java

Author: onealj
Date: Thu Jul  7 02:19:02 2016
New Revision: 1751742

URL: http://svn.apache.org/viewvc?rev=1751742&view=rev
Log:
bug 50795: move hack to avoid xmlbeans corrupt pointer to its own function

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFComment.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFComment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFComment.java?rev=1751742&r1=1751741&r2=1751742&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFComment.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFComment.java Thu Jul  7 02:19:02 2016
@@ -60,10 +60,7 @@ public class XSSFComment implements Comm
             clientData.setRowArray(0, new BigInteger(String.valueOf(ref.getRow())));
             clientData.setColumnArray(0, new BigInteger(String.valueOf(ref.getCol())));
             
-            // There is a very odd xmlbeans bug when changing the row
-            //  arrays which can lead to corrupt pointer
-            // This call seems to fix them again... See bug #50795
-            vmlShape.getClientDataList().toString();
+            avoidXmlbeansCorruptPointer(vmlShape);
         }
     }
 
@@ -156,10 +153,7 @@ public class XSSFComment implements Comm
             clientData.setRowArray(0, new BigInteger(String.valueOf(address.getRow())));
             clientData.setColumnArray(0, new BigInteger(String.valueOf(address.getColumn())));
            
-           // There is a very odd xmlbeans bug when changing the column
-           //  arrays which can lead to corrupt pointer
-           // This call seems to fix them again... See bug #50795
-           _vmlShape.getClientDataList().toString();
+            avoidXmlbeansCorruptPointer(_vmlShape);
         }
     }
 
@@ -254,4 +248,11 @@ public class XSSFComment implements Comm
     public int hashCode() {
         return ((getRow()*17) + getColumn())*31;
     }
+
+    private static void avoidXmlbeansCorruptPointer(CTShape vmlShape) {
+        // There is a very odd xmlbeans bug when changing the row
+        //  arrays which can lead to corrupt pointer
+        // This call seems to fix them again... See bug #50795
+        vmlShape.getClientDataList().toString();
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org