[ 
https://issues.apache.org/jira/browse/TUSCANY-1386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brady Johnson updated TUSCANY-1386:
-----------------------------------

    Attachment: Composite_cpp_jira1386

Attaching fix that uses map::find() instead of map::operator[]

> TuscanySCA C++: The usage of the std::map operator[] in 
> Composite::findWSDLDefinition() could cause problems
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-1386
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1386
>             Project: Tuscany
>          Issue Type: Improvement
>          Components: C++ SCA
>    Affects Versions: Cpp-M3
>         Environment: All platforms
>            Reporter: Brady Johnson
>             Fix For: Cpp-Next
>
>         Attachments: Composite_cpp_jira1386
>
>
> The std::map<K,V>::operator[] will insert a blank object of type V if the key 
> is not found in the map.
> The method Composite::findWSDLDefinition() simply returns 
> wsdlDefinitions[wsdlNamespace]
> which will insert an entry in the map. This could cause problems if the map 
> was previously empty.
> This could also cause problems if type V is not a pointer, which it is in 
> this case.
> --------------------
> Brady Johnson
> Lead Software Developer - HydraSCA
> Rogue Wave Software - [EMAIL PROTECTED]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to