Bug 53750

Summary: TestCompiler saves unnecessary entries in pairing collection
Product: JMeter Reporter: Sebb <sebb>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Sebb 2012-08-21 01:12:36 UTC
The TestCompiler pairing collection is only used to decide whether to call the method ObjectPair.addTestElements().

Now that method contains the following code:

public void addTestElements() {
    if (parent instanceof Controller && (child instanceof Sampler || child instanceof Controller)) {
        parent.addTestElement(child);
    }
}

i.e. for some combinations of child and parent, it does nothing. There is therefore no reason even to store such entries in the pairing set; such entries just waste space.

The fix is to check the condition before checking the pairing set.
Comment 1 Sebb 2012-08-21 01:17:30 UTC
URL: http://svn.apache.org/viewvc?rev=1375362&view=rev
Log:
TestCompiler saves unnecessary entries in pairing collection
Bugzilla Id: 53750

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/threads/TestCompiler.java
    jmeter/trunk/xdocs/changes.xml