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

Parse case insensitive boolean text #966

Merged
merged 5 commits into from Sep 5, 2018

Conversation

Projects
None yet
2 participants
@GalRogozinski
Contributor

GalRogozinski commented Sep 3, 2018

Description

Fixes case insensitive parsing of boolean configurations.
For example DNS_RESOLUTION_ENABLED = TRUE failed with the following error:

ERROR com.iota.iri.IRI$IRILauncher - There was a problem reading configuration from file: Cannot deserialize value of type `boolean` from String "TRUE": only "true" or "false" recognized
 at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.iota.iri.conf.TestnetConfig["DNS_RESOLUTION_ENABLED"])

Fixes #724

Type of change

  • Bug fix (a non-breaking change which fixes an issue)

How Has This Been Tested?

Unit tests were added that ascertain

  • Test "TRUE"
  • Test "FALSE"
  • Test that writing the key with no value gives an error (this is backwards compatible behavior).
  • Test that defaults value don't change if keys are missing.

Checklist:

Please delete items that are not relevant.

  • My code follows the style guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

GalRogozinski added some commits Sep 3, 2018

@GalRogozinski GalRogozinski requested review from alon-e and kwek20 Sep 3, 2018

GalRogozinski added some commits Sep 3, 2018

@iotaledger iotaledger deleted a comment from codacy-bot Sep 3, 2018

@alon-e

alon-e approved these changes Sep 4, 2018

@GalRogozinski GalRogozinski merged commit 9a17bcf into iotaledger:dev Sep 5, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment