From 6c9cb47125b312e1c2f0efae6b58c1be17d4ae4d Mon Sep 17 00:00:00 2001 From: Marcus Da Coregio Date: Fri, 29 Sep 2023 13:52:04 -0300 Subject: [PATCH] Fix code style --- .../security/crypto/argon2/Argon2EncodingUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crypto/src/main/java/org/springframework/security/crypto/argon2/Argon2EncodingUtils.java b/crypto/src/main/java/org/springframework/security/crypto/argon2/Argon2EncodingUtils.java index 22276316ae..4b27d90318 100644 --- a/crypto/src/main/java/org/springframework/security/crypto/argon2/Argon2EncodingUtils.java +++ b/crypto/src/main/java/org/springframework/security/crypto/argon2/Argon2EncodingUtils.java @@ -58,12 +58,13 @@ final class Argon2EncodingUtils { */ static String encode(byte[] hash, Argon2Parameters parameters) throws IllegalArgumentException { StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.append(switch (parameters.getType()) { + String type = switch (parameters.getType()) { case Argon2Parameters.ARGON2_d -> "$argon2d"; case Argon2Parameters.ARGON2_i -> "$argon2i"; case Argon2Parameters.ARGON2_id -> "$argon2id"; default -> throw new IllegalArgumentException("Invalid algorithm type: " + parameters.getType()); - }); + }; + stringBuilder.append(type); stringBuilder.append("$v=") .append(parameters.getVersion()) .append("$m=")