Fixes for Issue TOOLS-2526

This fix includes java code level changes for Issue TOOLS-2526
Merge pull request #121 from rajeevanv89/master2

Fixes for Issue TOOLS-2526