Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363919 - Should issue validation error when passing value type to reference inout/out parameters for service call invokation
Summary: Should issue validation error when passing value type to reference inout/out ...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-16 10:02 EST by Jing Qian CLA
Modified: 2017-02-23 14:15 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jing Qian CLA 2011-11-16 10:02:15 EST
The service function is defined as
function timestamp_inoutparm (p timestamp inout)
    p = "2005/02/15-12:35:11";
end

But when calling the service the parameter type is timestamp("yyyyMMddHHmmss")
 timestamp1 timestamp("yyyyMMddHHmmss") = "19990101010101";        
 call getPrimitiveService().timestamp_inoutParm(timestamp1) returning to
verifyTimestamp_inoutParm onException handleServiceException;

If you try such case in a handler by direct function call, it may produce
compile error. Sample code:
    function start()
        timestamp1 timestamp("yyyyMMddHHmmss") = "19990101010101";
        timestamp_inoutparm(timestamp1);
    end

    function timestamp_inoutparm (p timestamp inout)
           p = "2005/02/15-12:35:11";
      end


If it is invalid, we need to have validation for services invocation as well
Comment 1 Lisa Lasher CLA 2011-11-16 16:28:11 EST
Paul, this is still a candidate to fix this week, if the fix is safe.  be sure to run eunit before committing.
Comment 2 Paul Harmon CLA 2011-11-18 16:54:19 EST
This validation was done in RBD already, but when the call service code was refactored in EDT, the call to the function argument validatoin was commented out. I have fixed this with changes to the following classes:

DefaultBinder
FunctionArgumentValidator
ServicesActionStatementValidator
Comment 3 Jing Qian CLA 2011-11-21 13:39:40 EST
verified with 201111202101's build