Override hashcode when necessary

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>
Use logger instead of printStackTrace

+ equals overwritten correctly

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>
Some sonar issues fixed:

- log the occurred exception
- use curly braces
- don't use literals like "true" or "false" in condition statement

+ port counting up to a certain limit to omit infinite loop

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>
Some more sonar issues...

Signed-off-by: Nico Rutishauser <nr@hotmail.ch>