Changed to return str from javaToString so we can detect and add quotes
if necessary.