You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "gilPts (via GitHub)" <gi...@apache.org> on 2023/02/08 12:41:00 UTC
[GitHub] [ofbiz-framework] gilPts commented on a diff in pull request #517: Codenarc integration
gilPts commented on code in PR #517:
URL: https://github.com/apache/ofbiz-framework/pull/517#discussion_r1100075028
##########
framework/webtools/groovyScripts/service/JobDetails.groovy:
##########
@@ -22,15 +22,15 @@ import org.apache.ofbiz.entity.GenericValue
import org.apache.ofbiz.base.util.UtilGenerics
import org.apache.ofbiz.entity.serialize.XmlSerializer
-GenericValue job = ((Delegator)delegator).findOne("JobSandbox", [jobId:parameters.jobId], false)
+GenericValue job = ((Delegator) delegator).findOne('JobSandbox', [jobId: parameters.jobId], false)
context.job = job
if (job) {
- GenericValue runtimeData = job.getRelatedOne("RuntimeData", false)
+ GenericValue runtimeData = job.getRelatedOne('RuntimeData', false)
if (runtimeData) {
- runtimeInfoMap = UtilGenerics.checkMap(XmlSerializer.deserialize(runtimeData.getString("runtimeInfo"), delegator), String.class, Object.class)
+ runtimeInfoMap = UtilGenerics.checkMap(XmlSerializer.deserialize(runtimeData.getString('runtimeInfo'), delegator), String, Object)
Review Comment:
Hello UnnecessaryDotClass is a rule from codenarc, applying that the .class suffix is not needed in Groovy
https://groovy-lang.org/style-guide.html#_classes_as_first_class_citizens
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@ofbiz.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org