Added duplicate property name check, just in case

This commit is contained in:
D3v1s0m 2023-07-10 19:02:06 +05:30
parent 29c3c4b22b
commit 0596f59304
No known key found for this signature in database
GPG Key ID: 3B6EC35367B8D82E

@ -265,6 +265,8 @@ public class EntityPropertyRegistryImpl implements EntityPropertyRegistry {
} }
private <T> void register(EntityPropertyImpl<?> property) { private <T> void register(EntityPropertyImpl<?> property) {
if (byName.containsKey(property.getName()))
throw new IllegalArgumentException("Duplicate property name: " + property.getName());
byName.put(property.getName(), property); byName.put(property.getName(), property);
} }