{"action":"created","issue":{"url":"https://api.github.com/repos/caelum/vraptor4/issues/933","labels_url":"https://api.github.com/repos/caelum/vraptor4/issues/933/labels{/name}","comments_url":"https://api.github.com/repos/caelum/vraptor4/issues/933/comments","events_url":"https://api.github.com/repos/caelum/vraptor4/issues/933/events","html_url":"https://github.com/caelum/vraptor4/issues/933","id":55976044,"number":933,"title":"GsonSerializer Erro include/exclude","user":{"login":"jeancrbecker","id":10744173,"avatar_url":"https://avatars.githubusercontent.com/u/10744173?v=3","gravatar_id":"","url":"https://api.github.com/users/jeancrbecker","html_url":"https://github.com/jeancrbecker","followers_url":"https://api.github.com/users/jeancrbecker/followers","following_url":"https://api.github.com/users/jeancrbecker/following{/other_user}","gists_url":"https://api.github.com/users/jeancrbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/jeancrbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeancrbecker/subscriptions","organizations_url":"https://api.github.com/users/jeancrbecker/orgs","repos_url":"https://api.github.com/users/jeancrbecker/repos","events_url":"https://api.github.com/users/jeancrbecker/events{/privacy}","received_events_url":"https://api.github.com/users/jeancrbecker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/caelum/vraptor4/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":30,"created_at":"2015-01-29T23:58:26Z","updated_at":"2015-02-11T10:57:48Z","closed_at":null,"body":"Ao retornar um json através do result, quando este objeto retornado contém uma lista e tento excluir ou incluir algum parametro  da mesma ocorre o erro abaixo:\r\n```\r\njava.lang.NullPointerException\r\n\tat com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)\r\n\tat br.com.caelum.vraptor.serialization.Serializee.reflectField(Serializee.java:159)\r\n\tat br.com.caelum.vraptor.serialization.Serializee.getParentTypes(Serializee.java:140)\r\n\tat br.com.caelum.vraptor.serialization.Serializee.getParentTypesFor(Serializee.java:125)\r\n\tat br.com.caelum.vraptor.serialization.Serializee.excludeAll(Serializee.java:96)\r\n\tat br.com.caelum.vraptor.serialization.gson.GsonSerializer.exclude(GsonSerializer.java:59)\r\n```\r\n\r\nUm exemplo de objetos.\r\n\r\n```\r\npublic class Resultado {\r\n    private String nome;\r\n    private Collection<Usuario> list;\r\n}\r\n\r\npublic class Usuario {\r\n    private String nome;\r\n    private String login;\r\n}\r\n```\r\n\r\nEntão na controller quando tento retornar um json excluindo algum parametro da lista, ou tentando incluir apenas alguns parametros ocorre erro.\r\n\r\nIsso não funciona\r\n```\r\n    @Get(\"search/{nome}\")\r\n    public void pesquisar(String nome) {\r\n        result.use(json()).withoutRoot().from(abstractService.search(nome)).include(\"list\").exclude(\"list.login\").serialize();\r\n    }\r\n```\r\nIsso também não\r\n```\r\n@Get(\"search/{nome}\")\r\n    public void pesquisar(String nome) {\r\n        result.use(json()).withoutRoot().from(abstractService.search(nome)).include(\"list.nome\").serialize();\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/caelum/vraptor4/issues/comments/73863862","html_url":"https://github.com/caelum/vraptor4/issues/933#issuecomment-73863862","issue_url":"https://api.github.com/repos/caelum/vraptor4/issues/933","id":73863862,"user":{"login":"jeancrbecker","id":10744173,"avatar_url":"https://avatars.githubusercontent.com/u/10744173?v=3","gravatar_id":"","url":"https://api.github.com/users/jeancrbecker","html_url":"https://github.com/jeancrbecker","followers_url":"https://api.github.com/users/jeancrbecker/followers","following_url":"https://api.github.com/users/jeancrbecker/following{/other_user}","gists_url":"https://api.github.com/users/jeancrbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/jeancrbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeancrbecker/subscriptions","organizations_url":"https://api.github.com/users/jeancrbecker/orgs","repos_url":"https://api.github.com/users/jeancrbecker/repos","events_url":"https://api.github.com/users/jeancrbecker/events{/privacy}","received_events_url":"https://api.github.com/users/jeancrbecker/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T10:57:48Z","updated_at":"2015-02-11T10:57:48Z","body":"Isso, sem o generics."}}