immutables-vavr icon indicating copy to clipboard operation
immutables-vavr copied to clipboard

@Value.Default with Option-fields throws NullPointerException

Open ajkettun opened this issue 4 years ago • 1 comments

@Value.Default with Option fields throws NullPointerException:

   @Value.Default
   public Option<String> getFoo() {
      return Option.some("foo");
   }
error: org.immutables.value.internal.$processor$.$Processor threw java.lang.NullPointerException
        at org.immutables.value.internal.$processor$.encode.$Instantiation$6.invoke($Instantiation.java:305)
        at org.immutables.value.internal.$generator$.$Intrinsics.$($Intrinsics.java:96)
        at org.immutables.value.internal.$processor$.encode.$Generator_Renderers._t26__wasInit($Generator_Renderers.java:845)
        at org.immutables.value.internal.$processor$.encode.$Generator_Renderers$FragmentDispatch.run($Generator_Renderers.java:1167)

org.immutables:value:2.7.4 org.immutables.vavr;vavr-encodings:0.6.2

ajkettun avatar Feb 03 '21 18:02 ajkettun

Problem could be in Immutables: https://github.com/immutables/immutables/issues/1206

ajkettun avatar Feb 03 '21 18:02 ajkettun