-
Notifications
You must be signed in to change notification settings - Fork 535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved: EntityUtil getProperty Methods dont use entity (OFBIZ-12815) #635
base: trunk
Are you sure you want to change the base?
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 |
@@ -123,6 +123,117 @@ public static String getPropertyValueFromDelegatorName(String resource, String n | |||
} | |||
} | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.