kali834x opened a new pull request, #1144: URL: https://github.com/apache/poi/pull/1144
Entry names are normalized and lowercased before being stored in the zipEntries map: name = IOUtils.normalizePath(name).toLowerCase(Locale.ROOT); However, getEntry() performs its initial lookup using a non-lowercased key: final ZipArchiveEntry ze = zipEntries.get(normalizedPath); As a result, lookups for mixed-case paths may miss the direct map lookup and fall back to a linear case-insensitive scan of all entries, degrading lookup performance from O(1) to O(N). Solution Apply the same normalization strategy during lookup: return zipEntries.get(normalizedPath.toLowerCase(Locale.ROOT)); This makes lookup behavior consistent with key storage, restores O(1) retrieval, and removes the need for the fallback linear scan. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
