]> source.dussan.org Git - poi.git/commitdiff
fix findbugs warning BC_VACUOUS_INSTANCEOF from bug 55075
authorJaven O'Neal <onealj@apache.org>
Sun, 9 Oct 2016 12:15:39 +0000 (12:15 +0000)
committerJaven O'Neal <onealj@apache.org>
Sun, 9 Oct 2016 12:15:39 +0000 (12:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1763965 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFPicture.java

index 13fd4315e1ec692e89d6c48db3ee9a9c43344cd5..631d0e356ac51dc56e08cd1515429b604141bfc1 100644 (file)
@@ -98,7 +98,7 @@ public final class SXSSFPicture implements Picture {
      */
     @Override
     public void resize(double scale){
-        XSSFClientAnchor anchor = getAnchor();
+        XSSFClientAnchor anchor = getClientAnchor();
 
         XSSFClientAnchor pref = getPreferredSize(scale);
 
@@ -131,7 +131,7 @@ public final class SXSSFPicture implements Picture {
      * @return XSSFClientAnchor with the preferred size for this image
      */
     public XSSFClientAnchor getPreferredSize(double scale){
-        XSSFClientAnchor anchor = getAnchor();
+        XSSFClientAnchor anchor = getClientAnchor();
 
         XSSFPictureData data = getPictureData();
         Dimension size = getImageDimension(data.getPackagePart(), data.getPictureType());
@@ -236,8 +236,8 @@ public final class SXSSFPicture implements Picture {
         return (XSSFSheet)_picture.getDrawing().getParent();
     }
 
-    private XSSFClientAnchor getAnchor() {
-        return (XSSFClientAnchor)_picture.getAnchor();
+    private XSSFAnchor getAnchor() {
+        return _picture.getAnchor();
     }
 
     @Override