You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2019/10/13 13:13:32 UTC
[jmeter] branch master updated: AbstractJMeterGuiComponent: Fix NPE
in Nimbus LAF and add comment as per Vladimir comment
This is an automated email from the ASF dual-hosted git repository.
pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new 560b5ca AbstractJMeterGuiComponent: Fix NPE in Nimbus LAF and add comment as per Vladimir comment
560b5ca is described below
commit 560b5cab8dec47f4c4b41fe3a1bd2fe7aae72d19
Author: pmouawad <p....@ubik-ingenierie.com>
AuthorDate: Sun Oct 13 15:13:17 2019 +0200
AbstractJMeterGuiComponent: Fix NPE in Nimbus LAF and add comment as per
Vladimir comment
---
.../main/java/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/core/src/main/java/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java b/src/core/src/main/java/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
index 22416cc..4c2b95d 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/AbstractJMeterGuiComponent.java
@@ -139,7 +139,11 @@ public abstract class AbstractJMeterGuiComponent extends JPanel implements JMete
*/
@Override
public String getName() {
- return namePanel.getName(); // $NON-NLS-1$
+ if (getNamePanel() != null) { // Check is mandatory because some LAFs (Nimbus) call getName() from
+ // super constructor (so can happen before namePanel field is initialized
+ return getNamePanel().getName();
+ }
+ return ""; // $NON-NLS-1$
}
/**