NamePanel ctor calls overrideable method

Bugzilla Id: 60775


git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1784488 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2017-02-26 22:25:17 +00:00
parent 598db03a8b
commit fab2bf06c8
2 changed files with 9 additions and 2 deletions

View File

@ -34,6 +34,8 @@ import org.apache.jmeter.util.JMeterUtils;
public class NamePanel extends JPanel implements JMeterGUIComponent {
private static final long serialVersionUID = 240L;
private static final String LABEL_RESOURCE = "root"; // $NON-NLS-1$
/** A text field containing the name. */
private final JTextField nameField = new JTextField(15);
@ -42,7 +44,7 @@ public class NamePanel extends JPanel implements JMeterGUIComponent {
* Create a new NamePanel with the default name.
*/
public NamePanel() {
setName(getStaticLabel());
_setName(JMeterUtils.getResString(LABEL_RESOURCE));
init();
}
@ -81,6 +83,10 @@ public class NamePanel extends JPanel implements JMeterGUIComponent {
/** {@inheritDoc} */
@Override
public void setName(String name) {
_setName(name);
}
private void _setName(String name) {
super.setName(name);
nameField.setText(name);
}
@ -106,7 +112,7 @@ public class NamePanel extends JPanel implements JMeterGUIComponent {
/** {@inheritDoc} */
@Override
public String getLabelResource() {
return "root"; // $NON-NLS-1$
return LABEL_RESOURCE;
}
/** {@inheritDoc} */

View File

@ -288,6 +288,7 @@ JMeter now requires Java 8. Ensure you use most up to date version.
<h3>General</h3>
<ul>
<li><bug>60775</bug>NamePanel ctor calls overrideable method</li>
<li><bug>60428</bug>JMeter Graphite Backend Listener throws exception when test ends
and <code>useRegexpForSamplersList</code> is set to <code>true</code>.
Based on patch by Liu XP (liu_xp2003 at sina.com)</li>