Fixed bugs found by FindBugs tool
Merge branch 'develop' of https://github.com/orientechnologies/orientdb into develop

Merged changes