Skip to content
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

Merged
merged 13 commits into from May 7, 2020
Merged

Conversation

metas-rc
Copy link
Member

@metas-rc metas-rc commented May 6, 2020

Copy link
Member

@metas-ts metas-ts left a 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)
Copy link
Member

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

Copy link
Member Author

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);

Copy link
Member

@metas-ts metas-ts May 7, 2020

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..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check.assumeNotNull done.

@metas-ts metas-ts merged commit a5862f5 into master May 7, 2020
@metas-ts metas-ts deleted the gh6566_2 branch May 7, 2020 12:01
metas-ts pushed a commit that referenced this pull request May 7, 2020
(cherry picked from commit a5862f5)

solved Conflicts:
	backend/de.metas.contracts/src/main/java/de/metas/contracts/impl/CustomerRetentionRepository.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants