keenlabs / KeenClient-Java

Official Java client for the Keen IO API. Build analytics features directly into your Java apps.
https://keen.io/docs
MIT License
74 stars 43 forks source link

Keen.addEvent mutates the passed dictionary #14

Closed dkador closed 10 years ago

dkador commented 10 years ago

If you pass in a dictionary to addEvent that doesn't have a timestamp, we'll set keen.timestamp on that dictionary. That's normally fine, but if, for some reason, you re-use that dictionary for a later invocation of addEvent, that timestamp will still be there, which is no good.

We'll either need to not mutate the dictionary (probably the right move), return the dictionary to its original form, or do something else.

Geeber commented 10 years ago

Note for whoever works on fixing this: the problem is in validateAndBuildEvent and its handling of the keenProperties map.