mcharmas/android-parcelable-intellij-plugin

Should describeContents return hashCode instead of 0?

octohub opened this issue · 2 comments

Hello all,

I am sure there is a reason for this, but describeContents returns 0, why not return hashCode() instead?

Neither implementation is that helpful, but I would say hashCode() is better than 0.

What do you guys think?

Hi,
describeContents is a bit of mystery. Here is some explanation: http://stackoverflow.com/questions/4076946/parcelable-where-when-is-describecontents-used

For more details you probably would have to dive deep into Android sources. Deducing from SO response and enigmatic docs 0 value is a safe default.

@mcharmas Really appreciate the prompt response, thank you. Love the plugin, awesome work!