diff --git a/src/main/java/org/prebid/server/auction/mediatypeprocessor/MultiFormatMediaTypeProcessor.java b/src/main/java/org/prebid/server/auction/mediatypeprocessor/MultiFormatMediaTypeProcessor.java index 15459823d9a..f4e89ea2f76 100644 --- a/src/main/java/org/prebid/server/auction/mediatypeprocessor/MultiFormatMediaTypeProcessor.java +++ b/src/main/java/org/prebid/server/auction/mediatypeprocessor/MultiFormatMediaTypeProcessor.java @@ -1,6 +1,5 @@ package org.prebid.server.auction.mediatypeprocessor; -import com.fasterxml.jackson.core.JsonPointer; import com.fasterxml.jackson.databind.JsonNode; import com.iab.openrtb.request.BidRequest; import com.iab.openrtb.request.Imp; @@ -35,6 +34,9 @@ public MediaTypeProcessingResult process(BidRequest bidRequest, BidderAliases aliases, Account account) { final String resolvedBidderName = aliases.resolveBidder(bidderName); + //todo: ext.prebid.biddercontrols clean-up should NOT be here + // Suggestion: keep biddercontrols in the Auction Context + // and clean it up on the extraction auction participants step final BidRequest.BidRequestBuilder bidRequestBuilder = Optional.ofNullable(bidRequest.getExt()) .map(ExtRequest::getPrebid) .map(prebid -> prebid.toBuilder().biddercontrols(null).build()) @@ -79,7 +81,8 @@ private MediaType preferredMediaType(BidRequest bidRequest, return Optional.ofNullable(bidRequest.getExt()) .map(ExtRequest::getPrebid) .map(ExtRequestPrebid::getBiddercontrols) - .map(bidders -> bidders.at(JsonPointer.compile("/" + originalBidderName + "/" + PREF_MTYPE_FIELD))) + .map(bidders -> bidders.get(originalBidderName)) + .map(bidder -> bidder.get(PREF_MTYPE_FIELD)) .filter(JsonNode::isTextual) .map(JsonNode::textValue) .map(MediaType::of)