replace deprecated 'ruby_to_java and 'java_to_primitive'