From a16e88c2e5d2e5fa741e6011eb9ebcee0a79e5b9 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 8be86f0995..91006b1459 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 0a13a62d57..10adc71c82 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; -- 2.39.5