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 e7292cc Catch (BadLocation)Exception on setting text
e7292cc is described below
commit e7292ccfb985ffe11fb0bafeb9447fa4cf2d0308
Author: Felix Schumacher <[email protected]>
AuthorDate: Tue Aug 17 12:46:41 2021 +0200
Catch (BadLocation)Exception on setting text
This exception is not expected here, but reported in bug 65494.
Let us catch it and see, if the problem described in that bug vanishes.
Instead of ignoring silently all other exceptions except
BadLocationException,
log all exception.
Bugzilla Id: 65494
---
.../src/main/java/org/apache/jmeter/gui/util/JSyntaxTextArea.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
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 12436cb..da2ab82 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
@@ -27,7 +27,6 @@ import java.util.Properties;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
-import javax.swing.text.BadLocationException;
import org.apache.commons.lang3.StringUtils;
import org.apache.jmeter.gui.action.LookAndFeelCommand;
@@ -294,9 +293,7 @@ public class JSyntaxTextArea extends RSyntaxTextArea {
try {
setText(StringUtils.defaultString(string, ""));
} catch (Exception e) {
- if (e instanceof BadLocationException) {
- log.error("Dubious problem while setting text to {}", string,
e);
- }
+ log.error("Dubious problem while setting text to {}", string, e);
}
discardAllEdits();
}