diff options
author | Tom Tromey <tromey@redhat.com> | 2001-03-23 19:15:44 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-03-23 19:15:44 +0000 |
commit | 83c64db681317c28239f07c5a8e6bb201834f0ba (patch) | |
tree | 28774e5e29803dc3ce69073c0dcf0c60c43a6982 /libjava/java/lang/reflect | |
parent | e9f4fa71431e33e47b1eab017ee03f937e27b058 (diff) | |
download | gcc-83c64db681317c28239f07c5a8e6bb201834f0ba.zip gcc-83c64db681317c28239f07c5a8e6bb201834f0ba.tar.gz gcc-83c64db681317c28239f07c5a8e6bb201834f0ba.tar.bz2 |
jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.
* jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.
* java/lang/reflect/natField.cc (getType): Use _Jv_ResolveField
unconditionally.
* include/jvm.h (_Jv_ResolveField): Declare.
* include/java-interp.h (_Jv_ResolveField): Don't declare.
* resolve.cc (_Jv_ResolveField): No longer conditional on
INTERPRETER.
From-SVN: r40785
Diffstat (limited to 'libjava/java/lang/reflect')
-rw-r--r-- | libjava/java/lang/reflect/natField.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libjava/java/lang/reflect/natField.cc b/libjava/java/lang/reflect/natField.cc index 57421d6..0aedc4e 100644 --- a/libjava/java/lang/reflect/natField.cc +++ b/libjava/java/lang/reflect/natField.cc @@ -1,6 +1,6 @@ // natField.cc - Implementation of java.lang.reflect.Field native methods. -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. @@ -44,17 +44,8 @@ jclass java::lang::reflect::Field::getType () { jfieldID fld = _Jv_FromReflectedField (this); - if (! fld->isResolved()) - { - JvSynchronize sync (declaringClass); - if (! fld->isResolved()) - { - fld->type - = _Jv_FindClassFromSignature(((Utf8Const*) (fld->type))->data, - declaringClass->getClassLoader()); - fld->flags &= ~_Jv_FIELD_UNRESOLVED_FLAG; - } - } + JvSynchronize sync (declaringClass); + _Jv_ResolveField (fld, declaringClass->getClassLoader ()); return fld->type; } |