[Ikvm-commit] ikvm/runtime ClassFile.cs,1.129,1.130
Brought to you by:
jfrijters
|
From: Jeroen F. <jfr...@us...> - 2014-06-24 11:15:28
|
Update of /cvsroot/ikvm/ikvm/runtime In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6100 Modified Files: ClassFile.cs Log Message: Bug fix. Since Java 1.7 class names aren't allowed to have [ and ] characters. Index: ClassFile.cs =================================================================== RCS file: /cvsroot/ikvm/ikvm/runtime/ClassFile.cs,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** ClassFile.cs 5 Jun 2014 11:08:57 -0000 1.129 --- ClassFile.cs 24 Jun 2014 11:15:26 -0000 1.130 *************** *** 1453,1457 **** private string name; private TypeWrapper typeWrapper; ! private static char[] invalidJava15Characters = { '.', ';' }; internal ConstantPoolItemClass(BigEndianBinaryReader br) --- 1453,1457 ---- private string name; private TypeWrapper typeWrapper; ! private static char[] invalidJava15Characters = { '.', ';', '[', ']' }; internal ConstantPoolItemClass(BigEndianBinaryReader br) *************** *** 1519,1522 **** --- 1519,1523 ---- { // since 1.5 the restrictions on class names have been greatly reduced + int start = 0; int end = name.Length; if(name[0] == '[') *************** *** 1534,1539 **** end--; } } ! if(name.IndexOfAny(invalidJava15Characters, 0, end) >= 0) { goto barf; --- 1535,1544 ---- end--; } + while(name[start] == '[') + { + start++; + } } ! if(name.IndexOfAny(invalidJava15Characters, start, end - start) >= 0) { goto barf; |