This is an automated email from the ASF dual-hosted git repository.
fschumacher 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 c7f309f Guard against null values
c7f309f is described below
commit c7f309f48486176423af43f357b4e56aaba87ed4
Author: Felix Schumacher <[email protected]>
AuthorDate: Sun Dec 6 17:49:33 2020 +0100
Guard against null values
---
src/core/src/main/java/org/apache/jmeter/gui/util/JSyntaxTextArea.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/src/core/src/main/java/org/apache/jmeter/gui/util/JSyntaxTextArea.java
b/src/core/src/main/java/org/apache/jmeter/gui/util/JSyntaxTextArea.java
index 61e01ad..6cf9d28 100644
--- a/src/core/src/main/java/org/apache/jmeter/gui/util/JSyntaxTextArea.java
+++ b/src/core/src/main/java/org/apache/jmeter/gui/util/JSyntaxTextArea.java
@@ -28,6 +28,7 @@ import java.util.Properties;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
+import org.apache.commons.lang3.StringUtils;
import org.apache.jmeter.gui.action.LookAndFeelCommand;
import org.apache.jmeter.util.JMeterUtils;
import org.apache.jorphan.gui.JFactory;
@@ -289,7 +290,7 @@ public class JSyntaxTextArea extends RSyntaxTextArea {
* The initial text to be set
*/
public void setInitialText(String string) {
- setText(string);
+ setText(StringUtils.defaultString(string, ""));
discardAllEdits();
}