Bug 55548 - Tidy up use of TestElement.ENABLED; use TestElement.isEnabled()/setEnabled() throughout
Tidy up use of TestElement.ENABLED; use TestElement.isEnabled()/setEnabled() ...
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.9
PC Windows XP
: P2 minor (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2013-09-11 18:01 UTC by Sebb
Modified: 2013-09-11 18:19 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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