From a3f13737e4031628b5f29ddc43250dbbc233f13e Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Sun, 15 Jan 2023 20:46:11 +0100 Subject: [PATCH] Add Copyright --- src/de/steamwar/sql/NodeMember.java | 2 +- src/de/steamwar/sql/SchematicNode.java | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/de/steamwar/sql/NodeMember.java b/src/de/steamwar/sql/NodeMember.java index 19417da..a952028 100644 --- a/src/de/steamwar/sql/NodeMember.java +++ b/src/de/steamwar/sql/NodeMember.java @@ -85,7 +85,7 @@ public class NodeMember { } public void setParentId(Integer parentId) { - this.parentId = Optional.ofNullable(parentId).orElse(0) == 0 ? null : parentId; + this.parentId = parentId == null || parentId == 0 ? null : parentId; updateParent.update(this.parentId, nodeId, userId); } } diff --git a/src/de/steamwar/sql/SchematicNode.java b/src/de/steamwar/sql/SchematicNode.java index 594b20a..9142154 100644 --- a/src/de/steamwar/sql/SchematicNode.java +++ b/src/de/steamwar/sql/SchematicNode.java @@ -24,8 +24,6 @@ import lombok.AccessLevel; import lombok.Getter; import lombok.Setter; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; import java.sql.Timestamp; import java.time.Instant; import java.util.*; @@ -38,7 +36,7 @@ public class SchematicNode { new SqlTypeMapper<>(SchematicNode.class, null, (rs, identifier) -> { throw new SecurityException("SchematicNode cannot be used as type (recursive select)"); }, (st, index, value) -> st.setInt(index, value.nodeId)); } - protected static final Map>> TAB_CACHE = new HashMap<>(); + private static final Map>> TAB_CACHE = new HashMap<>(); public static void clear() { TAB_CACHE.clear(); }