[
https://issues.apache.org/jira/browse/JCRVLT-670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17647077#comment-17647077
]
Julian Reschke commented on JCRVLT-670:
---------------------------------------
[~kwin] - so the main use is over here
<https://github.com/apache/jackrabbit-filevault/blob/882e526fe3e78d2efbb618fb8d67ad09abfd5140/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/impl/AggregateManagerImpl.java#L337>.
This uses a ReferenceMap with weak key references (so it can't be directly
replaced by a WeakHashMap). The purpose seems to be to avoid duplicated string
objects in memory; it's called from AggregateImpl caching (1) relative path
names and (2) namespace prefixes.
Do we expect relative names other than "jcr:content" to be repetitive? (If no,
we could just intern that single string).
FWIW, replacing "cacheString" by a NOP does not cause any test failures (not
that I expected it would).
In general, it seems weird to have this code here - if it's really needed, it
would better be used much more.
> Upgrade to commons-collections4
> -------------------------------
>
> Key: JCRVLT-670
> URL: https://issues.apache.org/jira/browse/JCRVLT-670
> Project: Jackrabbit FileVault
> Issue Type: Task
> Reporter: Julian Reschke
> Assignee: Julian Reschke
> Priority: Minor
>
> Some code uses the EOLd commons-collections, based on a leaking transitive
> dependency from Jackrabbit code.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)