Closed tem556 closed 1 year ago
@bnnthang if you check Server/App.java, you'll see that I set values of TrainingConfiguration that can be null (i.e. don't have @NonNull over them) using the "set....." method, instead of passing it in as parameter to training constructor. Is there a way to pass them as parameters to constructor?
@bnnthang if you check Server/App.java, you'll see that I set values of TrainingConfiguration that can be null (i.e. don't have @nonnull over them) using the "set....." method, instead of passing it in as parameter to training constructor. Is there a way to pass them as parameters to constructor?
The TrainingConfiguration class is annotated with Data. You should be able to pass all arguments via a constructor. Check this out https://projectlombok.org/features/Data.
By the way, this also fixes #26 right?
Yes, I already did. But for some reason, only arguments with the @NonNull constructor are recognized.
I think I unintentionally fixed some parts of #26. I think its best if I take another look after I finish #18 and #19
Yes, I already did. But for some reason, only arguments with the @nonnull constructor are recognized.
I think you can look at this as well https://projectlombok.org/features/constructor. In short, you just need to add the AllArgsConstructor annotation, I think.
@tem556 Have you finished? Let me know, and I will close this PR. Your new commit is included here as well.
Yes I am done
This PR is to close #18.