Needless cast in SaveGroupCmd and SaveUserCmd

The SaveGroupCmd and SaveUserCmd cast the Group (or User) to a GroupEntity (or UserEntity) this cast is unnecessary as the only usage of the data memeber is as teh Interface.

This cast causes problems because I have implemented my own WritableIdentityProvider. The contract of the API of this is to return User and Group (not the Entity) but the code fails at runtime with a ClassCastException because an Entity is assumed.

This is a simple fix to not do the cast in the *Cmd classes and then the code will honour the API contract

1 Like

Feel free to submit a github pull request. That makes discussing this easier as well.