{"action":"created","issue":{"url":"https://api.github.com/repos/immutables/immutables/issues/261","repository_url":"https://api.github.com/repos/immutables/immutables","labels_url":"https://api.github.com/repos/immutables/immutables/issues/261/labels{/name}","comments_url":"https://api.github.com/repos/immutables/immutables/issues/261/comments","events_url":"https://api.github.com/repos/immutables/immutables/issues/261/events","html_url":"https://github.com/immutables/immutables/issues/261","id":134720979,"number":261,"title":"NPE, cause not known","user":{"login":"j-baker","id":42533,"avatar_url":"https://avatars.githubusercontent.com/u/42533?v=3","gravatar_id":"","url":"https://api.github.com/users/j-baker","html_url":"https://github.com/j-baker","followers_url":"https://api.github.com/users/j-baker/followers","following_url":"https://api.github.com/users/j-baker/following{/other_user}","gists_url":"https://api.github.com/users/j-baker/gists{/gist_id}","starred_url":"https://api.github.com/users/j-baker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-baker/subscriptions","organizations_url":"https://api.github.com/users/j-baker/orgs","repos_url":"https://api.github.com/users/j-baker/repos","events_url":"https://api.github.com/users/j-baker/events{/privacy}","received_events_url":"https://api.github.com/users/j-baker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/immutables/immutables/labels/docbug","name":"docbug","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/immutables/immutables/milestones/25","html_url":"https://github.com/immutables/immutables/milestones/2.1.11","labels_url":"https://api.github.com/repos/immutables/immutables/milestones/25/labels","id":1579073,"number":25,"title":"2.1.11","description":null,"creator":{"login":"elucash","id":1692611,"avatar_url":"https://avatars.githubusercontent.com/u/1692611?v=3","gravatar_id":"","url":"https://api.github.com/users/elucash","html_url":"https://github.com/elucash","followers_url":"https://api.github.com/users/elucash/followers","following_url":"https://api.github.com/users/elucash/following{/other_user}","gists_url":"https://api.github.com/users/elucash/gists{/gist_id}","starred_url":"https://api.github.com/users/elucash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elucash/subscriptions","organizations_url":"https://api.github.com/users/elucash/orgs","repos_url":"https://api.github.com/users/elucash/repos","events_url":"https://api.github.com/users/elucash/events{/privacy}","received_events_url":"https://api.github.com/users/elucash/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":3,"state":"open","created_at":"2016-02-12T03:44:48Z","updated_at":"2016-02-19T08:31:45Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-02-18T22:47:45Z","updated_at":"2016-02-19T18:04:56Z","closed_at":null,"body":"Hey,\r\nAfter adding a few interfaces, I've a couple of times been blocked by Immutables NPEing when ./gradlew assemble is run. The stack trace is at the bottom. It doesn't happen when Immutables is run inside of IntelliJ.\r\n\r\nI've not been able to find the root cause of this - specifically classes that cause Immutables to NPE in one project compile fine when copied to another project.\r\n\r\n    error: org.immutables.value.internal.$processor$.$Processor threw java.lang.NullPointerException\r\n  \tat org.immutables.value.internal.$guava$.base.$Preconditions.checkNotNull($Preconditions.java:210)\r\n  \tat org.immutables.value.internal.$processor$.meta.$StyleMirror.<init>($StyleMirror.java:793)\r\n  \tat org.immutables.value.internal.$processor$.meta.$StyleMirror.from($StyleMirror.java:92)\r\n  \tat org.immutables.value.internal.$processor$.meta.$Proto$Environment.defaultStyles($Proto.java:148)\r\n  \tat org.immutables.value.internal.$processor$.meta.$ImmutableProto$Environment.<init>($ImmutableProto.java:2034)\r\n  \tat org.immutables.value.internal.$processor$.meta.$ImmutableProto$Environment.of($ImmutableProto.java:2272)\r\n  \tat org.immutables.value.internal.$processor$.meta.$Round.environment($Round.java:79)\r\n  \tat org.immutables.value.internal.$processor$.meta.$ImmutableRound.environment($ImmutableRound.java:288)\r\n  \tat org.immutables.value.internal.$processor$.meta.$Round.declaringTypeFrom($Round.java:169)\r\n  \tat org.immutables.value.internal.$processor$.meta.$Round$ProtoclassCollecter.collectIncludedAndDefinedBy($Round.java:240)\r\n  \tat org.immutables.value.internal.$processor$.meta.$Round$ProtoclassCollecter.collect($Round.java:190)\r\n  \tat org.immutables.value.internal.$processor$.meta.$Round$ProtoclassCollecter.collect($Round.java:180)\r\n  \tat org.immutables.value.internal.$processor$.meta.$Round.collectProtoclasses($Round.java:129)\r\n  \tat org.immutables.value.internal.$processor$.meta.$Round.collectValues($Round.java:83)\r\n  \tat org.immutables.value.internal.$processor$.$Processor.process($Processor.java:48)\r\n  \tat org.immutables.value.internal.$generator$.$AbstractGenerator.process($AbstractGenerator.java:89)\r\n  \tat com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)\r\n  \tat com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)\r\n  \tat com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)\r\n  \tat com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)\r\n  \tat com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)\r\n  \tat com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)\r\n  \tat com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)\r\n  \tat com.sun.tools.javac.main.Main.compile(Main.java:523)\r\n  \tat com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)\r\n  \tat com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)"},"comment":{"url":"https://api.github.com/repos/immutables/immutables/issues/comments/186334569","html_url":"https://github.com/immutables/immutables/issues/261#issuecomment-186334569","issue_url":"https://api.github.com/repos/immutables/immutables/issues/261","id":186334569,"user":{"login":"j-baker","id":42533,"avatar_url":"https://avatars.githubusercontent.com/u/42533?v=3","gravatar_id":"","url":"https://api.github.com/users/j-baker","html_url":"https://github.com/j-baker","followers_url":"https://api.github.com/users/j-baker/followers","following_url":"https://api.github.com/users/j-baker/following{/other_user}","gists_url":"https://api.github.com/users/j-baker/gists{/gist_id}","starred_url":"https://api.github.com/users/j-baker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j-baker/subscriptions","organizations_url":"https://api.github.com/users/j-baker/orgs","repos_url":"https://api.github.com/users/j-baker/repos","events_url":"https://api.github.com/users/j-baker/events{/privacy}","received_events_url":"https://api.github.com/users/j-baker/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T18:04:56Z","updated_at":"2016-02-19T18:04:56Z","body":"We're using https://github.com/palantir/gradle-processors. It marks the annotation processor as a provided dependency, and sets up IDEA, Eclipse, javadoc etc to use the generator and generated classes appropriately.\r\n\r\nI'm quite confused by this bug - to be clear Immutables works fine for most of the cases where we use it (indicating that we're set up correctly in general) - but there are certain classes where their addition will cause this NPE.\r\n\r\nAs another thing, this does not happen in immutables 2.0.x (but we need 2.1.x because the Jackson codegen handles @JsonAnyGetter and @JsonTypeName properly)."}}