From 57a9a5c14b1bdac50fdf737c63c880a5fb9e106a Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Sun, 17 Jan 2021 09:15:16 -0500 Subject: [PATCH] Use isEmpty(). --- .../java/org/apache/commons/math4/complex/ComplexFormat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/commons/math4/complex/ComplexFormat.java b/src/main/java/org/apache/commons/math4/complex/ComplexFormat.java index 34fc5069d..85ab925a6 100644 --- a/src/main/java/org/apache/commons/math4/complex/ComplexFormat.java +++ b/src/main/java/org/apache/commons/math4/complex/ComplexFormat.java @@ -146,7 +146,7 @@ public class ComplexFormat { if (imaginaryCharacter == null) { throw new NullArgumentException(); } - if (imaginaryCharacter.length() == 0) { + if (imaginaryCharacter.isEmpty()) { throw new NoDataException(); } if (imaginaryFormat == null) {