use `ScopedJavaLocalRef<jstring> buffer = ConvertUTF8ToJavaString(env, url.c_str())` instead.