When it's day, mobs in water do not attack you. This does not apply to skeletons.
I thought all of the mobs would attack when in water (except spiders at daytime).
What happened was only the skeleton attacked me.
To get this bug:
1. Wait a night
2. See if a mob is in the water
3. If one is and it's not a skeleton then go on land near it
4. It will not attack