From 630bdd0f151e9f95fe9831371777c50f3bc102dc Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Thu, 10 Mar 2016 00:32:33 +0000 Subject: [PATCH] sonar fixes git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734339 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hslf/usermodel/HSLFFreeformShape.java | 4 +--- .../org/apache/poi/hslf/usermodel/HSLFSimpleShape.java | 9 +++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java index 8be86f099..91006b145 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFreeformShape.java @@ -283,10 +283,8 @@ public final class HSLFFreeformShape extends HSLFAutoShape implements FreeformSh Iterator vertIter = verticesProp.iterator(); Iterator segIter = segmentsProp.iterator(); - byte segPushBack[] = null; while (vertIter.hasNext() && segIter.hasNext()) { - byte[] segElem = (segPushBack != null) ? segPushBack : segIter.next(); - segPushBack = null; + byte[] segElem = segIter.next(); PathInfo pi = getPathInfo(segElem); switch (pi) { case escape: { diff --git a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java index 0a13a62d5..10adc71c8 100644 --- a/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java +++ b/src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSimpleShape.java @@ -310,12 +310,13 @@ public abstract class HSLFSimpleShape extends HSLFShape implements SimpleShape"; + } logger.log(POILogger.WARN, "No preset shape definition for shapeType: "+name); - return null; } return geom;