1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-12-22 02:49:06 +00:00

Simplify code a little

This commit is contained in:
Dietrich Travkin 2023-07-24 16:44:18 +02:00
parent 659b723dd3
commit 4765c77d92

View File

@ -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)