From 4e7f420bf811245c5120a81f9841e3c5f116c706 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 17 Apr 2021 16:39:40 +0200 Subject: [PATCH] Fix LinkageUtils Fix Linked --- .../src/de/steamwar/bausystem/linkage/LinkageUtils.java | 4 ++-- BauSystem_Main/src/de/steamwar/bausystem/linkage/Linked.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/linkage/LinkageUtils.java b/BauSystem_Main/src/de/steamwar/bausystem/linkage/LinkageUtils.java index bea77705..31e4ecac 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/linkage/LinkageUtils.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/linkage/LinkageUtils.java @@ -59,14 +59,14 @@ public class LinkageUtils { Set linkageTypeSet = new HashSet<>(); for (Linked linked : linkages) { if (linked == null) { - return; + continue; } LinkageType linkageType = linked.value(); if (linkageType.getLinkagePredicate().test(clazz)) { linkageTypeSet.add(linked.value()); } } - + if (linkageTypeSet.isEmpty()) { return; } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/linkage/Linked.java b/BauSystem_Main/src/de/steamwar/bausystem/linkage/Linked.java index 8206e9d7..d3ea12b5 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/linkage/Linked.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/linkage/Linked.java @@ -24,13 +24,13 @@ import org.atteo.classindex.IndexAnnotated; import java.lang.annotation.*; @IndexAnnotated -@Retention(RetentionPolicy.CLASS) +@Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) @Repeatable(Linked.Linkages.class) public @interface Linked { LinkageType value(); - @Retention(RetentionPolicy.CLASS) + @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) @interface Linkages { Linked[] value() default {};