mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 03:38:33 +08:00
PL-6242 Stack overflow exception is possible when we generate message about unfetched attribute.
#PL-6242
This commit is contained in:
parent
d9a53c41da
commit
af48258ef6
@ -41,6 +41,8 @@ public class CubaEntityFetchGroup extends EntityFetchGroup {
|
|||||||
if (attributeName == null && entity._persistence_getSession() != null) { // occurs on merge
|
if (attributeName == null && entity._persistence_getSession() != null) { // occurs on merge
|
||||||
return super.onUnfetchedAttribute(entity, null);
|
return super.onUnfetchedAttribute(entity, null);
|
||||||
}
|
}
|
||||||
throw new IllegalEntityStateException(ExceptionLocalization.buildMessage("cannot_get_unfetched_attribute", new Object[]{entity, attributeName}));
|
|
||||||
|
String entityDescriptor = entity.getClass().getName() + "-" + ((BaseGenericIdEntity) entity).getId();
|
||||||
|
throw new IllegalEntityStateException(ExceptionLocalization.buildMessage("cannot_get_unfetched_attribute", new Object[]{entityDescriptor, attributeName}));
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user