[
https://issues.apache.org/jira/browse/SLING-6016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15448829#comment-15448829
]
Stefan Seifert commented on SLING-6016:
---------------------------------------
Completed: At revision: 1758370
i've added unit tests, but two tests fail (set to inored currently): what
should happen if the configuration resoruce or content resource does not exist?
following the semantics of the adaptTo() method it should return null.
currently it throws an error complaining that the given class is not an
annotation class.
i'm wondering if this feature really should go into the ConfigurationBuilder
API, or whether it is not more a low-level function which should be used on the
resource directly returned by the ConfigurationResourceResolver.
the intention of the ConfigurationResolver is to provide a high-level API, and
of ConfigurationBuilder to never return null. difficult to keep in line with
this new feature.
[~cziegeler] your thoughts?
> Context-Aware Config: Support adapting configuration resources
> --------------------------------------------------------------
>
> Key: SLING-6016
> URL: https://issues.apache.org/jira/browse/SLING-6016
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: Context-Aware Configuration 1.0.0
> Reporter: Stefan Seifert
> Assignee: Stefan Seifert
> Labels: contextaware-config
> Fix For: Context-Aware Configuration 1.0.0
>
>
> carsten introduced in rev. 1758332 a new feature:
> the ConfigurationBuilder#as method should also support adapting to any other
> object for which a sling adapter manager exits, not only to configuration
> annotation classes.
> this is currently not reflected in the API, and unit tests are missing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)