aboutsummaryrefslogtreecommitdiff
path: root/java_src/src/main/java/com/google/crypto/tink/jwt/JwtFormat.java
diff options
context:
space:
mode:
authortholenst <tholenst@google.com>2022-12-19 08:50:37 -0800
committerCopybara-Service <copybara-worker@google.com>2022-12-19 08:51:42 -0800
commit2082766d24412355ea5c3685765175e93ed4f86e (patch)
tree527c450cc5c0324afe1b2c7f441849023248fbba /java_src/src/main/java/com/google/crypto/tink/jwt/JwtFormat.java
parentafc68c5ee086da93c885bbe3184057cfa9d6946c (diff)
downloadtink-2082766d24412355ea5c3685765175e93ed4f86e.tar.gz
Make JwtNames.validate and JwtFormat.validateAlgorithm return void.
The return value is never used. PiperOrigin-RevId: 496410893
Diffstat (limited to 'java_src/src/main/java/com/google/crypto/tink/jwt/JwtFormat.java')
-rw-r--r--java_src/src/main/java/com/google/crypto/tink/jwt/JwtFormat.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/java_src/src/main/java/com/google/crypto/tink/jwt/JwtFormat.java b/java_src/src/main/java/com/google/crypto/tink/jwt/JwtFormat.java
index 727310b01..95ad7588e 100644
--- a/java_src/src/main/java/com/google/crypto/tink/jwt/JwtFormat.java
+++ b/java_src/src/main/java/com/google/crypto/tink/jwt/JwtFormat.java
@@ -79,7 +79,7 @@ final class JwtFormat {
}
}
- private static String validateAlgorithm(String algo) throws InvalidAlgorithmParameterException {
+ private static void validateAlgorithm(String algo) throws InvalidAlgorithmParameterException {
switch (algo) {
case "HS256":
case "HS384":
@@ -93,7 +93,7 @@ final class JwtFormat {
case "PS256":
case "PS384":
case "PS512":
- return algo;
+ return;
default:
throw new InvalidAlgorithmParameterException("invalid algorithm: " + algo);
}