Improved: EntityUtil getProperty Methods dont use entity (OFBIZ-12815)#635
Conversation
The getProperty methods in EntityUtilProperties don't use entity at all. All of the getProperty methods simply lead to UtilProperties and therefore no configure during runtime is possible. New methods have been written so the entity usage is now functional.
|
Kudos, SonarCloud Quality Gate passed! |
|
This sounds good to me. Should we not deprecate the previous |
|
Hey Jacques, I will provide another commit in which i adjust the switch statement mentioned by Gil and also deprecate the previous ones. |
|
Hi @thahn27, I checked the usage in Java and Groovy code of the previous methods I talked about above. Most of them are not used at all OOTB. It could be that OFBiz users are using them more. But it's really easy to replace them by UtilProperties ones or the new EntityUtilProperties ones. So maybe we could remove them all together OOTB. And replace those used by calls to the new ones you introduce. I'll start a discussion on dev ML about that. |
|
I send an email to dev ML 1 hour ago but it does not appear yet. I wonder why, but let's wait |
| } | ||
|
|
||
| public static <T> Object getPropertyValue(String resource, String name, Object defaultValue, Delegator delegator, Class<T> clazz) { | ||
| Map<String, String> propMap = getSystemPropertyValue(resource, name, delegator); |
There was a problem hiding this comment.
Can we use ObjectType.simpleTypeConvert method ?








The getProperty methods in EntityUtilProperties don't use entity at all. All of the getProperty methods simply lead to UtilProperties and therefore no configure during runtime is possible.
Improved: New methods have been written so the entity usage is now functional.