Skip to content

Commit e1f3d53

Browse files
glasstigerclaude
andcommitted
Fix Java 8 build: replace String.repeat in test
OidcDeviceAuthTest called String.repeat(int) at two sites, a Java 11 API. The client has a Java 8 floor (the JDK 8 CI job compiles, tests, and releases the artifact), so the JDK 8 build failed to compile while the JDK 25 smoke job passed and hid the break. Replace both calls with the existing TestUtils.repeat(CharSequence, int) Java 8 stand-in, which is already imported in the test and used by other client tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent a4875f2 commit e1f3d53

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

core/src/test/java/io/questdb/client/test/cutlass/auth/OidcDeviceAuthTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ public void testChallengeStripsSupplementaryPlaneFormatChars() throws Exception
441441
public void testChunkedTokenResponseParses() throws Exception {
442442
assertMemoryLeak(() -> {
443443
// real IdPs use Transfer-Encoding: chunked; a multi-KB id token split across chunks must parse
444-
String idToken = "a".repeat(3000);
444+
String idToken = TestUtils.repeat("a", 3000);
445445
MockOidcServer.Handler handler = (method, path, body) -> {
446446
if (DEVICE_PATH.equals(path)) {
447447
return MockOidcServer.chunkedJson(200, deviceAuthorizationJson(1, 300));
@@ -1877,7 +1877,7 @@ public void testLargeSplitTokenValueParsesWithConfiguredLexerSizing() throws Exc
18771877
// such a split value still parses. This mirrors OidcDeviceAuth's production sizing
18781878
// (JSON_LEXER_CACHE_SIZE / JSON_LEXER_MAX_VALUE_BYTES); the original (1024, 1024) sizing
18791879
// rejected a >1024-byte split value with "String is too long".
1880-
String json = "{\"id_token\":\"" + "a".repeat(4000) + "\"}";
1880+
String json = "{\"id_token\":\"" + TestUtils.repeat("a", 4000) + "\"}";
18811881
int len = json.length();
18821882
int split = "{\"id_token\":\"".length() + 1300; // boundary inside the value, past the old 1024 limit
18831883
long address = TestUtils.toMemory(json);

0 commit comments

Comments
 (0)