From 1cf192a7f081c03f6b752180de4132832e496144 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Mon, 2 Sep 2024 16:12:54 +0200 Subject: [PATCH] refactoring --- .../hsadminng/hs/hosting/asset/HsHostingAsset.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/hosting/asset/HsHostingAsset.java b/src/main/java/net/hostsharing/hsadminng/hs/hosting/asset/HsHostingAsset.java index abe56085..52e884e1 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/hosting/asset/HsHostingAsset.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/hosting/asset/HsHostingAsset.java @@ -89,9 +89,10 @@ public abstract class HsHostingAsset implements Stringifyable, BaseEntity subHostingAssets; + private List subHostingAssets = new ArrayList<>(); @Column(name = "identifier") private String identifier; // e.g. vm1234, xyz00, example.org, xyz00_abc @@ -116,13 +117,6 @@ public abstract class HsHostingAsset implements Stringifyable, BaseEntity getSubHostingAssets() { - if (subHostingAssets == null) { - subHostingAssets = new ArrayList<>(); - } - return subHostingAssets; - } - public PatchableMapWrapper getConfig() { return PatchableMapWrapper.of(configWrapper, (newWrapper) -> {configWrapper = newWrapper;}, config); }