diff --git a/build-logic/jvm/src/main/kotlin/build-logic.errorprone.gradle.kts b/build-logic/jvm/src/main/kotlin/build-logic.errorprone.gradle.kts index dd9f5002..d087dc34 100644 --- a/build-logic/jvm/src/main/kotlin/build-logic.errorprone.gradle.kts +++ b/build-logic/jvm/src/main/kotlin/build-logic.errorprone.gradle.kts @@ -8,7 +8,7 @@ if (!project.hasProperty("skipErrorprone")) { apply(plugin = "net.ltgt.errorprone") dependencies { - "errorprone"("com.google.errorprone:error_prone_core:2.22.0") + "errorprone"("com.google.errorprone:error_prone_core:2.23.0") "annotationProcessor"("com.google.guava:guava-beta-checker:1.0") } diff --git a/sigstore-java/src/main/java/dev/sigstore/json/canonicalizer/JsonCanonicalizer.java b/sigstore-java/src/main/java/dev/sigstore/json/canonicalizer/JsonCanonicalizer.java index fc11541f..1a4cf66a 100644 --- a/sigstore-java/src/main/java/dev/sigstore/json/canonicalizer/JsonCanonicalizer.java +++ b/sigstore-java/src/main/java/dev/sigstore/json/canonicalizer/JsonCanonicalizer.java @@ -17,6 +17,7 @@ package dev.sigstore.json.canonicalizer; import java.io.IOException; +import java.nio.charset.StandardCharsets; import java.util.Map; import java.util.TreeMap; import java.util.Vector; @@ -37,7 +38,7 @@ public JsonCanonicalizer(String jsonData) throws IOException { } public JsonCanonicalizer(byte[] jsonData) throws IOException { - this(new String(jsonData, "utf-8")); + this(new String(jsonData, StandardCharsets.UTF_8)); } private void escape(char c) { @@ -137,7 +138,7 @@ public String getEncodedString() { } public byte[] getEncodedUTF8() throws IOException { - return getEncodedString().getBytes("utf-8"); + return getEncodedString().getBytes(StandardCharsets.UTF_8); } }