Git Product home page Git Product logo

Comments (2)

opinali avatar opinali commented on May 7, 2024

The NullPointerException was not intended, it's a bug that was fixed in v0.9.3, so you can update to at least avoid this exception. (If you're using the library via Open Bidder, that will have a release later this week, catching up with the current OpenRTB libs.) I agree this representation of enums doesn't support the extended values allowed by the spec, but it's a tradeoff we've made for a more convenient, strong-typed API. (And frankly this is a bad feature of the spec IMO, so we don't plan to ever use it in AdX' upcoming OpenRTB callout support; but that's a separate discussion.)

However there was always a plan to support extended values via Protobuf's unknown field feature (which makes reading/writing the extended values less convenient, but that's OK for a corner case -- you are the first user ever who reports this limitation as a problem, confirming my impression that actual usage of extended values is uncommon). But it's not a hard change and now there's demand for it, so maybe a good time to work on that. Another solution is forking the proto from this library and adding new values to the enum, this is a good workaround with the latest lib which will just ignore unknown values so you only need to add the ext values you care to process.

from openrtb.

bryanwagner avatar bryanwagner commented on May 7, 2024

Ah, the fix you provided in 0.9.3 works perfectly enough for me! Thank you!

I had a transitive dependency that was blocking my attempt at using the latest build (our project is on Maven 2 still). Knowing there was a fix in 0.9.3 helped me track it down, and 0.9.8 is working for me. I agree; I think in practice codes like these are remnants of system built prior to the spec formalization and it's always been enough for us to discard them or refer people to the ext fields. I agree that the strongly typed API in terms of enums is much more robust. This library has been extremely valuable to us; thanks again.

from openrtb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.