Author: fanningpj
Date: Mon Jul 30 01:45:29 2018
New Revision: 1837012

URL: http://svn.apache.org/viewvc?rev=1837012&view=rev
Log:
add null guard in XSSFComment

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=1837012&r1=1837011&r2=1837012&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 Mon 
Jul 30 01:45:29 2018
@@ -109,7 +109,7 @@ public class XSSFComment implements Comm
     @Override
     public boolean isVisible() {
         boolean visible = false;
-        if(_vmlShape != null){
+        if(_vmlShape != null) {
             String style = _vmlShape.getStyle();
             visible = style != null && style.contains("visibility:visible");
         }
@@ -217,6 +217,9 @@ public class XSSFComment implements Comm
 
     @Override
     public ClientAnchor getClientAnchor() {
+        if(_vmlShape == null) {
+            return null;
+        }
         String position = _vmlShape.getClientDataArray(0).getAnchorArray(0);
         int[] pos = new int[8];
         int i = 0;



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

Reply via email to