{"action":"opened","issue":{"url":"https://api.github.com/repos/nill14/utils/issues/2","labels_url":"https://api.github.com/repos/nill14/utils/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/nill14/utils/issues/2/comments","events_url":"https://api.github.com/repos/nill14/utils/issues/2/events","html_url":"https://github.com/nill14/utils/issues/2","id":104271311,"number":2,"title":"Unexpected result by ChainingPropertyResolver.findAllByType","user":{"login":"rnedkov","id":10248115,"avatar_url":"https://avatars.githubusercontent.com/u/10248115?v=3","gravatar_id":"","url":"https://api.github.com/users/rnedkov","html_url":"https://github.com/rnedkov","followers_url":"https://api.github.com/users/rnedkov/followers","following_url":"https://api.github.com/users/rnedkov/following{/other_user}","gists_url":"https://api.github.com/users/rnedkov/gists{/gist_id}","starred_url":"https://api.github.com/users/rnedkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnedkov/subscriptions","organizations_url":"https://api.github.com/users/rnedkov/orgs","repos_url":"https://api.github.com/users/rnedkov/repos","events_url":"https://api.github.com/users/rnedkov/events{/privacy}","received_events_url":"https://api.github.com/users/rnedkov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-01T13:50:45Z","updated_at":"2015-09-01T13:50:45Z","closed_at":null,"body":"Example Pseudo-Code Szenario:\r\n```java\r\n\r\ninterface IFace{}\r\n\r\nclass Service{\r\n  @Inject List<IFace> ifaces;\r\n}\r\nclass M1{\r\n  public void bindServices(Binder binder){\r\n    binder.bind(IFace.class).to(Face1.class); \r\n    binder.bind(IService.class).to(Service.class);   \r\n  }\r\n}\r\n\r\nclass M2{\r\n  public void bindServices(Binder binder){\r\n    binder.bind(IFace.class).to(Face2.class);  \r\n  }\r\n}\r\n\r\nChaingPropertyResolver parent = new ChaingPropertyResolver();\r\n\r\nSimpleProperyResolver m1Resolver = new SimplePropertyResolver(m1Bindings, parent);\r\nSimpleProperyResolver m2Resolver = new SimplePropertyResolver(m2Bindings, parent);\r\n\r\nparent.insert(m1Resolver);\r\nparent.insert(m2Resolver);\r\n\r\nService service = parent.resolve(Service.class); \r\n```\r\n\r\nIn Service.ifaces would be injected only Face1-Instance and Face2 is not injected. The reason is in ChaingPropertyResolver.findAllByTypes()\r\n\r\n```java\r\npublic final class ChainingPropertyResolver extends AbstractPropertyResolver {\r\n  \t@Override\r\n\tprotected Collection<?> findAllByType(IParameterType type, ICallerContext context) {\r\n\t\tfor (AbstractPropertyResolver resolver : items) {\r\n\t\t\tCollection<?> result = resolver.findAllByType(type, context);\r\n\t\t\tif (!result.isEmpty()) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n               return Collections.emptyList();\r\n\t}\r\n}\r\n```` \r\n\r\nIt returns the result of the first matching resolver(in this case m1 -> Face1.class), I think that for collection it should aggregate the results of all resolvers and return it as set.\r\n"}}