garydgregory commented on code in PR #217: URL: https://github.com/apache/commons-validator/pull/217#discussion_r1590936802
########## src/main/java/org/apache/commons/validator/routines/checkdigit/ModulusCheckDigit.java: ########## @@ -185,6 +185,16 @@ protected int toInt(final char character, final int leftPos, final int rightPos) throw new CheckDigitException("Invalid Character[" + leftPos + "] = '" + character + "'"); } + /** + * A convenient method to check empty Strings. + * + * @param code The code to check + * @return {@code true} if code is null or empty, otherwise {@code false} + */ + protected boolean isEmpty(final String code) { + return code == null || code.isEmpty(); Review Comment: Oops, I realized yesterday we already have this: `org.apache.commons.validator.GenericValidator.isBlankOrNull(String)` so replace call sites to this with calls to `isBlankOrNull()`. Sorry about that! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org