On Mon, May 21, 2012 at 2:20 PM, Joel Wright
<[email protected]>wrote:


> The patch is undoubtedly not the best method for adding the functionality
> I was after (I feel embarrassed even sending a patch that catches and
> ignores exceptions), but given the structure of the code it was certainly
> the lightest-touch I could come up with.
>

Thanks for your patch. Unfortunately the code still needs a bit of work.

You should not eat any exception from the reference service. This could
hide lots of different errors, such as it being a binary,
and inadvertently make a slightly different REST call that the user did not
expect.


Rather, to see if an input is provided, you should check if the "inputs"
map has the inputName key, and just do a continue if not. (or iterate over
the inputs map, and check if it is an expected activity input).



This would need a good set of unit tests so that we can verify that this
works as intended, and only where intended.  Tests should cover edge-cases
like http://example.com/?a=1&b=/fred/{soup}&c=3 and
http://example.com/?{soup}={value}


As the old behaviour was failure on any missing parameter, I don't think
this patch will be breaking any backward comparability.


-- 
Stian Soiland-Reyes, myGrid team
School of Computer Science
The University of Manchester
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
taverna-hackers mailing list
[email protected]
Web site: http://www.taverna.org.uk
Mailing lists: http://www.taverna.org.uk/about/contact-us/
Developers Guide: http://www.taverna.org.uk/developers/

Reply via email to