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

This commit is contained in:
Paint_Ninja authored and GitHub committed 2024-12-06 18:18:53 +00:00
1 parent a894c244fe
commit 07977ba242
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();