Closed Rafal-Spryszynski closed 4 years ago
Option's logic when creating object and when using "with" generated method are inconsistent.
Consider this test class:
@VavrOptionEncodingEnabled @Value.Immutable interface TestObject { Option<Integer> option(); }
This test yields:
ImmutableTestObject testObject = ImmutableTestObject.builder() .option((Integer) null) .build(); Assert.assertEquals(testObject, testObject.withOption((Integer) null));
expected:<TestObject{option=None}> but was:<TestObject{option=Some(null)}>
I've created pull request to fix it:
I have to rethink where is the real problem.
Option's logic when creating object and when using "with" generated method are inconsistent.
Consider this test class:
This test yields:
expected:<TestObject{option=None}> but was:<TestObject{option=Some(null)}>
I've created pull request to fix it:
25