{"action":"created","issue":{"url":"https://api.github.com/repos/clun/ff4j/issues/28","labels_url":"https://api.github.com/repos/clun/ff4j/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/clun/ff4j/issues/28/comments","events_url":"https://api.github.com/repos/clun/ff4j/issues/28/events","html_url":"https://github.com/clun/ff4j/issues/28","id":55739684,"number":28,"title":"ClassCastException: org.bson.LazyBSONList cannot be cast to org.bson.types.BasicBSONList","user":{"login":"hlassiege","id":666123,"avatar_url":"https://avatars.githubusercontent.com/u/666123?v=3","gravatar_id":"","url":"https://api.github.com/users/hlassiege","html_url":"https://github.com/hlassiege","followers_url":"https://api.github.com/users/hlassiege/followers","following_url":"https://api.github.com/users/hlassiege/following{/other_user}","gists_url":"https://api.github.com/users/hlassiege/gists{/gist_id}","starred_url":"https://api.github.com/users/hlassiege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlassiege/subscriptions","organizations_url":"https://api.github.com/users/hlassiege/orgs","repos_url":"https://api.github.com/users/hlassiege/repos","events_url":"https://api.github.com/users/hlassiege/events{/privacy}","received_events_url":"https://api.github.com/users/hlassiege/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/clun/ff4j/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"clun","id":726536,"avatar_url":"https://avatars.githubusercontent.com/u/726536?v=3","gravatar_id":"","url":"https://api.github.com/users/clun","html_url":"https://github.com/clun","followers_url":"https://api.github.com/users/clun/followers","following_url":"https://api.github.com/users/clun/following{/other_user}","gists_url":"https://api.github.com/users/clun/gists{/gist_id}","starred_url":"https://api.github.com/users/clun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clun/subscriptions","organizations_url":"https://api.github.com/users/clun/orgs","repos_url":"https://api.github.com/users/clun/repos","events_url":"https://api.github.com/users/clun/events{/privacy}","received_events_url":"https://api.github.com/users/clun/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/clun/ff4j/milestones/3","html_url":"https://github.com/clun/ff4j/milestones/1.3.1","labels_url":"https://api.github.com/repos/clun/ff4j/milestones/3/labels","id":961717,"number":3,"title":"1.3.1","description":null,"creator":{"login":"clun","id":726536,"avatar_url":"https://avatars.githubusercontent.com/u/726536?v=3","gravatar_id":"","url":"https://api.github.com/users/clun","html_url":"https://github.com/clun","followers_url":"https://api.github.com/users/clun/followers","following_url":"https://api.github.com/users/clun/following{/other_user}","gists_url":"https://api.github.com/users/clun/gists{/gist_id}","starred_url":"https://api.github.com/users/clun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clun/subscriptions","organizations_url":"https://api.github.com/users/clun/orgs","repos_url":"https://api.github.com/users/clun/repos","events_url":"https://api.github.com/users/clun/events{/privacy}","received_events_url":"https://api.github.com/users/clun/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":5,"state":"open","created_at":"2015-02-02T16:24:18Z","updated_at":"2015-04-13T10:15:03Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-01-28T10:39:08Z","updated_at":"2015-04-13T10:15:03Z","closed_at":"2015-04-13T10:15:03Z","body":"When adding a feature using FeatureStoreMongodb, the produced json in database is : \r\n\r\n```\r\n> db.ff4j.find().pretty()\r\n{\r\n        \"_id\" : \"choose_lang\",\r\n        \"enable\" : false,\r\n        \"description\" : \"Capability to choose language\",\r\n        \"groupname\" : null,\r\n        \"strategy\" : \"com.hopwork.ff4j.strategy.AdminOrAccountFilterStrategy\",\r\n        \"expression\" : \"some values\",\r\n        \"roles\" : [ ]\r\n}\r\n```\r\n\r\nHowever, it fails in FeatureDBObjectMapper on line 92 : \r\n\r\n```\r\n        if (dbObject.containsField(ROLES)) {\r\n            for (Object role : (BasicBSONList) dbObject.get(ROLES)) {\r\n                authorisation.add(role.toString());\r\n            }\r\n        }\r\n\r\n=> \r\nClassCastException: org.bson.LazyBSONList cannot be cast to org.bson.types.BasicBSONList\r\n```\r\n\r\nIf I unset this variable in mongoshell, everything works correctly. "},"comment":{"url":"https://api.github.com/repos/clun/ff4j/issues/comments/92300380","html_url":"https://github.com/clun/ff4j/issues/28#issuecomment-92300380","issue_url":"https://api.github.com/repos/clun/ff4j/issues/28","id":92300380,"user":{"login":"clun","id":726536,"avatar_url":"https://avatars.githubusercontent.com/u/726536?v=3","gravatar_id":"","url":"https://api.github.com/users/clun","html_url":"https://github.com/clun","followers_url":"https://api.github.com/users/clun/followers","following_url":"https://api.github.com/users/clun/following{/other_user}","gists_url":"https://api.github.com/users/clun/gists{/gist_id}","starred_url":"https://api.github.com/users/clun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clun/subscriptions","organizations_url":"https://api.github.com/users/clun/orgs","repos_url":"https://api.github.com/users/clun/repos","events_url":"https://api.github.com/users/clun/events{/privacy}","received_events_url":"https://api.github.com/users/clun/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T10:15:03Z","updated_at":"2015-04-13T10:15:03Z","body":"Corrected in 1.3.1 with the iterable trick"}}