Resolve checkstyle warnings

This commit is contained in:
AlexProgrammerDE 2022-11-19 09:48:45 +01:00
parent 6cf68a5c5e
commit b4f0051890
2 changed files with 7 additions and 3 deletions

View File

@ -80,7 +80,11 @@ public enum MessageKey {
/** The chosen password isn't safe, please choose another one... */
PASSWORD_UNSAFE_ERROR("password.unsafe_password"),
/** Your chosen password is not secure. It has been seen %pwned_count times before! Please use a stronger password... */
/**
* Your chosen password is not secure.
* It has been seen %pwned_count times before!
* Please use a stronger password...
*/
PASSWORD_PWNED_ERROR("password.pwned_password", "%pwned_count"),
/** Your password contains illegal characters. Allowed chars: %valid_chars */

View File

@ -27,7 +27,6 @@ import javax.inject.Inject;
import java.io.DataInputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
@ -258,8 +257,9 @@ public class ValidationService implements Reloadable {
StringBuilder outStr = new StringBuilder();
try (DataInputStream input = new DataInputStream(connection.getInputStream())) {
for (int c = input.read(); c != -1; c = input.read())
for (int c = input.read(); c != -1; c = input.read()) {
outStr.append((char) c);
}
}
String[] hashes = outStr.toString().split("\n");