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