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

AppNexus: reform bid floor handling #1261

Merged
merged 1 commit into from
May 13, 2021

Conversation

RodionOrets
Copy link
Contributor

@rpanchyk rpanchyk requested a review from SerhiiNahornyi May 12, 2021 05:54
Copy link
Collaborator

@SerhiiNahornyi SerhiiNahornyi left a comment

Choose a reason for hiding this comment

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

Please add more unit tests

@@ -312,7 +312,7 @@ private ImpWithMemberId makeImpWithMemberId(Imp imp, String defaultDisplayManage
}

final BigDecimal reserve = appnexusExt.getReserve();
if (reserve != null && reserve.compareTo(BigDecimal.ZERO) > 0) {
if (bidFloorIsInvalid(imp.getBidfloor()) && reserve != null && reserve.compareTo(BigDecimal.ZERO) > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we create something like isValidBidfloor and then use it both for imp.getBidfloor() and reserve?

Comment on lines 328 to 331
if (bidfloor == null) {
return true;
}
return bidfloor.compareTo(BigDecimal.ZERO) < 0 || bidfloor.compareTo(BigDecimal.ZERO) == 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

can be ternary

@RodionOrets RodionOrets force-pushed the reform-appnexus-bidfloor-handling branch from 93f304f to 843eccb Compare May 12, 2021 16:06
@rpanchyk rpanchyk merged commit bfc2385 into master May 13, 2021
@rpanchyk rpanchyk deleted the reform-appnexus-bidfloor-handling branch May 13, 2021 07:05
nickluck9 pushed a commit that referenced this pull request Aug 9, 2021
nickluck9 pushed a commit that referenced this pull request Aug 10, 2021
nickluck9 pushed a commit that referenced this pull request Aug 10, 2021
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.

3 participants