Skip to content
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

Inherit optional and getter evaluation #660

Closed
wants to merge 123 commits into from
Closed

Inherit optional and getter evaluation #660

wants to merge 123 commits into from

Conversation

derKrischan
Copy link

@derKrischan derKrischan commented Dec 8, 2019

Added @inherited to @optional and an extra evaluation for the presence of @optional at getter if the field exists. All tests passing but maybe someone can give me a hint where I can implement an extra test for my changes if necessary.
I signed the Lightbend CLA.
closes #659

dwijnand and others added 30 commits August 4, 2017 19:25
#495 Add Support For Set Types In Config Beans
Add fallback ConfigReferenceResolver
Add support for getting value as Period
Add C# port to Other APIs section
* Migration to lightbend repo

* Second round of the rename cleanup
Align maintanance note with other lightbend/ projects
Add circe-config to list of Scala wrappers
Fixes #546.

Adds Automatic-Module-Name: typesafe.config, rather than defaulting to
the very generic module name of config that the JVM selects.
update version to 1.3.2
)

This was causing NPEs on certain parse errors while trying to construct a ConfigException
Adds trace while allowing missing file by returing empty parse value
2m and others added 24 commits April 18, 2019 14:11
Typo in the year
Co-Authored-By: raboof <[email protected]>
Co-Authored-By: raboof <[email protected]>
Co-Authored-By: raboof <[email protected]>
Co-Authored-By: raboof <[email protected]>
Co-Authored-By: raboof <[email protected]>
Update README to include sconfig supported platforms
* Note in README that substitutions don’t work inside quotes

There’s more on this in HOCON.md but can’t hurt to repeat, people do miss it.
* Allow application.conf to override variables in reference.conf

Fixes #167

This only affects the output of `ConfigFactory.load`. It does not change
`ConfigFactory.defaultReference`. This uses the unresolved
`reference.conf` in the building of configuration in
`ConfigFactory.load`, effectively allowing `application.conf` properties
to override variable substitutions in `reference.conf`.

However, it still requires `reference.conf` to be fully resolvable, if
it isn't, an exception will be thrown. So two resolves are still done
during load, it's just that the output of the resolve of
`reference.conf` isn't used in building the final configuration. The
documentation has been updated to reflect this behavior.

The reasoning behind this change can be read about in #167, but
essentially, it is not uncommon for configuration properties to depend
on each other by default, a good example of this is directory
hierarchies, where you might have a configuration option for a base
directory, and then a configuration for the log directory that by
default is under the base directory, and within that a configuration for
individual log files which by default are under the log directory.
Without allowing variable substitutions in `reference.conf` from
`application.conf`, there is no point in defining a configuration option
for the base directory since changing it won't have any impact, and each
path defined that depends on it will have to be manually overridden.
This limitation is contrary to convention over configuration best
practices, and hence not desirable in a configuration library.

* Renamed public method to defaultReferenceUnresolved

Also added the methods to ConfigFactory, as requested in code review.
Performance fix: added capacity parameter in ArrayLists
…rences #659) beacuse of accidently used code formatter"

This reverts commit eafb1d8.
@lightbend-cla-validator
Copy link
Collaborator

At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user

@lightbend-cla-validator
Copy link
Collaborator

Hi @fabiofumarola,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http:https://www.lightbend.com/contribute/cla

@derKrischan derKrischan closed this Dec 8, 2019
@derKrischan
Copy link
Author

Tried to rewrite git history for my username and mail to match the CLA but that went wrong :-) . I'll give it another try.

@derKrischan derKrischan deleted the inherit_optional_and_getter_evaluation branch December 8, 2019 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inheritable @Optional and evaluation at getter even if field exists