Good catch... now for bonus points find the many other places I've
coded the same error ;-)

I'll apply this.

Cheers,

On 27/06/07, Brady Johnson <[EMAIL PROTECTED]> wrote:
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
wsdlDefinition[wsdlNamespace] which will insert an entry in the map. If
the map was previously empty, this could cause problems. In this case V
is a pointer, but if it were'nt you could run into other problems as
well.

I would like to suggest that Composite::findWSDLDefinition() is changed
to use the method map::find() instead of map::operator[].

I created a JIRA for this and included a patch.

https://issues.apache.org/jira/browse/TUSCANY-1386

Thanks

--------------------
Brady Johnson
Lead Software Developer - HydraSCA
Rogue Wave Software - [EMAIL PROTECTED]




--
Pete

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

Reply via email to