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

Case Insensitive Check for Bidder Controls #3352

Merged
merged 2 commits into from
Aug 12, 2024

Conversation

AntoxaAntoxic
Copy link
Collaborator

🔧 Type of changes

  • new bid adapter
  • update bid adapter
  • new feature
  • new analytics adapter
  • new module
  • bugfix
  • documentation
  • configuration
  • tech debt (test coverage, refactorings, etc.)

✨ What's the context?

What's the context for the changes? Are there any

🧠 Rationale behind the change

Why did you choose to make these changes? Were there any trade-offs you had to consider?

🧪 Test plan

How do you know the changes are safe to ship to production?

🏎 Quality check

  • Are your changes following our code style guidelines?
  • Are there any breaking changes in your code?
  • Does your test coverage exceed 90%?
  • Are there any erroneous console logs, debuggers or leftover code in your changes?

@AntoxaAntoxic AntoxaAntoxic self-assigned this Aug 6, 2024
return Optional.ofNullable(bidRequest.getExt())
.map(ExtRequest::getPrebid)
.map(ExtRequestPrebid::getBiddercontrols)
.map(bidders -> bidders.get(originalBidderName))
.map(bidders -> getBidder(originalBidderName, bidders))
Copy link
Collaborator

Choose a reason for hiding this comment

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

If getBidder returns null, it will cause an NPE on the next line.
While project logic suggests this shouldn’t happen, it would be better for readability if you added a nonNull filter or some other safeguard.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it won't since it's nullable optional that execute orElse in that case

@SerhiiNahornyi SerhiiNahornyi merged commit af6fcb4 into master Aug 12, 2024
5 checks passed
@SerhiiNahornyi SerhiiNahornyi deleted the biddercontrols-prefmtype-fix branch August 12, 2024 12:33
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