Closed ceedubs closed 10 years ago
This is a nice fix! Thanks so much for your contribution!
I hate to ask for dessert when given a free dinner, but would you consider adding a test case to your Pull Request?
If I'm honest I will probably never get around to adding tests to this PR. Java makes me unhappy. Sorry!
Fair enough- I'll write a test for this before I merge it.
(Out of curiosity, are you using the Java lib from Scala or Clojure or something non-Java? Because that's awesome :)
@joeatwork yeah, I'm using it from Scala. If there were a Scala version that performed async IO for the service calls I'd happily switch to that and would probably be more inclined to submit PRs with unit tests ;)
JSONObject.getNames has the awful property that if the argument is a JSONObject with no keys, it returns
null
instead of an empty array. When conditional logic is used to generate modifiers, it's easy to end up getting one without any keys.