-
-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use charset string to support Android 16 #2111
Conversation
…arlier Android versions
@@ -16,7 +15,7 @@ | |||
@ApiStatus.Experimental | |||
public final class Baggage { | |||
|
|||
static final @NotNull String CHARSET = StandardCharsets.UTF_8.toString(); | |||
static final @NotNull String CHARSET = "UTF-8"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static final @NotNull String CHARSET = "UTF-8"; | |
private static final Charset UTF_8 = Charset.forName("UTF-8"); |
Just because that's how we use it everywhere, so we keep the pattern.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't because of
Usage of API documented as @ since 10+
when using your suggestion it uses another method here:
URLDecoder.decode(value, UTF_8)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine, our SDK is 14+ (10 years old)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is about JDK version, not Android version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a comment but otherwise LGTM
📜 Description
Use charset string directly as StandardCharsets is not available on earlier Android versions
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
🔮 Next steps