jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Deparvu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-8442) AbstractCredentials.setAttributes sychronizes the wrong map
Date Wed, 26 Jun 2019 11:46:00 GMT

    [ 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)

Mime
View raw message