Bug 55548

Summary: Tidy up use of TestElement.ENABLED; use TestElement.isEnabled()/setEnabled() throughout
Product: JMeter Reporter: Sebb <sebb>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: minor    
Priority: P2    
Version: 2.9   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   

Description Sebb 2013-09-11 18:01:32 UTC
public void setEnabled(boolean enabled) was added to AbstractTestElement (for use by ProxyControl); it should also be added to the interface TestElement.

Then it can be used elsewhere.

There are also various uses of code like:

if (component.getProperty(TestElement.ENABLED) instanceof NullProperty
 || component.getPropertyAsBoolean(TestElement.ENABLED)) {
}

This is exactly what AbstractTestElement.isEnabled() does, so the code could be simplifed to:

if (component.isEnabled()) {
}
Comment 1 Sebb 2013-09-11 18:19:54 UTC
URL: http://svn.apache.org/r1521971
Log:
Tidy up use of TestElement.ENABLED; use TestElement.isEnabled()/setEnabled() throughout
Bugzilla Id: 55548

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeModel.java
    jmeter/trunk/src/core/org/apache/jmeter/gui/tree/JMeterTreeNode.java
    jmeter/trunk/src/core/org/apache/jmeter/testelement/AbstractTestElement.java
    jmeter/trunk/src/core/org/apache/jmeter/testelement/TestElement.java
    jmeter/trunk/src/reports/org/apache/jmeter/report/gui/tree/ReportTreeModel.java
    jmeter/trunk/src/reports/org/apache/jmeter/report/gui/tree/ReportTreeNode.java
    jmeter/trunk/xdocs/changes.xml