Created
March 6, 2013 03:50
-
-
Save dchenbecker/5096560 to your computer and use it in GitHub Desktop.
Sometimes I just need to remind myself how crappy some Java APIs are...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> import java.util.Properties | |
import java.util.Properties | |
scala> val defaults = new Properties | |
defaults: java.util.Properties = {} | |
scala> defaults.setProperty("test", "foo") | |
res8: java.lang.Object = null | |
scala> defaults.containsKey("test") | |
res9: Boolean = true | |
scala> val test = new Properties(defaults) | |
test: java.util.Properties = {} | |
scala> test.containsKey("test") | |
res10: Boolean = false | |
scala> test.getProperty("test") | |
res11: java.lang.String = foo |
what tixxit said.
Use java.util.Properties! You'll have hours and hours of fun chasing bugs!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wat?