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) {