3

I have the value object:

@Embeddable
@Value
public class Delivery{

    public String courier;
    public String trackingNumber;

    @JsonFormat(pattern = "yyyy-MM-dd")
    public LocalDate deliveryDate;

    @JsonFormat(pattern = "yyyy-MM-dd")
    public LocalDate expectedDeliveryDate;    

}

And I have tried with @Data and @EqualsAndHAshCode annotations as well. But even when all the fields have exactly the same value on both objects, .equals always returns false. Is this expected behavior?

aycanadal
  • 1,106
  • 2
  • 15
  • 42
  • 1
    please try to build your project and see what lombok generate for you, and please post it – Chi Dov Oct 16 '17 at 15:38
  • Right, my problem was https://stackoverflow.com/questions/24006937/lombok-annotations-do-not-compile-under-intellij-idea . But, how can I view what lombok has generated? Did you mean like with the decompiler or so? – aycanadal Oct 16 '17 at 16:23
  • 2
    For me, i will config the lombok-plugin in intellij. If you have problem with that, you can just go to your target folder at take a look at the class file, intellij will decompile it for you – Chi Dov Oct 16 '17 at 16:26
  • 1
    I've closed your question as IIUIC it's solved by an answer there. With intellij things are different (so please add the information to your question the next time), but you can look at what Lombok generates by using `java -jar path/to/lombok.jar -delombok`. – maaartinus Oct 16 '17 at 20:34
  • 1
    This's not a duplicate question.... – Sercan Ozdemir Apr 06 '19 at 12:58

0 Answers0