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

Support dynamic configs of different kinds, not just String #405

Closed
wants to merge 1 commit into from

Conversation

costimuraru
Copy link

This is very useful for the remote TypesafeConfigLoader, which I’m going to add in a different pull request. It makes it possible to enhance the config with objects of type Duration, Date and others.

Relates to #403

@cloudbees-pull-request-builder

NetflixOSS » archaius » archaius-pull-requests #223 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

archaius-pull-requests #389 SUCCESS
This pull request looks good

String next = p.get(INCLUDE_KEY);
if (next != null) {
Object next = p.get(INCLUDE_KEY);
if (next != null && next instanceof String) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Next should only ever be a string. It's OK to keep next as a String.

String next = (String)p.get(INCLUDE_KEY);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback, @elandau. Made the suggested change.

This is very useful for remote TypesafeConfigLoader, which I’m going to
add in a different pull request. It makes it possible to enhance the
config with objects of type
Duration/Date/ConfigList/ConfigMemorySize/etc.
@cloudbees-pull-request-builder

NetflixOSS » archaius » archaius-pull-requests #224 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

archaius-pull-requests #390 SUCCESS
This pull request looks good

@howardyuan
Copy link
Contributor

Code LGTM. @costimuraru Is this part of your efforts to support java.time.Duration?

@costimuraru
Copy link
Author

costimuraru commented Apr 14, 2016

Indeed it is @howardyuan.
One issue though: java.time.Duration comes with Java 8. I can see that archaius2 is built with Java 7. As you probably know, Java 7 has reached end of line as of April 2015 [0].
Do you see a problem with upgrading to Java 8? The alternative for me is to keep the changes on the fork, which is not very practical :-)

[0] https://java.com/en/download/faq/java_7.xml

LE: Only the archaius2-typesafe module needs to be upgraded to Java 8

@cloudbees-pull-request-builder

archaius-pull-requests #391 FAILURE
Looks like there's a problem with this pull request

@cloudbees-pull-request-builder

NetflixOSS » archaius » archaius-pull-requests #225 FAILURE
Looks like there's a problem with this pull request

@cloudbees-pull-request-builder

archaius-pull-requests #392 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

NetflixOSS » archaius » archaius-pull-requests #226 SUCCESS
This pull request looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants