You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Alex Deparvu (JIRA)" <ji...@apache.org> on 2019/06/26 11:46:00 UTC
[jira] [Commented] (OAK-8442) AbstractCredentials.setAttributes
sychronizes the wrong map
[ https://issues.apache.org/jira/browse/OAK-8442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16873249#comment-16873249 ]
Alex Deparvu commented on OAK-8442:
-----------------------------------
very good find! +1
> AbstractCredentials.setAttributes sychronizes the wrong map
> -----------------------------------------------------------
>
> Key: OAK-8442
> URL: https://issues.apache.org/jira/browse/OAK-8442
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: security-spi
> Reporter: angela
> Assignee: angela
> Priority: Major
> Fix For: 1.16.0
>
>
> [~stillalex], it seems to me that {{AbstractCredentials.setAttributes}} synchronizes the wrong attributes map:
> {code}
> public void setAttributes(@NotNull Map<String,Object> attributes) {
> synchronized (attributes) {
> this.attributes.putAll(attributes);
> }
> }
> {code}
> if you agree, i would change it to
> {code}
> public void setAttributes(@NotNull Map<String,Object> attributes) {
> synchronized (this.attributes) {
> this.attributes.putAll(attributes);
> }
> }
> {code}
> wdyt?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)