fix(core): make Metadata keys consistently case-insensitive by anuq · Pull Request #1827 · apache/stormcrawler
Normalize all keys to lowercase (Locale.ROOT) on every read and write operation via a private normalizeKey() helper. Previously, getValues() and containsKey() had a case-insensitive fallback but addValue(), setValue(), setValues(), addValues(), and remove() stored keys with their original casing, causing inconsistent behavior. Fixes apache#1588 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sitive lookup After making all keys lowercase via normalizeKey(), keySet(prefix) was still doing a case-sensitive startsWith() match, causing lookups with uppercase prefixes (e.g. IMAGE., NEWS.) to return empty sets. Fixes SiteMapParserBoltTest failures for extension attribute assertions.
…key lookup - Replace testCaseInsensitiveKeys with four single-method tests: testGetFirstValueIsCaseInsensitive, testContainsKeyIsCaseInsensitive, testAddValueIsCaseInsensitive, testRemoveIsCaseInsensitive - Fix testAddValueIsCaseInsensitive size assertion (1, not 2 — same normalized key) - Fix checkListKeyFromOpensearch: look up "somekey" (lowercase) since normalizeKey() lowercases all keys before storing in OpenSearch Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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