@@ -62,9 +62,6 @@ public class OpenxBidder implements Bidder<BidRequest> {
6262 private static final TypeReference <ExtPrebid <ExtImpPrebid , ExtImpOpenx >> OPENX_EXT_TYPE_REFERENCE =
6363 new TypeReference <>() {
6464 };
65- private static final TypeReference <ExtPrebid <ExtBidPrebid , ObjectNode >> EXT_PREBID_TYPE_REFERENCE =
66- new TypeReference <>() {
67- };
6865
6966 private final String endpointUrl ;
7067 private final JacksonMapper mapper ;
@@ -357,16 +354,13 @@ private ObjectNode updateBidMeta(Bid bid) {
357354 return ext ;
358355 }
359356
360- final var extPrebid = getExtPrebid (ext , bid .getId ());
361357 final var updatedMeta = ExtBidPrebidMeta .builder ()
362358 .networkId (dspId )
363359 .advertiserId (buyerId )
364360 .brandId (brandId )
365361 .build ();
366362
367- final var modifiedExtBidPrebid = Optional .ofNullable (extPrebid .getPrebid ())
368- .map (p -> p .toBuilder ().meta (updatedMeta ).build ())
369- .orElse (ExtBidPrebid .builder ().meta (updatedMeta ).build ());
363+ final var modifiedExtBidPrebid = ExtBidPrebid .builder ().meta (updatedMeta ).build ();
370364
371365 final var updatedExt = ext .deepCopy ();
372366 updatedExt .set (PREBID_EXT , mapper .mapper ().valueToTree (modifiedExtBidPrebid ));
@@ -382,14 +376,6 @@ private OpenxBidExt parseOpenxBidExt(ObjectNode ext) {
382376 }
383377 }
384378
385- private ExtPrebid <ExtBidPrebid , ObjectNode > getExtPrebid (ObjectNode bidExt , String bidId ) {
386- try {
387- return mapper .mapper ().convertValue (bidExt , EXT_PREBID_TYPE_REFERENCE );
388- } catch (IllegalArgumentException e ) {
389- throw new PreBidException ("Invalid ext in bid with id: " + bidId , e );
390- }
391- }
392-
393379 private int parseStringToInt (String value ) {
394380 try {
395381 return value != null ? Integer .parseInt (value ) : 0 ;
0 commit comments