[ https://issues.apache.org/jira/browse/SLING-4212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14239294#comment-14239294 ]
Stefan Seifert edited comment on SLING-4212 at 12/9/14 11:34 AM: ----------------------------------------------------------------- the API changes look or for me. some notes on the implementation (ResourcehPathInjector): # if you specify multiple paths, and some of them cannot be resolved you get just a list with those that could be resolved. only if none of the paths could be resolved the injection failed. is this the expected behavior? i would expect that the injection fails if at least one of the paths could not be resolved. # perhaps we should add some debug logging which prints out which paths tried to be resolved and which failed - so if the injections fails you have an option to find out which of the paths failed. # the integration test fail currently (SimpleTest). this is because the injector implements the interface "AcceptsNullName", but fails on line 76 when accesing the valuemap with name = null. you have to check all code paths to proper handling name=null (not check valuemap in this case) # and add unit tests for the case name = null was (Author: sseif...@pro-vision.de): the API changes look or for me. some notes on the implementation (ResourcehPathInjector): # if you specify multiple paths, and some of them cannot be resolved you get just a list with those that could be resolved. only if none of the paths could be resolved the injection failed. is this the expected behavior? i would expect that the injection fails if at least one of the paths could not be resolved. # perhaps we should add some debug logging which prints out which paths tried to be resolved and which failed - so if the injections fails you have an option to find out which of the paths failed. # the integration test fail currently (SimpleTest). this is because the injector implements the interface "AcceptsNullName", but fails on line 76 when accesing the valuemap with name = null. you have to check all code paths to proper handling name=null (not check valuemap in this case) > Sling Models: Allow multiple values from ValueMap in the resource-path > injector > ------------------------------------------------------------------------------- > > Key: SLING-4212 > URL: https://issues.apache.org/jira/browse/SLING-4212 > Project: Sling > Issue Type: Improvement > Components: Extensions > Reporter: santiago garcĂa pimentel > Attachments: resourcePath-API.patch, resourcePath.patch > > > The current implementation of the resource-path injector does not support > multiple values. I think it could be useful to inject a list of paths from > the valuemap. > I have created a small patch to allow this. Right now it only allows them > from the value map since I didn't want to change the API without consulting > you first. I you agree I can do this change as well. I also added a test case > for it. > You can see a pull request in https://github.com/apache/sling/pull/51 > If there anything I can do to improve this patch, please let me know. -- This message was sent by Atlassian JIRA (v6.3.4#6332)