Class.getEnclosingMethod0() and Class.getGenericSignature() should finish the TypeWrapper, otherwise the metadata isn't yet available.

In addition, getGenericSignature() should not re-mangle the sig as that is not necessary.
This fixes several Guice 2.0 test case failures as reported in bug #3004682.
This commit is contained in:
jfrijters 2010-05-21 04:21:55 +00:00
Родитель bc23b974ef
Коммит 1bf158bf1d
1 изменённых файлов: 4 добавлений и 6 удалений

Просмотреть файл

@ -2520,6 +2520,7 @@ namespace IKVM.NativeCode.java
public static object[] getEnclosingMethod0(object thisClass)
{
TypeWrapper tw = TypeWrapper.FromClass(thisClass);
tw.Finish();
string[] enc = tw.GetEnclosingMethod();
if (enc == null)
{
@ -2626,12 +2627,9 @@ namespace IKVM.NativeCode.java
public static string getGenericSignature(object thisClass)
{
string sig = TypeWrapper.FromClass(thisClass).GetGenericSignature();
if (sig == null)
{
return null;
}
return sig.Replace('.', '/');
TypeWrapper tw = TypeWrapper.FromClass(thisClass);
tw.Finish();
return tw.GetGenericSignature();
}
internal static object AnnotationsToMap(object[] objAnn)