DO NOT MERGE Fix all unsafe caching to be like libcore.
This way, if a runtime is restarted within a process, we re-initialize all
the cached data.
Conflicts:
src/native/java_lang_Runtime.cc -- nativeExit lost an argument in dalvik-dev
(cherry picked from commit 7756d5473fa27ce7e6ac7c31770eef7030431da4)
Change-Id: I6184fc20c2a9ec16c4b053584a4d1c3b64452d0f
diff --git a/src/native/java_lang_reflect_Field.cc b/src/native/java_lang_reflect_Field.cc
index 3e0c9d7..bd33c0e 100644
--- a/src/native/java_lang_reflect_Field.cc
+++ b/src/native/java_lang_reflect_Field.cc
@@ -14,14 +14,12 @@
* limitations under the License.
*/
-#include "jni_internal.h"
#include "class_linker.h"
+#include "jni_internal.h"
#include "object.h"
#include "object_utils.h"
#include "reflection.h"
-#include "JniConstants.h" // Last to avoid problems with LOG redefinition.
-
namespace art {
static bool GetFieldValue(Object* o, Field* f, JValue& value, bool allow_references) {
@@ -79,7 +77,7 @@
o = Decode<Object*>(env, javaObj);
Class* declaringClass = f->GetDeclaringClass();
- if (!VerifyObjectInClass(env, o, declaringClass)) {
+ if (!VerifyObjectInClass(o, declaringClass)) {
return false;
}
return true;
@@ -323,7 +321,7 @@
};
void register_java_lang_reflect_Field(JNIEnv* env) {
- jniRegisterNativeMethods(env, "java/lang/reflect/Field", gMethods, NELEM(gMethods));
+ REGISTER_NATIVE_METHODS("java/lang/reflect/Field");
}
} // namespace art