[ 
https://issues.apache.org/jira/browse/OFBIZ-8858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16848233#comment-16848233
 ] 

Mathieu Lirzin commented on OFBIZ-8858:
---------------------------------------

I would recommend rewriting the following imperative code
{code:groovy}
Map serviceCtx = [:]
serviceCtx.orderId = 'DEMO10090'
serviceCtx.returnId = '1009'
serviceCtx.userLogin = 
EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 
'system').cache().queryOne()
{code}
in a more declarative way with map literals
{code:groovy}
Map serviceCtx = [
    orderId: 'DEMO10090',
    returnId: '1009',
    userLogin: 
EntityQuery.use(delegator).from('UserLogin').where('userLoginId',  
'system').cache().queryOne()
]
{code}

Thanks

> Unit test case for service - CreateReturnAndItemOrAdjustment
> ------------------------------------------------------------
>
>                 Key: OFBIZ-8858
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-8858
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: order
>    Affects Versions: Trunk
>            Reporter: Avnindra Sharma
>            Assignee: Suraj Khurana
>            Priority: Minor
>             Fix For: Upcoming Branch
>
>         Attachments: OFBIZ-8858.patch, OFBIZ-8858.patch
>
>
> Unit test case for service - CreateReturnAndItemOrAdjustment



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to