Skip to content

Commit 4ef3de2

Browse files
committed
fix: MAX_TOKEN_BYTES -> MAX_TOKEN_LENGTH
1 parent 2b47c86 commit 4ef3de2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/sdk/server-ai/src/main/java/com/launchdarkly/sdk/server/ai/internal/ResumptionTokens.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* This class is an internal implementation detail and is not part of the supported API.
1515
*/
1616
final class ResumptionTokens {
17-
private static final int MAX_TOKEN_BYTES = 4096;
17+
private static final int MAX_TOKEN_LENGTH = 4096;
1818
private static final Base64.Encoder ENCODER = Base64.getUrlEncoder().withoutPadding();
1919
private static final Base64.Decoder DECODER = Base64.getUrlDecoder();
2020

@@ -61,8 +61,8 @@ static Decoded decode(String token) {
6161
if (token == null) {
6262
throw new IllegalArgumentException("Resumption token must not be null");
6363
}
64-
if (token.length() > MAX_TOKEN_BYTES) {
65-
throw new IllegalArgumentException("Resumption token exceeds maximum length of " + MAX_TOKEN_BYTES + " bytes");
64+
if (token.length() > MAX_TOKEN_LENGTH) {
65+
throw new IllegalArgumentException("Resumption token exceeds maximum length of " + MAX_TOKEN_LENGTH + " characters");
6666
}
6767

6868
String json;

0 commit comments

Comments
 (0)