Fixes for Issue TOOLS-2526

This fix includes java code level changes for Issue TOOLS-2526