Deprecate @ObjectHolder, add a couple of fast-paths (#10232)

Co-authored-by: Paint_Ninja <[email protected]>
This commit is contained in:
JonathingandPaint_Ninja authored and GitHub committed 2024-12-23 12:51:51 -08:00
1 parent 597409e2f2
commit 52f41a4448
3 files changed
+39 -3

No files matched your search

@@ -89,6 +89,9 @@ public class ObjectHolderRegistry
.filter(a -> OBJECT_HOLDER.equals(a.annotationType()) || MOD.equals(a.annotationType()))
.toList();
if (annotations.stream().noneMatch(a -> OBJECT_HOLDER.equals(a.annotationType())))
return; // No object holders found, skip the rest of the processing
Map<Type, String> classModIds = Maps.newHashMap();
Map<Type, Class<?>> classCache = Maps.newHashMap();