The meaning of life is to explore the world

Fixed the null properties issues for Special import

Posted on By Jason Liu

What have been done:

  1. Fixed the issue where Specials have lots of null properties caused by the empty constructor used to avoid Lombok default mapping.

Problems encountered:

  1. It’s difficult to control which properties need to be constructed and how they behave using Lombok. Properties will become null if we don’t specify them in an constructor with @Builder annotation.

Solution:

  1. Write our own SpecialBuilder class, instead of using Lombok. Eg.
    public class Special {
     public static class SpecialBuilder {
         private String description;
         ...
     }
     ...
    }