Revision: 15766
http://jikesrvm.svn.sourceforge.net/jikesrvm/?rev=15766&view=revAuthor: dgrove-oss
Date: 2009-08-12 18:36:49 +0000 (Wed, 12 Aug 2009)
Log Message:
-----------
Defensive programming. If the output element of a test_case_execution is
missing, don't try to denormalize it.
Modified Paths:
--------------
cattrack/trunk/app/services/test_run_builder.rb
Modified: cattrack/trunk/app/services/test_run_builder.rb
===================================================================
--- cattrack/trunk/app/services/test_run_builder.rb 2009-08-11 14:38:29 UTC (rev 15765)
+++ cattrack/trunk/app/services/test_run_builder.rb 2009-08-12 18:36:49 UTC (rev 15766)
@@ -160,7 +160,12 @@
test_case_execution.time = xml.elements['duration'].text.to_i
test_case_execution.result = xml.elements['result'].text
test_case_execution.result_explanation = xml.elements['result-explanation'].text || ""
- test_case_execution.output = REXML::Text.unnormalize(xml.elements['output'].text) || ""
+ test_output = xml.elements['output'].text;
+ if (test_output != nil)
+ test_case_execution.output = REXML::Text.unnormalize(test_output)
+ else
+ test_case_execution.output = ""
+ end
xml.elements.each("statistics/statistic") do |p_xml|
v = p_xml.attributes['value']
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
http://p.sf.net/sfu/bobj-july_______________________________________________
Jikesrvm-commits mailing list
Jikesrvm-commits@...
https://lists.sourceforge.net/lists/listinfo/jikesrvm-commits