You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by Jeremy Arnold <je...@bigfoot.com> on 2003/03/05 21:59:31 UTC

[PATCH] Removal of extra SampleResult fields

Hello,
    Sorry for taking so long to get this patch ready -- things have been 
busy lately.

    As we discussed a couple weeks ago, this patch will remove unused 
fields from SampleResult.  It also uses lazy instantiation for some of 
the remaining fields so that extra memory won't be used when the fields 
aren't actually used.  The accessors for these fields now return null 
where they used to return an empty collection -- I found two places in 
the JMeter code that could not handle this, and have fixed those two 
places.  (Although the code changes were based on current CVS, the 
analysis to find the callers of these methods was done a couple weeks 
ago on an older snapshot of the code, so if you made any recent changes 
involving calls to SampleResult.getSubResults or getAssertions recently 
you might want to double-check that code to ensure it can handle a null 
return value.)

    I've done a bit of testing on this code and it appears to work fine, 
but I don't have any test plans which use Assertions or SubResults, so I 
haven't tested cases where these are actually instantiated.  The code is 
pretty straight-forward so there shouldn't be any problems, but you 
never know.

    As always, let me know if you have any questions.

    [Hopefully this is the right way to do a patch over multiple files 
-- let me know if I need to do something differently in the future.]

Jeremy

Jeremy Arnold
jeremy_a@bigfoot.com
http://xirr.com/~jeremy_a