add null check

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1868317 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2019-10-12 07:19:42 +00:00
parent a564c52311
commit 1f6a3c99ae
2 changed files with 2 additions and 2 deletions

View File

@ -472,7 +472,7 @@ public abstract class XSLFShape implements Shape<XSLFShape,XSLFTextParagraph> {
@Override
public FlipMode getFlipMode() {
CTTileInfoProperties tile = blipFill.getTile();
switch (tile == null ? STTileFlipMode.INT_NONE : tile.getFlip().intValue()) {
switch (tile == null || tile.getFlip() == null ? STTileFlipMode.INT_NONE : tile.getFlip().intValue()) {
default:
case STTileFlipMode.INT_NONE:
return FlipMode.NONE;

View File

@ -308,7 +308,7 @@ public final class TestPOIXMLProperties {
}
private static String zeroPad(long i) {
if (i >= 0 && i <=9) {
if (i >= 0 && i <= 9) {
return "0" + i;
} else {
return String.valueOf(i);