Skip to content

Commit dc43176

Browse files
Update google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/GoogleCredentialsTest.java
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent ce2b4fa commit dc43176

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

google-auth-library-java/oauth2_http/javatests/com/google/auth/oauth2/GoogleCredentialsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void fromStream_invalidJson_throws() throws IOException {
128128
// malformed payload structures immediately. This test ensures Java maintains parity by
129129
// successfully throwing an IOException when ADC JSON parsing fails, preventing silent fallbacks.
130130
MockHttpTransportFactory transportFactory = new MockHttpTransportFactory();
131-
try (InputStream stream = new ByteArrayInputStream("invalid-json{".getBytes())) {
131+
try (InputStream stream = new ByteArrayInputStream("invalid-json{".getBytes(java.nio.charset.StandardCharsets.UTF_8))) {
132132
assertThrows(
133133
IOException.class, () -> GoogleCredentials.fromStream(stream, transportFactory));
134134
}

0 commit comments

Comments
 (0)