From 4765c77d9279fba8b884a6ef3cbdd6a5b865a916 Mon Sep 17 00:00:00 2001 From: Dietrich Travkin Date: Mon, 24 Jul 2023 16:44:18 +0200 Subject: [PATCH] Simplify code a little --- src/net/sourceforge/plantuml/svek/SvekNode.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/net/sourceforge/plantuml/svek/SvekNode.java b/src/net/sourceforge/plantuml/svek/SvekNode.java index 097813da9..649f272e5 100644 --- a/src/net/sourceforge/plantuml/svek/SvekNode.java +++ b/src/net/sourceforge/plantuml/svek/SvekNode.java @@ -223,7 +223,7 @@ public class SvekNode implements Positionable, Hideable { private Margins shield() { if (shield == null) { this.shield = image.getShield(stringBounder); - if (shield.isZero() == false && type != ShapeType.RECTANGLE && type != ShapeType.RECTANGLE_HTML_FOR_PORTS + if (!shield.isZero() && type != ShapeType.RECTANGLE && type != ShapeType.RECTANGLE_HTML_FOR_PORTS && type != ShapeType.RECTANGLE_WITH_CIRCLE_INSIDE) throw new IllegalStateException(); } @@ -383,7 +383,7 @@ public class SvekNode implements Positionable, Hideable { public boolean isShielded() { if (this.shield != null) { - return this.shield.isZero() == false; + return !this.shield.isZero(); } // Avoid calculating "shield" size through this.shield() before finishing creation of all SvekLines (#1467)