JSONObject.populateMap() can be a over-enthusiastic in calling methods on an object that aren't valid bean getter methods. For instance:
- It will call static get methods that otherwise pass all the tests for validity.
- It will call get methods with a void return type
- It will call a get method that is a synthetic method -- typically the result of overriding a superclass
My opinion is that populateMap() should be more cautious about calling methods on an unknown object. There may be side-effecty behaviour within the object that's undesirable. Code to avoid doing this is trivial and fast.