From aea23c7627c1eb8363163c44811a0ee35b180fb8 Mon Sep 17 00:00:00 2001 From: Philip Z Date: Mon, 20 Jul 2026 18:16:37 +0800 Subject: [PATCH] fix: revert reflection fallback for EntityDescriptor Signed-off-by: Philip Z --- .../main/java/io/teaql/core/meta/EntityDescriptor.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/teaql-core/src/main/java/io/teaql/core/meta/EntityDescriptor.java b/teaql-core/src/main/java/io/teaql/core/meta/EntityDescriptor.java index 0f596ebc..a315b547 100644 --- a/teaql-core/src/main/java/io/teaql/core/meta/EntityDescriptor.java +++ b/teaql-core/src/main/java/io/teaql/core/meta/EntityDescriptor.java @@ -150,14 +150,7 @@ public EntityDescriptor withEntitySupplier(Supplier entitySupp public Entity createEntity() { if (entitySupplier == null) { - if (targetType != null) { - try { - return targetType.getDeclaredConstructor().newInstance(); - } catch (Exception e) { - throw new IllegalStateException("No entity supplier registered for " + getType() + " and failed to instantiate " + targetType.getName() + " via reflection", e); - } - } - throw new IllegalStateException("No entity supplier registered for " + getType() + " and targetType is null"); + throw new IllegalStateException("No entity supplier registered for " + getType()); } return entitySupplier.get(); }