You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Lukas Eder (JIRA)" <ji...@apache.org> on 2013/03/13 10:10:12 UTC
[jira] [Updated] (SLING-2785) ResourceMetadata.entrySet() and
related methods cause stack overflow when locked
[ https://issues.apache.org/jira/browse/SLING-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukas Eder updated SLING-2785:
------------------------------
Attachment: ResourceMetadata.java.patch
Patch containing fix to correct double-checked locking when initialising lockedEntrySet et al.
> ResourceMetadata.entrySet() and related methods cause stack overflow when locked
> --------------------------------------------------------------------------------
>
> Key: SLING-2785
> URL: https://issues.apache.org/jira/browse/SLING-2785
> Project: Sling
> Issue Type: Bug
> Components: API
> Affects Versions: API 2.3.0, Resource Resolver 1.0.4
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
> Fix For: API 2.4.0, Resource Resolver 1.1.0
>
> Attachments: ResourceMetadata.java.patch
>
>
> Code like below causes an infinite loop (maybe depending on JVM/java libs):
> @Override
> public Set<java.util.Map.Entry<String, Object>> entrySet() {
> if ( this.isReadOnly ) {
> return this.getUnmodifiableMap().entrySet();
> }
> return super.entrySet();
> }
> I'll add tests and suggest a fix.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira