[
https://issues.apache.org/jira/browse/SLING-6071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15526525#comment-15526525
]
ASF GitHub Bot commented on SLING-6071:
---------------------------------------
GitHub user Buuhuu opened a pull request:
https://github.com/apache/sling/pull/175
SLING-6071
- returned value of valueCache instead of the one from cache
- added unti test for the remove method
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Buuhuu/sling bugfix/SLING-6071(2)
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/sling/pull/175.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #175
----
commit 9cdb8538c22af469b80aecc0076367cc71d91045
Author: Dirk Rudolph <[email protected]>
Date: 2016-09-27T15:40:19Z
SLING-6071:
- returned value of valueCache instead of the one from cache
- added unti test for the remove method
----
> JcrModifiableValueMap#remove(key) breaks Map<String, Object> contract
> ---------------------------------------------------------------------
>
> Key: SLING-6071
> URL: https://issues.apache.org/jira/browse/SLING-6071
> Project: Sling
> Issue Type: Bug
> Affects Versions: JCR Resource 2.7.4
> Reporter: Dirk Rudolph
>
> From the contract of Map<String, Object>
> {quote}
> Returns the value to which this map previously associated the key, or null if
> the map contained no mapping for the key.
> {quote}
> https://docs.oracle.com/javase/8/docs/api/java/util/Map.html#remove-java.lang.Object-
> So my expectation is that I get the value object stored in the value map, but
> the implementation returns an instance of JcrPropertyMapCacheEntry.
> Instead of returning this object the value from the internal valueCache
> should be returned.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)