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

Co-authored-by: Paint_Ninja <PaintNinja@users.noreply.github.com>
This commit is contained in:
JonathingandPaint_Ninja authored and GitHub committed 2024-12-23 18:56:46 -08:00
1 parent 12682da09a
commit 442f4723c8
3 files changed
+45 -9

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();