New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gh6566 2 customer retention: repair logic, refactoring, test #6593
Conversation
This reverts commit 22bfa13.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
..some minor requests only..
@@ -64,13 +68,18 @@ | |||
private final IInvoiceDAO invoiceDAO = Services.get(IInvoiceDAO.class); | |||
private final IContractsDAO contractsDAO = Services.get(IContractsDAO.class); | |||
private final ContractInvoiceService contractInvoiceService; | |||
|
|||
|
|||
public I_C_Customer_Retention getById(final CustomerRetentionId customerRetentionId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls add @NonNull
at least to public methods like this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
{ | ||
customerRetention = createNewCustomerRetention(bpartnerId); | ||
} | ||
final I_C_Customer_Retention customerRetention = getById(customerRetentionId); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add a comment or better an Check.assumeNotNull here to make it explicit the you made sure elsewhere this won't be null
PS: if you need to rely on something outside this class, such as the model interceptors, i suggest to invoke that getCreate createUpdate method instead..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check.assumeNotNull done.
(cherry picked from commit a5862f5) solved Conflicts: backend/de.metas.contracts/src/main/java/de/metas/contracts/impl/CustomerRetentionRepository.java
#6566