Java samples modification CR fix.