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

Price Granularity: Update validation logic #1343

Merged
merged 2 commits into from
Jun 29, 2021
Merged

Conversation

SerhiiNahornyi
Copy link
Collaborator

No description provided.

validateGranularityRangeIncrement(range);

while (rangeIterator.hasNext()) {
final ExtGranularityRange nextGranularityRange = rangeIterator.next();
if (range.getMax().compareTo(nextGranularityRange.getMax()) > 0) {
final BigDecimal rangeMax = range.getMax();
Copy link
Contributor

Choose a reason for hiding this comment

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

This can be out of loop and used in validateGranularityRangeMax().

*/
private static void validateGranularityRangeMax(BigDecimal rangeMax)
throws ValidationException {
if (rangeMax == null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

i'd recommend to place this verification inlined before if (rangeMax.compareTo(nextRangeMax) > 0).

@rpanchyk rpanchyk merged commit 0fd3b20 into master Jun 29, 2021
@rpanchyk rpanchyk deleted the granularity/update branch June 29, 2021 13:25
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.

2 participants