-
Notifications
You must be signed in to change notification settings - Fork 187
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
Review Ix bidder #1372
Review Ix bidder #1372
Conversation
.h(banner.getH()) | ||
.build(); | ||
if (bidType == BidType.video) { | ||
updateWithVideoAttributes(bidBuilder, bid.getExt(), bid.getCat()); |
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 avoid passing of builder as an arguments.
Especially in this case, we won't affect the performance since the condition.
btw, we can use ternary operator for return
statement.
|
||
private void updateWithNativeAttributes(Bid.BidBuilder bidBuilder, String adm) { | ||
final NativeV11Wrapper nativeV11 = parseBidAdm(adm, NativeV11Wrapper.class); | ||
final Response v11Response = getIfNotNull(nativeV11, NativeV11Wrapper::getNativeResponse); |
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 rename v11Response
to responseV11
.
return target != null ? getter.apply(target) : null; | ||
} | ||
|
||
private String updateAdm(Response response, boolean isV11) { |
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.
i'd suggest to inline this method.
.build(); | ||
if (bidType == BidType.video) { | ||
updateWithVideoAttributes(bidBuilder, bid.getExt(), bid.getCat()); | ||
} else { |
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.
else if (bidType == BidType.xNative)
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.
Seems it is already checked above.
# Conflicts: # src/test/resources/org/prebid/server/it/openrtb2/ix/test-auction-ix-response.json
No description provided.