Add semi-functional exception throwing.
We still need a way to call <init> on the new exception instance, in particular.
Change-Id: I839365d20288208cb8847253380cf654a35aeddd
diff --git a/src/jni_internal.cc b/src/jni_internal.cc
index 9a2492e..eda3e9b 100644
--- a/src/jni_internal.cc
+++ b/src/jni_internal.cc
@@ -215,10 +215,10 @@
result += ';';
}
// Rewrite '.' as '/' for backwards compatibility.
- for (size_t i = 0; i < result.size(); ++i) {
- if (result[i] == '.') {
- result[i] = '/';
- }
+ if (result.find('.') != std::string::npos) {
+ LOG(WARNING) << "Call to JNI FindClass with dots in name: "
+ << "\"" << name << "\"";
+ std::replace(result.begin(), result.end(), '.', '/');
}
return result;
}