Code Monkey home page Code Monkey logo

Comments (6)

gsson avatar gsson commented on June 16, 2024

This also causes my existing configurations to break since the attribute was added without a default fallback.
Preferrably I'd have a default value if the attribute is missing, but I'd settle for adding a line in "Potentially breaking changes" in the change log at https://github.com/vert-x3/wiki/wiki/3.5.1-Breaking-Changes

from vertx-config.

cescoffier avatar cescoffier commented on June 16, 2024

Wow... yes. Definitely, something I should have mentioned in the list of breaking change. But, I believe it's somehow a bug too as optional should be false by default.

from vertx-config.

gsson avatar gsson commented on June 16, 2024

Yea, but ConfigStoreOptions is using this one;

  /**
   * Get the Boolean value with the specified key
   *
   * @param key  the key to return the value for
   * @return the value or null if no value for that key
   * @throws java.lang.ClassCastException if the value is not a Boolean
   */
  public Boolean getBoolean(String key) {
    Objects.requireNonNull(key);
    return (Boolean)map.get(key);
  }

Which will return null, which when casted to a primitive boolean will become an NPE. I guess the intention was to use optional = json.getBoolean("optional", false);?

from vertx-config.

StephenOTT avatar StephenOTT commented on June 16, 2024

So what is the current fix for this?

from vertx-config.

StephenOTT avatar StephenOTT commented on June 16, 2024

The .setoptional(false) does not even seem to work when using Java

from vertx-config.

cescoffier avatar cescoffier commented on June 16, 2024

I believe it has been fixed. Please reopen if you still have the issue.

from vertx-config.

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.