-
Notifications
You must be signed in to change notification settings - Fork 966
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
Concatenated strings as keys #25
Comments
I added the following test and it passed. My guess is that you're expecting to use a string with methods that expect a path expression, see the docs for class Config in http://typesafehub.github.com/config/latest/api/ If that isn't it then it would be helpful to modify the test below to break. @Test
def unquotedKeyWithWhitespace() {
val conf = ConfigFactory.parseString("""repositories {
AWS S3 : "http://jets3t.s3.amazonaws.com/maven2"
}""")
assertEquals("http://jets3t.s3.amazonaws.com/maven2", conf.getObject("repositories").get("AWS S3").unwrapped.asInstanceOf[String])
assertEquals("http://jets3t.s3.amazonaws.com/maven2", conf.getString("repositories.\"AWS S3\""))
}
|
I've got code like this (you can see the whole file here)
|
I think your problem is that entrySet on a Config has path expressions as keys. Try config.root.entrySet (but of course you then have a tree of maps, not a single level). |
I'll stick with my workaround. Might be worthwhile mentioning something about this corner case in the docs. |
I think it is mentioned but I'll see if |
Given the following:
The key is parsed as ""AWS S3"" instead of "AWS S3", which is what I expected from reading the README.
The text was updated successfully, but these errors were encountered: