jackrabbit-oak-issues mailing list archives

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

             Summary: 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
             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