Repository navigation
[board] Add setMaxKeyLength init config option - #325
Draft
arifBurakDemiray wants to merge 1 commit into
Draft
arifBurakDemiray wants to merge 1 commit into
arifBurakDemiray wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dependency security scanScanned 25 resolved dependencies, failing on HIGH and above. Result: passed |
Code coverage
Files changed by this pull request
Least covered classes (10 shown)
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Board card: C-121, Bring R15 SDK limit: max key length to the Java SDK (part 4 of 4 of C-117)
Reference: https://github.com/Countly/countly-sdk-android (
ConfigSdkInternalLimits.setMaxKeyLength)Why
Android, iOS, React Native and Flutter let the developer set a key length limit at init. The Java SDK on
stagingalready applies a key length limit everywhere the reference does (custom event keys, view names, segmentation keys, custom user property keys and modifier keys), but only when the SDK behavior settings sendlkl. A developer has no way to set it.What changed
Config.setMaxKeyLength(int): new init config method, chainable like the otherConfigsetters. Values below 1 are refused with an error log and the previous value stays, as the other range-checked setters inConfigdo.InternalConfig.getMaxKeyLength()andModuleConfiguration.seedFromDeveloperConfigfeed the developer value in as the fallback oflkl. So the settings override it while they carrylkl, and it applies again once they stop, the same precedence as every other setting.ConfigSurfaceTests(chain, range check, default),ModuleConfigurationLimitsTests(developer limit cuts keys on the wire,lkloverrides it, removal brings it back; and without any settings it cuts event, view and user property keys).XX.XX.XX.For a person to decide
Configsetters and thelklvalidation. Say if it should clamp instead.Not verified