sonar fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1734339 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1b9523898d
commit
630bdd0f15
@ -283,10 +283,8 @@ public final class HSLFFreeformShape extends HSLFAutoShape implements FreeformSh
|
|||||||
Iterator<byte[]> vertIter = verticesProp.iterator();
|
Iterator<byte[]> vertIter = verticesProp.iterator();
|
||||||
Iterator<byte[]> segIter = segmentsProp.iterator();
|
Iterator<byte[]> segIter = segmentsProp.iterator();
|
||||||
|
|
||||||
byte segPushBack[] = null;
|
|
||||||
while (vertIter.hasNext() && segIter.hasNext()) {
|
while (vertIter.hasNext() && segIter.hasNext()) {
|
||||||
byte[] segElem = (segPushBack != null) ? segPushBack : segIter.next();
|
byte[] segElem = segIter.next();
|
||||||
segPushBack = null;
|
|
||||||
PathInfo pi = getPathInfo(segElem);
|
PathInfo pi = getPathInfo(segElem);
|
||||||
switch (pi) {
|
switch (pi) {
|
||||||
case escape: {
|
case escape: {
|
||||||
|
@ -310,12 +310,13 @@ public abstract class HSLFSimpleShape extends HSLFShape implements SimpleShape<H
|
|||||||
public CustomGeometry getGeometry() {
|
public CustomGeometry getGeometry() {
|
||||||
PresetGeometries dict = PresetGeometries.getInstance();
|
PresetGeometries dict = PresetGeometries.getInstance();
|
||||||
ShapeType st = getShapeType();
|
ShapeType st = getShapeType();
|
||||||
String name = st.getOoxmlName();
|
String name = (st != null) ? st.getOoxmlName() : null;
|
||||||
CustomGeometry geom = dict.get(name);
|
CustomGeometry geom = dict.get(name);
|
||||||
if (geom == null) {
|
if (geom == null) {
|
||||||
if (name == null && st != null) name = st.toString();
|
if (name == null) {
|
||||||
|
name = (st != null) ? st.toString() : "<unknown>";
|
||||||
|
}
|
||||||
logger.log(POILogger.WARN, "No preset shape definition for shapeType: "+name);
|
logger.log(POILogger.WARN, "No preset shape definition for shapeType: "+name);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return geom;
|
return geom;
|
||||||
|
Loading…
Reference in New Issue
Block a user