-
Notifications
You must be signed in to change notification settings - Fork 63
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
Renew event ID when event object is reused (close #390) #391
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious about the new depracted methods. Other than that this looks good and I'll approve once I understand a little more about those.
public long getDeviceCreatedTimestamp() { | ||
return this.deviceCreatedTimestamp; | ||
if (deviceCreatedTimestamp == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we have introduced a side effect in this function and then made a new function to get the unchanged version. Whats the plan for v2?
/** | ||
* Get the actual timestamp of the event. | ||
* @apiNote It doesn't have the side effect of {@link #getDeviceCreatedTimestamp()}. | ||
* @deprecated As of release 1.5.0, it will be removed in the version 2.0.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It also seems odd to introduce deprecated methods...
/** | ||
* Get the actual event id of the event. | ||
* @apiNote It doesn't have the side effect of {@link #getEventId()}. | ||
* @deprecated As of release 1.5.0, it will be removed in the version 2.0.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments here as above.
Thanks @paulboocock , all these comments are related to a design issue. In brief:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, that's a good enough excuse for me. 2.0.0 can't come soon enough :-)
LGTM.
The event ID is set in the event constructor. We want the event ID set when the event is tracked. Unless the user has set it programmatically.