Removed unecessary variable (PMD)

This commit is contained in:
Erik C. Thauvin 2019-04-27 02:56:17 -07:00
parent 063e23358b
commit e785fd6852

View file

@ -173,10 +173,10 @@ public final class Utils {
* @return <code>true</code> if the string is valid, <code>false</code> otherwise. * @return <code>true</code> if the string is valid, <code>false</code> otherwise.
*/ */
public static boolean isValidString(final CharSequence s) { public static boolean isValidString(final CharSequence s) {
final int len; if (s == null || s.length() == 0) {
if (s == null || (len = s.length()) == 0) {
return false; return false;
} }
final int len = s.length();
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
if (!Character.isWhitespace(s.charAt(i))) { if (!Character.isWhitespace(s.charAt(i))) {
return true; return true;