Revert "Fixed some warnings in ObjectService"

This reverts commit d5d3fa49f2e02eabb1326eee0de642a811c711ae.
Merge pull request #1282 from ilikenwf/master

Revert "Fixed some warnings in ObjectService"