Skip to content
Permalink
Browse files
Use isEmpty instead of comparing length to zero
  • Loading branch information
FSchumacher committed Mar 5, 2022
1 parent 9c16f2f commit 197b727ffced485376e3f2812b97281390d15f9f
Showing 1 changed file with 2 additions and 2 deletions.
@@ -100,8 +100,8 @@ public void actionPerformed(ActionEvent e) {
* @param textToParse
*/
private void executeAndShowRegexpTester(String textToParse) {
if (textToParse != null && textToParse.length() > 0
&& this.regexpField.getText().length() > 0) {
if (textToParse != null && !textToParse.isEmpty()
&& !this.regexpField.getText().isEmpty()) {
this.regexpResultField.setText(process(textToParse));
this.regexpResultField.setCaretPosition(0); // go to first line
}

0 comments on commit 197b727

Please sign in to comment.